67 const std::string &name = std::string())
const;
71 virtual void output(std::ostream &out)
const;
72 virtual void write(std::ostream &out,
int indent_level = 0)
const;
75 void write_children(std::ostream &out,
int indent_level)
const;
77 static bool is_ancillary(FltOpcode opcode);
79 FltRecord *create_new_record(FltOpcode opcode)
const;
84 virtual FltError write_record_and_children(
FltRecordWriter &writer)
const;
103 return get_class_type();
105 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
109 static void init_type() {
110 TypedReferenceCount::init_type();
112 TypedReferenceCount::get_class_type());
119 INLINE std::ostream &operator << (std::ostream &out,
const FltRecord &record);
void clear_comment()
Removes the comment for this record.
This class writes a sequence of FltRecords to an ostream, handling opcode and size counts properly.
void clear_ancillary()
Removes all unsupported ancillary records from this record.
void clear_extensions()
Removes all extensions from this record.
This class turns an istream into a sequence of FltRecords by reading a sequence of Datagrams and extr...
FltRecord * get_ancillary(int n) const
Returns the nth unsupported ancillary record of this record.
void check_remaining_size(const DatagramIterator &di, const std::string &name=std::string()) const
Checks that the iterator has no bytes left, as it should at the end of a successfully read record.
int get_num_children() const
Returns the number of child records of this record.
FltRecord * get_extension(int n) const
Returns the nth extension of this record.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
virtual void apply_converted_filenames()
Walks the hierarchy at this record and below and copies the _converted_filename record into the _orig...
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
void add_child(FltRecord *child)
Adds a new child to the end of the list of children for this record.
This is our own Panda specialization on the default STL vector.
bool has_comment() const
Returns true if this record has a nonempty comment, false otherwise.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
const std::string & get_comment() const
Retrieves the comment for this record, or empty string if the record has no comment.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
FltRecord * get_subface(int n) const
Returns the nth subface of this record.
void set_comment(const std::string &comment)
Changes the comment for this record.
The base class for all kinds of records in a MultiGen OpenFlight file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
FltRecord * get_child(int n) const
Returns the nth child of 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.
virtual void output(std::ostream &out) const
Writes a quick one-line description of the record, but not its children.
A class to retrieve the individual data elements previously stored in a Datagram.
void add_ancillary(FltRecord *ancillary)
Adds a new unsupported ancillary record to the end of the list of ancillary records for this record.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int get_num_ancillary() const
Returns the number of unsupported ancillary records of this record.
void clear_children()
Removes all children from this record.
void clear_subfaces()
Removes all subfaces from this record.
virtual void write(std::ostream &out, int indent_level=0) const
Writes a multiple-line description of the record and all of its children.
int get_num_subfaces() const
Returns the number of subface records of this record.
int get_num_extensions() const
Returns the number of extension attribute records for this object.