Panda3D
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
LwoGroupChunk Class Reference

A particular kind of LwoChunk that is expected to contain an arbitrary number of child chunks. More...

#include "lwoGroupChunk.h"

Inheritance diagram for LwoGroupChunk:
LwoChunk IffChunk TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase LwoClip LwoHeader LwoSurface LwoSurfaceBlock LwoSurfaceBlockHeader LwoSurfaceBlockTMap

List of all members.

Public Member Functions

virtual TypeHandle force_init_type ()
IffChunkget_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

Detailed Description

A particular kind of LwoChunk that is expected to contain an arbitrary number of child chunks.

Definition at line 32 of file lwoGroupChunk.h.


Member Function Documentation

IffChunk * LwoGroupChunk::get_chunk ( int  n) const

Returns the nth child chunk of this group.

Definition at line 38 of file lwoGroupChunk.cxx.

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]
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.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations