26 _relative_priority = 0;
41 if (!FltBeadID::extract_record(reader)) {
45 nassertr(reader.
get_opcode() == FO_group,
false);
48 _relative_priority = iterator.get_be_int16();
49 iterator.skip_bytes(2);
50 _flags = iterator.get_be_uint32();
51 _special_id1 = iterator.get_be_int16();
52 _special_id2 = iterator.get_be_int16();
53 _significance = iterator.get_be_int16();
54 _layer_id = iterator.get_int8();
55 iterator.skip_bytes(1);
56 if (_header->get_flt_version() >= 1420) {
57 iterator.skip_bytes(4);
71 if (!FltBeadID::build_record(writer)) {
This class writes a sequence of FltRecords to an ostream, handling opcode and size counts properly.
A base class for any of a broad family of flt beads that include an ID.
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.
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.
DatagramIterator & get_iterator()
Returns an iterator suitable for extracting data from the current record.
void pad_bytes(size_t size)
Adds the indicated number of zero bytes to the datagram.
void add_int8(int8_t value)
Adds a signed 8-bit integer to the datagram.
void add_be_int16(int16_t value)
Adds a signed 16-bit big-endian integer to the datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void add_be_uint32(uint32_t value)
Adds an unsigned 32-bit big-endian integer to the datagram.
FltOpcode get_opcode() const
Returns the opcode associated with the current record.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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 ...