Panda3D
Loading...
Searching...
No Matches
iffChunk.cxx
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file iffChunk.cxx
10 * @author drose
11 * @date 2001-04-23
12 */
13
14#include "iffChunk.h"
15#include "iffInputFile.h"
16
17#include "indent.h"
18
19TypeHandle IffChunk::_type_handle;
20
21/**
22 *
23 */
24void IffChunk::
25output(std::ostream &out) const {
26 out << _id << " (" << get_type() << ")";
27}
28
29/**
30 *
31 */
32void IffChunk::
33write(std::ostream &out, int indent_level) const {
34 indent(out, indent_level) << _id << " { ... }\n";
35}
36
37/**
38 * Allocates and returns a new chunk of the appropriate type based on the
39 * given ID, according to the context given by this chunk itself.
40 */
43 return in->make_new_chunk(id);
44}
The basic kind of record in an EA "IFF" file, which the LightWave object file is based on.
Definition iffChunk.h:30
virtual IffChunk * make_new_chunk(IffInputFile *in, IffId id)
Allocates and returns a new chunk of the appropriate type based on the given ID, according to the con...
Definition iffChunk.cxx:42
A four-byte chunk ID appearing in an "IFF" file.
Definition iffId.h:26
A wrapper around an istream used for reading an IFF file.
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Definition indent.cxx:20
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.