65 if (!FltBead::extract_record(reader)) {
86 return FltBead::extract_ancillary(reader);
96 if (!FltBead::build_record(writer)) {
110 if (_id.length() > 7) {
118 if (result != FE_ok) {
123 return FltBead::write_ancillary(writer);
void set_id(const std::string &id)
Changes the id (name) of this particular bead.
This class writes a sequence of FltRecords to an ostream, handling opcode and size counts properly.
This class turns an istream into a sequence of FltRecords by reading a sequence of Datagrams and extr...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A base class for any of a broad family of flt records that represent particular beads in the hierarch...
DatagramIterator & get_iterator()
Returns an iterator suitable for extracting data from the current record.
size_t get_remaining_size() const
Return the bytes left in the datagram.
virtual void output(std::ostream &out) const
Writes a quick one-line description of the record, but not its children.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
FltOpcode get_opcode() const
Returns the opcode associated with the current record.
A class to retrieve the individual data elements previously stored in a Datagram.
void add_fixed_string(const std::string &str, size_t size)
Adds a fixed-length string to the datagram.
TypeHandle is the identifier used to differentiate C++ class types.
Datagram & update_datagram()
Returns a modifiable reference to the datagram associated with the current record.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
const std::string & get_id() const
Returns the id (name) of this particular bead.
FltError write_record(FltOpcode opcode, const Datagram &datagram=Datagram())
A convenience function to quickly write a simple record that consists of an opcode and possibly a dat...
std::string get_fixed_string(size_t size)
Extracts a fixed-length string.