Panda3D
|
This bead appears in the hierarchy to refer to a FltInstanceDefinition node defined elsewhere. More...
#include "fltInstanceRef.h"
Public Member Functions | |
FltInstanceRef (FltHeader *header) | |
virtual TypeHandle | force_init_type () |
FltInstanceDefinition * | get_instance () const |
Returns the instance subtree referenced by this node, or NULL if the reference is invalid. | |
virtual TypeHandle | get_type () const |
virtual void | write (ostream &out, int indent_level=0) const |
Writes a multiple-line description of the record and all of its children. | |
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. | |
Public Attributes | |
int | _instance_index |
Protected Member Functions | |
virtual bool | build_record (FltRecordWriter &writer) const |
Fills up the current record on the FltRecordWriter with data for this record, but does not advance the writer. | |
virtual bool | extract_record (FltRecordReader &reader) |
Fills in the information in this bead based on the information given in the indicated datagram, whose opcode has already been read. | |
virtual FltError | write_record_and_children (FltRecordWriter &writer) const |
Writes this record out to the flt file, along with all of its ancillary records and children records. |
This bead appears in the hierarchy to refer to a FltInstanceDefinition node defined elsewhere.
It indicates that the subtree beginning at the FltInstanceDefinition should be considered to be instanced here.
Definition at line 32 of file fltInstanceRef.h.
bool FltInstanceRef::build_record | ( | FltRecordWriter & | writer | ) | const [protected, virtual] |
Fills up the current record on the FltRecordWriter with data for this record, but does not advance the writer.
Returns true on success, false if there is some error.
Reimplemented from FltBead.
Definition at line 116 of file fltInstanceRef.cxx.
References Datagram::add_be_int16(), FltBead::build_record(), Datagram::pad_bytes(), FltRecordWriter::set_opcode(), and FltRecordWriter::update_datagram().
bool FltInstanceRef::extract_record | ( | FltRecordReader & | reader | ) | [protected, virtual] |
Fills in the information in this bead based on the information given in the indicated datagram, whose opcode has already been read.
Returns true on success, false if the datagram is invalid.
Reimplemented from FltBead.
Definition at line 73 of file fltInstanceRef.cxx.
References FltRecord::check_remaining_size(), FltBead::extract_record(), FltRecordReader::get_iterator(), FltRecordReader::get_opcode(), and DatagramIterator::skip_bytes().
FltInstanceDefinition * FltInstanceRef::get_instance | ( | ) | const |
Returns the instance subtree referenced by this node, or NULL if the reference is invalid.
Definition at line 40 of file fltInstanceRef.cxx.
References FltHeader::get_instance().
static void FltInstanceRef::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 FltBead.
Definition at line 55 of file fltInstanceRef.h.
void FltInstanceRef::write | ( | ostream & | out, |
int | indent_level = 0 |
||
) | const [virtual] |
Writes a multiple-line description of the record and all of its children.
This is a human-readable description, primarily for debugging; to write a flt file, use FltHeader::write_flt().
Reimplemented from FltRecord.
Definition at line 53 of file fltInstanceRef.cxx.
References FltHeader::get_instance(), and FltRecord::write_children().
FltError FltInstanceRef::write_record_and_children | ( | FltRecordWriter & | writer | ) | const [protected, virtual] |
Writes this record out to the flt file, along with all of its ancillary records and children records.
Returns FE_ok on success, or something else on error.
Reimplemented from FltRecord.
Definition at line 96 of file fltInstanceRef.cxx.
References FltRecordWriter::write_instance_def().