Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends

FltInstanceDefinition Class Reference

This special kind of record marks the top node of an instance subtree. More...

#include "fltInstanceDefinition.h"

Inheritance diagram for FltInstanceDefinition:
FltBead FltRecord TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Public Member Functions

 FltInstanceDefinition (FltHeader *header)
void add_ancillary (FltRecord *ancillary)
 Adds a new unsupported ancillary record to the end of the list of ancillary records for this record.
void add_child (FltRecord *child)
 Adds a new child to the end of the list of children for this record.
void add_extension (FltRecord *extension)
 Adds a new extension to the end of the list of extensions for this record.
void add_subface (FltRecord *subface)
 Adds a new subface to the end of the list of subfaces for this record.
void add_transform_step (FltTransformRecord *record)
 Applies the indicated transform step to the net transformation applied to the bead.
virtual void apply_converted_filenames ()
 Walks the hierarchy at this record and below and copies the _converted_filename record into the _orig_filename record, so the flt file will be written out with the converted filename instead of what was originally read in.
TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer.
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer.
void check_remaining_size (const DatagramIterator &di, const string &name=string()) const
 Checks that the iterator has no bytes left, as it should at the end of a successfully read record.
void clear_ancillary ()
 Removes all unsupported ancillary records from this record.
void clear_children ()
 Removes all children from this record.
void clear_comment ()
 Removes the comment for this record.
void clear_extensions ()
 Removes all extensions from this record.
void clear_subfaces ()
 Removes all subfaces from this record.
void clear_transform ()
 Removes any transform matrix and all transform steps on this bead.
virtual TypeHandle force_init_type ()
FltRecordget_ancillary (int n) const
 Returns the nth unsupported ancillary record of this record.
int get_best_parent_from_Set (const std::set< int > &) const
FltRecordget_child (int n) const
 Returns the nth child of this record.
const string & get_comment () const
 Retrieves the comment for this record, or empty string if the record has no comment.
FltRecordget_extension (int n) const
 Returns the nth extension of this record.
int get_num_ancillary () const
 Returns the number of unsupported ancillary records of this record.
int get_num_children () const
 Returns the number of child records of this record.
int get_num_extensions () const
 Returns the number of extension attribute records for this object.
int get_num_subfaces () const
 Returns the number of subface records of this record.
int get_num_transform_steps () const
 Returns the number of individual steps that define the net transform on this bead as returned by set_transform().
int get_ref_count () const
 Returns the current reference count.
int get_replicate_count () const
 Returns the replicate count of this bead.
FltRecordget_subface (int n) const
 Returns the nth subface of this record.
const LMatrix4dget_transform () const
 Returns the single-precision 4x4 matrix that represents the transform applied to this bead, or the identity matrix if the bead has not been transformed.
FltTransformRecordget_transform_step (int n)
 Returns the nth individual step that defines the net transform on this bead.
const FltTransformRecordget_transform_step (int n) const
 Returns the nth individual step that defines the net transform on this bead.
virtual TypeHandle get_type () const
int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object.
bool has_comment () const
 Returns true if this record has a nonempty comment, false otherwise.
bool has_transform () const
 Returns true if the bead has been transformed, false otherwise.
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.
bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly.
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type.
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.
void operator delete (void *ptr, void *)
void operator delete (void *ptr)
void operator delete (void *ptr)
void operator delete (void *ptr, void *)
void operator delete[] (void *, void *)
void operator delete[] (void *ptr)
void operator delete[] (void *, void *)
void operator delete[] (void *ptr)
void * operator new (size_t size, void *ptr)
void * operator new (size_t size)
void * operator new (size_t size, void *ptr)
void * operator new (size_t size)
void * operator new[] (size_t size, void *ptr)
void * operator new[] (size_t size, void *ptr)
void * operator new[] (size_t size)
void * operator new[] (size_t size)
virtual void output (ostream &out) const
 Writes a quick one-line description of the record, but not its children.
void ref () const
 Explicitly increments the reference count.
void set_comment (const string &comment)
 Changes the comment for this record.
void set_replicate_count (int count)
 Changes the replicate count of this bead.
void set_transform (const LMatrix4d &mat)
 Replaces the transform matrix on this bead.
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
virtual bool unref () const
 Explicitly decrements the reference count.
void weak_ref (WeakPointerToVoid *ptv)
 Adds the indicated PointerToVoid as a weak reference to this object.
