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());
119INLINE std::ostream &operator << (std::ostream &out,
const FltRecord &record);
A class to retrieve the individual data elements previously stored in a Datagram.
This class turns an istream into a sequence of FltRecords by reading a sequence of Datagrams and extr...
This class writes a sequence of FltRecords to an ostream, handling opcode and size counts properly.
The base class for all kinds of records in a MultiGen OpenFlight file.
FltRecord * get_subface(int n) const
Returns the nth subface of this record.
int get_num_extensions() const
Returns the number of extension attribute records for this object.
void clear_extensions()
Removes all extensions from this record.
FltRecord * get_extension(int n) const
Returns the nth extension of this record.
const std::string & get_comment() const
Retrieves the comment for this record, or empty string if the record has no comment.
void clear_subfaces()
Removes all subfaces from this record.
void add_child(FltRecord *child)
Adds a new child to the end of the list of children for this record.
void clear_comment()
Removes the comment for this record.
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.
int get_num_ancillary() const
Returns the number of unsupported ancillary records of this record.
int get_num_subfaces() const
Returns the number of subface records of this record.
virtual void output(std::ostream &out) const
Writes a quick one-line description of the record, but not its children.
FltRecord * get_ancillary(int n) const
Returns the nth unsupported ancillary record of this record.
int get_num_children() const
Returns the number of child records 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.
virtual void apply_converted_filenames()
Walks the hierarchy at this record and below and copies the _converted_filename record into the _orig...
bool has_comment() const
Returns true if this record has a nonempty comment, false otherwise.
void add_ancillary(FltRecord *ancillary)
Adds a new unsupported ancillary record to the end of the list of ancillary records for this record.
void clear_children()
Removes all children from this record.
void add_subface(FltRecord *subface)
Adds a new subface to the end of the list of subfaces for this record.
void set_comment(const std::string &comment)
Changes the comment for this record.
void clear_ancillary()
Removes all unsupported ancillary records 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.
TypeHandle is the identifier used to differentiate C++ class types.
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
This is our own Panda specialization on the default STL vector.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.