16 #include "fltRecordReader.h"
17 #include "fltRecordWriter.h"
18 #include "fltHeader.h"
19 #include "fltMaterial.h"
20 #include "config_flt.h"
43 if (!FltBeadID::extract_record(reader)) {
50 if (!FltGeometry::extract_record(reader)) {
54 nassertr(reader.
get_opcode() == FO_mesh,
false);
71 if (reader.
get_opcode() == FO_local_vertex_pool) {
73 return _vpool->extract_record(reader);
76 return FltBeadID::extract_ancillary(reader);
89 if (!FltBeadID::build_record(writer)) {
96 if (!FltGeometry::build_record(writer)) {
115 if (!_vpool->build_record(writer)) {
116 assert(!flt_error_abort);
119 FltError result = writer.
advance();
120 if (result != FE_ok) {
125 return FltBeadID::write_ancillary(writer);
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...
DatagramIterator & get_iterator()
Returns an iterator suitable for extracting data from the current record.
This is a base class for both FltFace and FltMesh, which are two different kinds of geometric primiti...
void pad_bytes(size_t size)
Adds the indicated number of zero bytes to the datagram.
A local vertex pool, as might appear in the middle of the hierarchy, for instance for a mesh...
void skip_bytes(size_t size)
Skips over the indicated number of bytes in the datagram.
FltError advance()
Writes the current record to the flt file, and resets the current record to receive new data...
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...
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. ...
TypeHandle is the identifier used to differentiate C++ class types.
void set_opcode(FltOpcode opcode)
Sets the opcode associated with the current record.
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 ...