void weak_unref (WeakPointerToVoid *ptv)
 Removes the indicated PointerToVoid as a weak reference to this object.
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.
FltRecordcreate_new_record (FltOpcode opcode) const
 Creates a new FltRecord corresponding to the opcode.
bool do_test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.
bool do_test_ref_count_nonzero () const
 Returns true if the reference count is nonzero, false otherwise.
virtual bool extract_ancillary (FltRecordReader &reader)
 Checks whether the given bead, which follows this bead sequentially in the file, is an ancillary record of this bead.
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.
FltError read_record_and_children (FltRecordReader &reader)
 Extracts this record information from the current record presented in the reader, then advances the reader and continues to read any children, if present.
virtual FltError write_ancillary (FltRecordWriter &writer) const
 Writes whatever ancillary records are required for this record.
void write_children (ostream &out, int indent_level) const
 Assuming the current write position has been left at the end of the last line of the record description, writes out the list of children.
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.

Static Protected Member Functions

static bool is_ancillary (FltOpcode opcode)
 Returns true if the indicated opcode corresponds to an ancillary record type, false otherwise.

Protected Attributes

FltHeader_header

Friends

class FltInstanceRef
class FltRecordWriter

Detailed Description

This special kind of record marks the top node of an instance subtree.

This subtree lives outside of the normal hierarchy, and is MultiGen's way of supporting instancing--each instance subtree has a unique index, which may be referenced in a FltInstanceRef object to make the instance appear in various places in the hierarchy.

Definition at line 32 of file fltInstanceDefinition.h.


Member Function Documentation

void FltRecord::add_ancillary ( FltRecord ancillary) [inherited]

Adds a new unsupported ancillary record to the end of the list of ancillary records for this record.

This record will be written to the flt file following this record, without attempting to understand what is in it.

Normally, there is no reason to use this function; if the data stored in the FltRecord requires one or more ancillary record, the appropriate records will automatically be generated when the record is written. This function is only required to output a record whose type is not supported by the flt loader. But it would be better to extend the flt loader to know about this new kind of data record.

Definition at line 253 of file fltRecord.cxx.

void FltRecord::add_child ( FltRecord child) [inherited]

Adds a new child to the end of the list of children for this record.

Definition at line 102 of file fltRecord.cxx.

Referenced by FltRecord::read_record_and_children().

void FltRecord::add_extension ( FltRecord extension) [inherited]

Adds a new extension to the end of the list of extensions for this record.

This should be a record of type FO_extension.

Definition at line 193 of file fltRecord.cxx.

Referenced by FltRecord::read_record_and_children().

void FltRecord::add_subface ( FltRecord subface) [inherited]

Adds a new subface to the end of the list of subfaces for this record.

Definition at line 147 of file fltRecord.cxx.

Referenced by FltRecord::read_record_and_children().

void FltBead::add_transform_step ( FltTransformRecord record) [inherited]

Applies the indicated transform step to the net transformation applied to the bead.

Definition at line 149 of file fltBead.cxx.

References FltTransformRecord::get_matrix().

Referenced by FltBead::set_transform().

void FltRecord::apply_converted_filenames ( ) [virtual, inherited]

Walks the hierarchy at this record and below and copies the _converted_filename record into the _orig_filename record, so the flt file will be written out with the converted filename instead of what was originally read in.

Reimplemented in FltExternalReference, FltHeader, and FltTexture.

Definition at line 340 of file fltRecord.cxx.

TypedObject * TypedObject::as_typed_object ( ) [inline, inherited]

Returns the object, upcast (if necessary) to a TypedObject pointer.

Definition at line 99 of file typedObject.I.

const TypedObject * TypedObject::as_typed_object ( ) const [inline, inherited]

Returns the object, upcast (if necessary) to a TypedObject pointer.

Definition at line 110 of file typedObject.I.

bool FltInstanceDefinition::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 64 of file fltInstanceDefinition.cxx.

References Datagram::add_be_int16(), FltBead::build_record(), Datagram::pad_bytes(), FltRecordWriter::set_opcode(), and FltRecordWriter::update_datagram().

void FltRecord::check_remaining_size ( const DatagramIterator di,
const string &  name = string() 
) const [inherited]
void FltRecord::clear_ancillary ( ) [inherited]

Removes all unsupported ancillary records from this record.

See get_num_ancillary().

Definition at line 231 of file fltRecord.cxx.

void FltRecord::clear_children ( ) [inherited]

Removes all children from this record.

Definition at line 91 of file fltRecord.cxx.

void FltRecord::clear_comment ( ) [inherited]

Removes the comment for this record.

