#include <lwoHeader.h>
Inheritance diagram for LwoHeader:
Public Member Functions | |
LwoHeader () | |
bool | is_valid () const |
Returns true if the header represents a valid and recognized Lightwave header, false otherwise. | |
double | get_version () const |
Returns the version of the Lightwave file. | |
virtual bool | read_iff (IffInputFile *in, size_t stop_at) |
Reads the data of the chunk in from the given input file, if possible. | |
virtual void | write (ostream &out, int indent_level=0) const |
virtual TypeHandle | get_type () const |
virtual TypeHandle | force_init_type () |
int | get_num_chunks () const |
Returns the number of child chunks of this group. | |
IffChunk * | get_chunk (int n) const |
Returns the nth child chunk of this group. | |
IffId | get_id () const |
Returns the ID associated with this chunk. | |
void | set_id (IffId id) |
Changes the ID associated with this chunk. | |
virtual void | output (ostream &out) const |
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 context given by this chunk itself. | |
int | get_type_index () const |
bool | is_of_type (TypeHandle handle) const |
bool | is_exact_type (TypeHandle handle) const |
int | get_ref_count () const |
int | ref () const |
int | unref () const |
void | test_ref_count_integrity () const |
Static Public Member Functions | |
TypeHandle | get_class_type () |
void | init_type () |
Public Attributes | |
IffId | _lwid |
Protected Types | |
typedef pvector< PointerTo< 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 |
int | _ref_count |
Private Attributes | |
bool | _valid |
double | _version |
Static Private Attributes | |
TypeHandle | _type_handle |
Definition at line 36 of file lwoHeader.h.
|
Definition at line 53 of file lwoGroupChunk.h. |
|
Definition at line 38 of file lwoHeader.cxx. References _lwid, _valid, _version, DCAST, and IffInputFile::get_id(). |
|
Reimplemented from LwoGroupChunk. Definition at line 57 of file lwoHeader.h. |
|
Returns the nth child chunk of this group.
Definition at line 51 of file lwoGroupChunk.cxx. References LwoGroupChunk::_chunks, IffInputFile::get_bytes_read(), IffInputFile::get_chunk(), IffInputFile::is_eof(), NULL, and PT. |
|
Reimplemented from LwoGroupChunk. Definition at line 58 of file lwoHeader.h. |
|
|
Returns the number of child chunks of this group.
Definition at line 38 of file lwoGroupChunk.cxx. References LwoGroupChunk::_chunks, nassertr, and NULL. |
|
Reimplemented from LwoGroupChunk. Definition at line 54 of file lwoHeader.h. |
|
Returns the version of the Lightwave file.
Definition at line 47 of file lwoHeader.I. |
|
Reimplemented from LwoGroupChunk. Definition at line 61 of file lwoHeader.h. References _type_handle. |
|
Returns true if the header represents a valid and recognized Lightwave header, false otherwise.
Definition at line 34 of file lwoHeader.I. |
|
Allocates and returns a new chunk of the appropriate type based on the given ID, according to the context given by this chunk itself.
Reimplemented in LwoClip, LwoSurface, LwoSurfaceBlock, LwoSurfaceBlockHeader, and LwoSurfaceBlockTMap. Definition at line 66 of file iffChunk.cxx. Referenced by IffInputFile::get_chunk(), LwoSurfaceBlockTMap::write(), and LwoClip::write(). |
|
Definition at line 37 of file iffChunk.cxx. References IffChunk::_id, and indent(). |
|
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 73 of file lwoGroupChunk.cxx. References LwoGroupChunk::_chunks, IffInputFile::get_bytes_read(), IffInputFile::get_subchunk(), IffInputFile::is_eof(), NULL, and PT. |
|
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 62 of file lwoHeader.cxx. References _version, and LwoInputFile::set_lwo_version(). |
|
Similar to read_chunks_iff(), but reads them as subchunks.
Definition at line 96 of file lwoGroupChunk.cxx. References LwoGroupChunk::_chunks. |
|
Changes the ID associated with this chunk.
Definition at line 56 of file iffChunk.I. |
|
Reimplemented from IffChunk. Definition at line 92 of file lwoHeader.cxx. |
|
Formats the list of chunks for output to the user (primarily for debugging), one per line.
Definition at line 119 of file lwoGroupChunk.cxx. Referenced by LwoSurfaceBlockTMap::read_iff(), LwoSurface::read_iff(), and LwoClip::read_iff(). |
|
Definition at line 54 of file lwoGroupChunk.h. Referenced by LwoGroupChunk::get_chunk(), LwoGroupChunk::get_num_chunks(), LwoGroupChunk::read_chunks_iff(), and LwoGroupChunk::read_subchunks_iff(). |
|
Definition at line 40 of file lwoHeader.h. Referenced by LwoHeader(). |
|
Reimplemented from LwoGroupChunk. Definition at line 28 of file lwoHeader.cxx. Referenced by init_type(). |
|
Definition at line 50 of file lwoHeader.h. Referenced by LwoHeader(). |
|
Definition at line 51 of file lwoHeader.h. Referenced by is_valid(), LwoHeader(), and read_iff(). |