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

An external reference to another flt file (possibly to a specific bead within the flt file). More...

#include "fltExternalReference.h"

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

List of all members.

Public Types

enum  Flags {
  F_color_palette_override = 0x80000000, F_material_palette_override = 0x40000000, F_texture_palette_override = 0x20000000, F_line_style_palette_override = 0x10000000,
  F_sound_palette_override = 0x08000000, F_light_palette_override = 0x04000000
}

Public Member Functions

 FltExternalReference (FltHeader *header)
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.
virtual TypeHandle force_init_type ()
Filename get_ref_filename () const
 Returns the name of the referenced file.
virtual TypeHandle get_type () const
virtual void output (ostream &out) const
 Writes a quick one-line description of the record, but not its children.
void set_ref_filename (const Filename &filename)
 Changes the name of the referenced file.

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

string _bead_id
Filename _converted_filename
int _flags
string _orig_filename

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.

Detailed Description

An external reference to another flt file (possibly to a specific bead within the flt file).

Definition at line 29 of file fltExternalReference.h.


Member Function Documentation

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 from FltRecord.

Definition at line 43 of file fltExternalReference.cxx.

bool FltExternalReference::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 134 of file fltExternalReference.cxx.

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

bool FltExternalReference::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 94 of file fltExternalReference.cxx.

References FltRecord::check_remaining_size(), FltHeader::convert_path(), FltBead::extract_record(), Filename::from_os_specific(), DatagramIterator::get_fixed_string(), FltRecordReader::get_iterator(), and FltRecordReader::get_opcode().

Returns the name of the referenced file.

Definition at line 70 of file fltExternalReference.cxx.

Referenced by output().

static void FltExternalReference::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 65 of file fltExternalReference.h.

void FltExternalReference::output ( ostream &  out) const [virtual]

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 from FltRecord.

Definition at line 57 of file fltExternalReference.cxx.

References get_ref_filename().

Changes the name of the referenced file.

Definition at line 80 of file fltExternalReference.cxx.


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