Definition at line 285 of file fltRecord.cxx.

void FltRecord::clear_extensions ( ) [inherited]

Removes all extensions from this record.

Definition at line 181 of file fltRecord.cxx.

void FltRecord::clear_subfaces ( ) [inherited]

Removes all subfaces from this record.

Definition at line 136 of file fltRecord.cxx.

void FltBead::clear_transform ( ) [inherited]

Removes any transform matrix and all transform steps on this bead.

Definition at line 93 of file fltBead.cxx.

References LMatrix4d::ident_mat().

Referenced by FltBead::set_transform().

FltRecord * FltRecord::create_new_record ( FltOpcode  opcode) const [protected, inherited]

Creates a new FltRecord corresponding to the opcode.

If the opcode is unknown, creates a FltUnsupportedRecord.

Definition at line 521 of file fltRecord.cxx.

Referenced by FltRecord::read_record_and_children().

bool ReferenceCount::do_test_ref_count_integrity ( ) const [protected, inherited]

Does some easy checks to make sure that the reference count isn't completely bogus.

Returns true if ok, false otherwise.

Reimplemented in NodeReferenceCount, CachedTypedWritableReferenceCount, and NodeCachedReferenceCount.

Definition at line 29 of file referenceCount.cxx.

Referenced by ReferenceCount::do_test_ref_count_nonzero(), and ReferenceCount::test_ref_count_integrity().

bool ReferenceCount::do_test_ref_count_nonzero ( ) const [protected, inherited]

Returns true if the reference count is nonzero, false otherwise.

Definition at line 56 of file referenceCount.cxx.

References ReferenceCount::do_test_ref_count_integrity().

Referenced by ReferenceCount::test_ref_count_nonzero().

bool FltBead::extract_ancillary ( FltRecordReader reader) [protected, virtual, inherited]

Checks whether the given bead, which follows this bead sequentially in the file, is an ancillary record of this bead.

If it is, extracts the relevant information and returns true; otherwise, leaves it alone and returns false.

Reimplemented from FltRecord.

Reimplemented in FltBeadID, FltHeader, and FltMesh.

Definition at line 213 of file fltBead.cxx.

References FltRecord::extract_record(), and FltRecordReader::get_opcode().

bool FltInstanceDefinition::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 40 of file fltInstanceDefinition.cxx.

References FltRecord::check_remaining_size(), FltBead::extract_record(), FltRecordReader::get_iterator(), FltRecordReader::get_opcode(), and DatagramIterator::skip_bytes().

FltRecord * FltRecord::get_ancillary ( int  n) const [inherited]

Returns the nth unsupported ancillary record of this record.

See get_num_ancillary().

Definition at line 219 of file fltRecord.cxx.

FltRecord * FltRecord::get_child ( int  n) const [inherited]

Returns the nth child of this record.

Definition at line 80 of file fltRecord.cxx.

const string & FltRecord::get_comment ( ) const [inherited]

Retrieves the comment for this record, or empty string if the record has no comment.

Definition at line 275 of file fltRecord.cxx.

FltRecord * FltRecord::get_extension ( int  n) const [inherited]

Returns the nth extension of this record.

Definition at line 170 of file fltRecord.cxx.

int FltRecord::get_num_ancillary ( ) const [inherited]

Returns the number of unsupported ancillary records of this record.

These are ancillary records that appeared following this record in the flt file but that aren't directly understood by the flt loader--normally, an ancillary record is examined and decoded on the spot, and no pointer to it is kept.

Definition at line 208 of file fltRecord.cxx.

int FltRecord::get_num_children ( ) const [inherited]

Returns the number of child records of this record.

This reflects the normal scene graph hierarchy.

Definition at line 70 of file fltRecord.cxx.

int FltRecord::get_num_extensions ( ) const [inherited]

Returns the number of extension attribute records for this object.

These are auxiliary nodes, presumably of type FO_extension, that have some local meaning to the object.

Definition at line 160 of file fltRecord.cxx.

int FltRecord::get_num_subfaces ( ) const [inherited]

Returns the number of subface records of this record.

Normally, subfaces will only be present on object records, although it is logically possible for them to appear anywhere.

Definition at line 115 of file fltRecord.cxx.

int FltBead::get_num_transform_steps ( ) const [inherited]

Returns the number of individual steps that define the net transform on this bead as returned by set_transform().

Each step is a single transformation; the concatenation of all transformations will produce the matrix represented by set_transform().

Definition at line 110 of file fltBead.cxx.

Referenced by FltToEggLevelState::set_transform().

