Panda3D
|
A class for a generic kind of IffChunk that is not understood by a particular IffReader. More...
#include "iffGenericChunk.h"
Public Member Functions | |
virtual TypeHandle | force_init_type () |
const Datagram & | get_data () const |
Returns the data in the chunk. | |
virtual TypeHandle | get_type () const |
virtual bool | read_iff (IffInputFile *in, size_t stop_at) |
Reads the data of the chunk in from the given input file, if possible. | |
void | set_data (const Datagram &data) |
Changes the data in the chunk. | |
virtual void | write (ostream &out, int indent_level=0) 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. |
A class for a generic kind of IffChunk that is not understood by a particular IffReader.
It remembers its entire contents.
Definition at line 31 of file iffGenericChunk.h.
const Datagram & IffGenericChunk::get_data | ( | ) | const [inline] |
Returns the data in the chunk.
Definition at line 31 of file iffGenericChunk.I.
static void IffGenericChunk::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 IffChunk.
Definition at line 52 of file iffGenericChunk.h.
bool IffGenericChunk::read_iff | ( | IffInputFile * | in, |
size_t | stop_at | ||
) | [virtual] |
Reads the data of the chunk in from the given input file, if possible.
The ID and length of the chunk have already been read. stop_at is the byte position of the file to stop at (based on the current position at in->get_bytes_read()). Returns true on success, false otherwise.
Implements IffChunk.
Definition at line 34 of file iffGenericChunk.cxx.
References IffInputFile::align(), IffInputFile::get_bytes_read(), and IffInputFile::read_bytes().
void IffGenericChunk::set_data | ( | const Datagram & | data | ) | [inline] |
Changes the data in the chunk.
Definition at line 41 of file iffGenericChunk.I.