Panda3D
|
A particular kind of LwoChunk that is expected to contain an arbitrary number of child chunks. More...
#include "lwoGroupChunk.h"
Public Member Functions | |
virtual TypeHandle | force_init_type () |
IffChunk * | get_chunk (int n) const |
Returns the nth child chunk of this group. | |
int | get_num_chunks () const |
Returns the number of child chunks of this group. | |
virtual TypeHandle | get_type () const |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
Protected Types | |
typedef pvector< PT(IffChunk) > | Chunks |
Protected Member Functions | |
bool | read_chunks_iff (IffInputFile *in, size_t stop_at) |
Reads a sequence of child chunks, until byte stop_at has been been reached, and stores them as the children. | |
bool | read_subchunks_iff (IffInputFile *in, size_t stop_at) |
Similar to read_chunks_iff(), but reads them as subchunks. | |
void | write_chunks (ostream &out, int indent_level) const |
Formats the list of chunks for output to the user (primarily for debugging), one per line. | |
Protected Attributes | |
Chunks | _chunks |
A particular kind of LwoChunk that is expected to contain an arbitrary number of child chunks.
Definition at line 32 of file lwoGroupChunk.h.
IffChunk * LwoGroupChunk::get_chunk | ( | int | n | ) | const |
Returns the nth child chunk of this group.
Definition at line 38 of file lwoGroupChunk.cxx.
int LwoGroupChunk::get_num_chunks | ( | ) | const |
Returns the number of child chunks of this group.
Definition at line 28 of file lwoGroupChunk.cxx.
static void LwoGroupChunk::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from LwoChunk.
Reimplemented in LwoHeader, LwoSurface, LwoClip, LwoSurfaceBlockHeader, and LwoSurfaceBlockTMap.
Definition at line 53 of file lwoGroupChunk.h.
bool LwoGroupChunk::read_chunks_iff | ( | IffInputFile * | in, |
size_t | stop_at | ||
) | [protected] |
Reads a sequence of child chunks, until byte stop_at has been been reached, and stores them as the children.
Returns true if successful (and exactly the correct number of bytes were read), or false otherwise.
Definition at line 53 of file lwoGroupChunk.cxx.
References IffInputFile::get_bytes_read(), and IffInputFile::is_eof().
Referenced by LwoHeader::read_iff().
bool LwoGroupChunk::read_subchunks_iff | ( | IffInputFile * | in, |
size_t | stop_at | ||
) | [protected] |
Similar to read_chunks_iff(), but reads them as subchunks.
Definition at line 72 of file lwoGroupChunk.cxx.
References IffInputFile::get_bytes_read(), and IffInputFile::is_eof().
Referenced by LwoSurfaceBlockTMap::read_iff(), LwoSurfaceBlock::read_iff(), LwoSurfaceBlockHeader::read_iff(), LwoClip::read_iff(), and LwoSurface::read_iff().
void LwoGroupChunk::write_chunks | ( | ostream & | out, |
int | indent_level | ||
) | const [protected] |
Formats the list of chunks for output to the user (primarily for debugging), one per line.
Definition at line 91 of file lwoGroupChunk.cxx.