int ReferenceCount::get_ref_count ( ) const [inline, inherited]
int FltBead::get_replicate_count ( ) const [inherited]

Returns the replicate count of this bead.

If this is nonzero, it means that the bead is implicitly copied this number of additional times (for replicate_count + 1 total copies), applying the transform on this bead for each copy. In this case, the transform does not* apply to the initial copy of the bead.

Definition at line 170 of file fltBead.cxx.

FltRecord * FltRecord::get_subface ( int  n) const [inherited]

Returns the nth subface of this record.

Definition at line 125 of file fltRecord.cxx.

const LMatrix4d & FltBead::get_transform ( ) const [inherited]

Returns the single-precision 4x4 matrix that represents the transform applied to this bead, or the identity matrix if the bead has not been transformed.

Definition at line 66 of file fltBead.cxx.

References LMatrix4d::ident_mat().

Referenced by FltToEggLevelState::get_synthetic_group(), and FltToEggLevelState::set_transform().

const FltTransformRecord * FltBead::get_transform_step ( int  n) const [inherited]

Returns the nth individual step that defines the net transform on this bead.

See get_num_transform_steps().

Definition at line 136 of file fltBead.cxx.

FltTransformRecord * FltBead::get_transform_step ( int  n) [inherited]

Returns the nth individual step that defines the net transform on this bead.

See get_num_transform_steps().

Definition at line 122 of file fltBead.cxx.

Referenced by FltToEggLevelState::set_transform().

int TypedObject::get_type_index ( ) const [inline, inherited]

Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

This is equivalent to get_type().get_index().

Definition at line 52 of file typedObject.I.

References TypeHandle::get_index().

WeakReferenceList * ReferenceCount::get_weak_list ( ) const [inline, inherited]

Returns the WeakReferenceList associated with this ReferenceCount object.

If there has never been a WeakReferenceList associated with this object, creates one now.

Definition at line 307 of file referenceCount.I.

Referenced by ReferenceCount::weak_ref().

bool FltRecord::has_comment ( ) const [inherited]

Returns true if this record has a nonempty comment, false otherwise.

Definition at line 264 of file fltRecord.cxx.

bool FltBead::has_transform ( ) const [inherited]

Returns true if the bead has been transformed, false otherwise.

If this returns true, get_transform() will return the single-precision net transformation, and get_num_transform_steps() will return nonzero.

Definition at line 54 of file fltBead.cxx.

Referenced by FltToEggLevelState::set_transform().

bool ReferenceCount::has_weak_list ( ) const [inline, inherited]

Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.

In general, this will be true if there was ever a WeakPointerTo created for this object (even if there is not any for it now).

Definition at line 294 of file referenceCount.I.

Referenced by ReferenceCount::weak_unref().

static void FltInstanceDefinition::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 50 of file fltInstanceDefinition.h.

bool FltRecord::is_ancillary ( FltOpcode  opcode) [static, protected, inherited]

Returns true if the indicated opcode corresponds to an ancillary record type, false otherwise.

In general, this function is used to identify ancillary records that are not presently supported by the FltReader; these will be ignored. Normally, ancillary records will be detected and processed by extract_ancillary().

Definition at line 429 of file fltRecord.cxx.

Referenced by FltRecord::read_record_and_children().

bool TypedObject::is_exact_type ( TypeHandle  handle) const [inline, inherited]
bool TypedObject::is_of_type ( TypeHandle  handle) const [inline, inherited]

Returns true if the current object is or derives from the indicated type.

Definition at line 63 of file typedObject.I.

References TypeHandle::is_derived_from().

