Panda3D
|
A class to retrieve the individual data elements previously stored in a Datagram. Elements may be retrieved one at a time; it is up to the caller to know the correct type and order of each element. More...
Public Member Functions | |
__init__ () | |
__init__ (const Datagram datagram, size_t offset) | |
__init__ (const DatagramIterator copy) | |
str | extractBytes (size_t size) |
Extracts the indicated number of bytes in the datagram and returns them as a string. More... | |
PNFloat32 | getBeFloat32 () |
Extracts a 32-bit big-endian single-precision floating-point number. More... | |
PNFloat64 | getBeFloat64 () |
Extracts a 64-bit big-endian floating-point number. More... | |
PNInt16 | getBeInt16 () |
Extracts a signed 16-bit big-endian integer. More... | |
PNInt32 | getBeInt32 () |
Extracts a signed 32-bit big-endian integer. More... | |
PNInt64 | getBeInt64 () |
Extracts a signed 64-bit big-endian integer. More... | |
PNUint16 | getBeUint16 () |
Extracts an unsigned 16-bit big-endian integer. More... | |
PNUint32 | getBeUint32 () |
Extracts an unsigned 32-bit big-endian integer. More... | |
PNUint64 | getBeUint64 () |
Extracts an unsigned 64-bit big-endian integer. More... | |
bool | getBool () |
Extracts a boolean value. More... | |
size_t | getCurrentIndex () |
Returns the current position within the datagram of the next piece of data to extract. More... | |
const Datagram | getDatagram () |
Return the datagram of this iterator. More... | |
str | getFixedString (size_t size) |
Extracts a fixed-length string. However, if a zero byte occurs within the string, it marks the end of the string. More... | |
PNFloat32 | getFloat32 () |
Extracts a 32-bit single-precision floating-point number. More... | |
PNFloat64 | getFloat64 () |
Extracts a 64-bit floating-point number. More... | |
PNInt16 | getInt16 () |
Extracts a signed 16-bit integer. More... | |
PNInt32 | getInt32 () |
Extracts a signed 32-bit integer. More... | |
PNInt64 | getInt64 () |
Extracts a signed 64-bit integer. More... | |
PNInt8 | getInt8 () |
Extracts a signed 8-bit integer. More... | |
str | getRemainingBytes () |
Returns the remaining bytes in the datagram as a string, but does not extract them from the iterator. More... | |
int | getRemainingSize () |
Return the bytes left in the datagram. More... | |
float | getStdfloat () |
Extracts either a 32-bit or a 64-bit floating-point number, according to Datagram::set_stdfloat_double(). More... | |
str | getString () |
Extracts a variable-length string. More... | |
str | getString32 () |
Extracts a variable-length string with a 32-bit length field. More... | |
PNUint16 | getUint16 () |
Extracts an unsigned 16-bit integer. More... | |
PNUint32 | getUint32 () |
Extracts an unsigned 32-bit integer. More... | |
PNUint64 | getUint64 () |
Extracts an unsigned 64-bit integer. More... | |
PNUint8 | getUint8 () |
Extracts an unsigned 8-bit integer. More... | |
str | getWstring () |
Extracts a variable-length wstring (with a 32-bit length field). More... | |
str | getZString () |
Extracts a variable-length string, as a NULL-terminated string. More... | |
DatagramIterator | operator= (const DatagramIterator copy) |
output (Ostream out) | |
Write a string representation of this instance to <out>. More... | |
skipBytes (size_t size) | |
Skips over the indicated number of bytes in the datagram. More... | |
write (Ostream out, unsigned int indent) | |
Write a string representation of this instance to <out>. More... | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
A class to retrieve the individual data elements previously stored in a Datagram. Elements may be retrieved one at a time; it is up to the caller to know the correct type and order of each element.
__init__ | ( | ) |
__init__ | ( | const Datagram | datagram, |
size_t | offset | ||
) |
__init__ | ( | const DatagramIterator | copy | ) |
str extractBytes | ( | size_t | size | ) |
Extracts the indicated number of bytes in the datagram and returns them as a string.
PNFloat32 getBeFloat32 | ( | ) |
Extracts a 32-bit big-endian single-precision floating-point number.
PNFloat64 getBeFloat64 | ( | ) |
Extracts a 64-bit big-endian floating-point number.
PNInt16 getBeInt16 | ( | ) |
Extracts a signed 16-bit big-endian integer.
PNInt32 getBeInt32 | ( | ) |
Extracts a signed 32-bit big-endian integer.
PNInt64 getBeInt64 | ( | ) |
Extracts a signed 64-bit big-endian integer.
PNUint16 getBeUint16 | ( | ) |
Extracts an unsigned 16-bit big-endian integer.
PNUint32 getBeUint32 | ( | ) |
Extracts an unsigned 32-bit big-endian integer.
PNUint64 getBeUint64 | ( | ) |
Extracts an unsigned 64-bit big-endian integer.
bool getBool | ( | ) |
Extracts a boolean value.
|
static |
size_t getCurrentIndex | ( | ) |
Returns the current position within the datagram of the next piece of data to extract.
const Datagram getDatagram | ( | ) |
Return the datagram of this iterator.
str getFixedString | ( | size_t | size | ) |
Extracts a fixed-length string. However, if a zero byte occurs within the string, it marks the end of the string.
PNFloat32 getFloat32 | ( | ) |
Extracts a 32-bit single-precision floating-point number.
PNFloat64 getFloat64 | ( | ) |
Extracts a 64-bit floating-point number.
PNInt16 getInt16 | ( | ) |
Extracts a signed 16-bit integer.
PNInt32 getInt32 | ( | ) |
Extracts a signed 32-bit integer.
PNInt64 getInt64 | ( | ) |
Extracts a signed 64-bit integer.
PNInt8 getInt8 | ( | ) |
Extracts a signed 8-bit integer.
str getRemainingBytes | ( | ) |
Returns the remaining bytes in the datagram as a string, but does not extract them from the iterator.
int getRemainingSize | ( | ) |
Return the bytes left in the datagram.
float getStdfloat | ( | ) |
Extracts either a 32-bit or a 64-bit floating-point number, according to Datagram::set_stdfloat_double().
str getString | ( | ) |
Extracts a variable-length string.
str getString32 | ( | ) |
Extracts a variable-length string with a 32-bit length field.
PNUint16 getUint16 | ( | ) |
Extracts an unsigned 16-bit integer.
PNUint32 getUint32 | ( | ) |
Extracts an unsigned 32-bit integer.
PNUint64 getUint64 | ( | ) |
Extracts an unsigned 64-bit integer.
PNUint8 getUint8 | ( | ) |
Extracts an unsigned 8-bit integer.
str getWstring | ( | ) |
Extracts a variable-length wstring (with a 32-bit length field).
str getZString | ( | ) |
Extracts a variable-length string, as a NULL-terminated string.
DatagramIterator operator= | ( | const DatagramIterator | copy | ) |
output | ( | Ostream | out | ) |
Write a string representation of this instance to <out>.
skipBytes | ( | size_t | size | ) |
Skips over the indicated number of bytes in the datagram.
write | ( | Ostream | out, |
unsigned int | indent | ||
) |
Write a string representation of this instance to <out>.