18 #include "pandatoolbase.h" 20 #include "fltOpcode.h" 23 #include "typedObject.h" 24 #include "typedReferenceCount.h" 25 #include "pointerTo.h" 71 const string &name =
string())
const;
75 virtual void output(ostream &out)
const;
76 virtual void write(ostream &out,
int indent_level = 0)
const;
79 void write_children(ostream &out,
int indent_level)
const;
81 static bool is_ancillary(FltOpcode opcode);
83 FltRecord *create_new_record(FltOpcode opcode)
const;
88 virtual FltError write_record_and_children(
FltRecordWriter &writer)
const;
107 return get_class_type();
109 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
113 static void init_type() {
114 TypedReferenceCount::init_type();
115 register_type(_type_handle,
"FltRecord",
116 TypedReferenceCount::get_class_type());
123 INLINE ostream &operator << (ostream &out,
const FltRecord &record);
125 #include "fltRecord.I" 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...
void set_comment(const string &comment)
Changes the comment for this record.
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.
FltRecord * get_extension(int n) const
Returns the nth extension of this record.
virtual void apply_converted_filenames()
Walks the hierarchy at this record and below and copies the _converted_filename record into the _orig...
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...
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.
bool has_comment() const
Returns true if this record has a nonempty comment, false otherwise.
FltRecord * get_subface(int n) const
Returns the nth subface of this record.
virtual void output(ostream &out) const
Writes a quick one-line description of the record, but not its children.
const string & get_comment() const
Retrieves the comment for this record, or empty string if the record has no comment.
The base class for all kinds of records in a MultiGen OpenFlight file.
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.
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.
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.
int get_num_subfaces() const
Returns the number of subface records of this record.
virtual void write(ostream &out, int indent_level=0) const
Writes a multiple-line description of the record and all of its children.
int get_num_extensions() const
Returns the number of extension attribute records for this object.