Referenced by EggSliderData::add_back_pointer(), EggJointData::add_back_pointer(), CIntervalManager::add_c_interval(), XFileNode::add_child(), CollisionTraverser::add_collider(), CollisionHandlerPhysical::add_collider(), EggXfmSAnim::add_data(), CharacterJointBundle::add_node(), NonlinearImager::add_screen(), EggGroupNode::apply_first_attribute(), EggGroupNode::apply_last_attribute(), DeferredNodeProperty::apply_to_node(), RecorderController::begin_playback(), NodePath::clear_clip_plane(), EggGroupNode::clear_connected_shading(), NodePath::clear_light(), EggBase::convert_paths(), NodePath::decode_from_bam_stream(), VrpnClient::disconnect_device(), PhysicsManager::do_physics(), GraphicsStateGuardian::fetch_specified_part(), EggRenderState::fill_state(), AnimBundleNode::find_anim_bundle(), EggGroupNode::find_coordsys_entry(), XFile::find_data_object(), Character::find_joint(), EggGroupNode::find_materials(), Character::find_slider(), XFile::find_template(), EggGroupNode::find_textures(), EggMaterialCollection::find_used_materials(), EggTextureCollection::find_used_textures(), EggGroupNode::force_filenames(), EggJointData::force_initial_rest_frame(), WindowFramework::get_aspect_2d(), EggPoolUniquifier::get_category(), EggGroupUniquifier::get_category(), EggGroupNode::get_connected_shading(), PandaFramework::get_mouse(), FactoryParams::get_param_of_type(), EggGroupNode::has_absolute_pathnames(), NodePath::has_clip_plane(), NodePath::has_clip_plane_off(), NodePath::has_light(), PandaFramework::hide_collision_solids(), x11GraphicsWindow::open_window(), eglGraphicsWindow::open_window(), EggNode::parse_egg(), CharacterMaker::part_to_node(), EggGroupNode::post_apply_flat_attribute(), EggBinner::prepare_node(), PortalClipper::prepare_portal(), NodePath::project_texture(), EggMatrixTablePointer::quantize_channels(), ParametricCurveCollection::r_add_curves(), SceneGraphReducer::r_collect_vertex_data(), EggGroupNode::r_load_externals(), EggGroupNode::rebuild_vertex_pools(), EggGroupNode::recompute_polygon_normals(), EggGroupNode::remove_invalid_primitives(), EggGroupNode::remove_unused_vertices(), EggLoader::reparent_decals(), EggMaterialCollection::replace_materials(), EggTextureCollection::replace_textures(), EggGroupNode::resolve_filenames(), EggGroupNode::reverse_vertex_ordering(), NodePath::set_clip_plane(), NodePath::set_clip_plane_off(), NodePath::set_light(), ProjectionScreen::set_projector(), NonlinearImager::set_source_camera(), EggXfmSAnim::set_value(), NonlinearImager::set_viewer_camera(), PandaFramework::show_collision_solids(), BamCache::store(), XFileToEggConverter::strip_nodes(), EggGroupNode::strip_normals(), DataGraphTraverser::traverse(), DataGraphTraverser::traverse_below(), EggGroupNode::triangulate_polygons(), EggGroupNode::unify_attributes(), EggNameUniquifier::uniquify(), NodeCullCallbackData::upcall(), PhysicsCollisionHandler::validate_target(), EggXfmSAnim::write(), EggGroup::write(), EggToDXFLayer::write_3d_face(), and EggToDXFLayer::write_entities().

void ReferenceCount::local_object ( ) [inline, inherited]

This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.

This allows the object to be passed to functions that will increment and decrement the object's reference count temporarily, and it will prevent the object from being deleted (inappropriately), when the reference count returns to zero. It actually achieves this by setting a large positive value in the reference count field.

Definition at line 276 of file referenceCount.I.

Referenced by PGTop::cull_callback(), BoundingSphere::extend_by_hexahedron(), AsyncTaskManager::find_task(), AsyncTaskManager::find_tasks(), and AsyncTaskManager::find_tasks_matching().

void FltRecord::output ( ostream &  out) const [virtual, inherited]

Writes a quick one-line description of the record, but not its children.

This is a human-readable description, primarily for debugging; to write a flt file, use FltHeader::write_flt().

Reimplemented in FltBeadID, FltExternalReference, FltUnsupportedRecord, and FltVertexList.

Definition at line 359 of file fltRecord.cxx.

FltError FltRecord::read_record_and_children ( FltRecordReader reader) [protected, inherited]

Extracts this record information from the current record presented in the reader, then advances the reader and continues to read any children, if present.

On return, the reader is position on the next sibling record to this record.

Returns FE_ok if successful, otherwise on error.

Definition at line 580 of file fltRecord.cxx.

References FltRecord::add_child(), FltRecord::add_extension(), FltHeader::add_instance(), FltRecord::add_subface(), FltRecordReader::advance(), FltRecord::create_new_record(), FltRecordReader::eof(), FltRecordReader::error(), FltRecord::extract_ancillary(), FltRecord::extract_record(), FltRecordReader::get_opcode(), FltRecord::is_ancillary(), and FltRecord::read_record_and_children().

Referenced by FltHeader::read_flt(), and FltRecord::read_record_and_children().

void ReferenceCount::ref ( ) const [inline, inherited]

Explicitly increments the reference count.

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

Definition at line 179 of file referenceCount.I.

References ReferenceCount::test_ref_count_integrity().

Referenced by CachedTypedWritableReferenceCount::cache_ref(), TypedWritable::decode_raw_from_bam_stream(), NodeCachedReferenceCount::node_ref(), NodeReferenceCount::node_ref(), BamCacheRecord::set_data(), CullableObject::set_draw_callback(), and ModelRoot::set_reference().

void FltRecord::set_comment ( const string &  comment) [inherited]

Changes the comment for this record.

Definition at line 295 of file fltRecord.cxx.

void FltBead::set_replicate_count ( int  count) [inherited]

Changes the replicate count of this bead.

If you are setting the replicate count to some nonzero number, you must also set a transform on the bead. See set_replicate_count().

Definition at line 183 of file fltBead.cxx.

void FltBead::set_transform ( const LMatrix4d mat) [inherited]

Replaces the transform matrix on this bead.

This implicitly removes all of the transform steps added previously, and replaces them with a single 4x4 general matrix transform step.

Definition at line 79 of file fltBead.cxx.

References FltBead::add_transform_step(), FltBead::clear_transform(), and FltTransformGeneralMatrix::set_matrix().

bool ReferenceCount::test_ref_count_integrity ( ) const [inline, inherited]
bool ReferenceCount::test_ref_count_nonzero ( ) const [inline, inherited]

Does some easy checks to make sure that the reference count isn't zero, or completely bogus.

Returns true if ok, false otherwise.

Definition at line 252 of file referenceCount.I.

References ReferenceCount::do_test_ref_count_nonzero().

Referenced by CopyOnWritePointer::test_ref_count_nonzero().

bool ReferenceCount::unref ( ) const [inline, virtual, inherited]

Explicitly decrements the reference count.

Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic.) However, see the helper function unref_delete().

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

The return value is true if the new reference count is nonzero, false if it is zero.

Reimplemented in GeomVertexArrayFormat, GeomVertexFormat, InternalName, RenderAttrib, RenderEffects, RenderState, and TransformState.

Definition at line 214 of file referenceCount.I.

References ReferenceCount::test_ref_count_integrity().

Referenced by CachedTypedWritableReferenceCount::cache_unref(), TypedWritable::decode_raw_from_bam_stream(), RenderEffect::finalize(), NodeCachedReferenceCount::node_unref(), NodeReferenceCount::node_unref(), TransformState::unref(), RenderState::unref(), RenderEffects::unref(), RenderAttrib::unref(), InternalName::unref(), GeomVertexFormat::unref(), and GeomVertexArrayFormat::unref().

void ReferenceCount::weak_ref ( WeakPointerToVoid ptv) [inline, inherited]

Adds the indicated PointerToVoid as a weak reference to this object.

Definition at line 321 of file referenceCount.I.

References WeakReferenceList::add_reference(), and ReferenceCount::get_weak_list().

void ReferenceCount::weak_unref ( WeakPointerToVoid ptv) [inline, inherited]

Removes the indicated PointerToVoid as a weak reference to this object.

It must have previously been added via a call to weak_ref().

Definition at line 334 of file referenceCount.I.

References WeakReferenceList::clear_reference(), and ReferenceCount::has_weak_list().

void FltRecord::write ( ostream &  out,
int  indent_level = 0 
) const [virtual, inherited]

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 in FltInstanceRef.

Definition at line 372 of file fltRecord.cxx.

References FltRecord::write_children().

Referenced by FltInfo::list_hierarchy().

FltError FltBead::write_ancillary ( FltRecordWriter writer) const [protected, virtual, inherited]

Writes whatever ancillary records are required for this record.

Returns FE_ok on success, or something else if there is some error.

Reimplemented from FltRecord.

Reimplemented in FltBeadID, FltHeader, and FltMesh.

Definition at line 289 of file fltBead.cxx.

void FltRecord::write_children ( ostream &  out,
int  indent_level 
) const [protected, inherited]

Assuming the current write position has been left at the end of the last line of the record description, writes out the list of children.

Definition at line 385 of file fltRecord.cxx.

Referenced by FltRecord::write(), and FltInstanceRef::write().

FltError FltRecord::write_record_and_children ( FltRecordWriter writer) const [protected, virtual, inherited]

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 in FltInstanceRef.

Definition at line 726 of file fltRecord.cxx.

References FltRecordWriter::advance(), FltRecord::build_record(), FltRecord::write_ancillary(), and FltRecordWriter::write_record().

Referenced by FltHeader::write_flt(), and FltRecordWriter::write_instance_def().


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