15 #ifndef DATAGRAMITERATOR_H
16 #define DATAGRAMITERATOR_H
18 #include "pandabase.h"
21 #include "numeric_types.h"
32 INLINE
void assign(
Datagram &datagram,
size_t offset = 0);
36 INLINE DatagramIterator(
const Datagram &datagram,
size_t offset = 0);
37 INLINE DatagramIterator(
const DatagramIterator ©);
38 INLINE
void operator = (
const DatagramIterator ©);
39 INLINE ~DatagramIterator();
41 INLINE
bool get_bool();
42 INLINE PN_int8 get_int8();
43 INLINE PN_uint8 get_uint8();
45 INLINE PN_int16 get_int16();
46 INLINE PN_int32 get_int32();
47 INLINE PN_int64 get_int64();
48 INLINE PN_uint16 get_uint16();
49 INLINE PN_uint32 get_uint32();
50 INLINE PN_uint64 get_uint64();
51 INLINE PN_float32 get_float32();
52 INLINE PN_float64 get_float64();
53 INLINE PN_stdfloat get_stdfloat();
55 INLINE PN_int16 get_be_int16();
56 INLINE PN_int32 get_be_int32();
57 INLINE PN_int64 get_be_int64();
58 INLINE PN_uint16 get_be_uint16();
59 INLINE PN_uint32 get_be_uint32();
60 INLINE PN_uint64 get_be_uint64();
61 INLINE PN_float32 get_be_float32();
62 INLINE PN_float64 get_be_float64();
65 string get_string32();
66 string get_z_string();
67 string get_fixed_string(
size_t size);
68 wstring get_wstring();
70 INLINE
void skip_bytes(
size_t size);
71 string extract_bytes(
size_t size);
72 size_t extract_bytes(
unsigned char *into,
size_t size);
74 INLINE
string get_remaining_bytes()
const;
75 INLINE
int get_remaining_size()
const;
77 INLINE
const Datagram &get_datagram()
const;
78 INLINE
size_t get_current_index()
const;
80 void output(ostream &out)
const;
81 void write(ostream &out,
unsigned int indent=0)
const;
85 size_t _current_index;
91 static void init_type() {
92 register_type(_type_handle,
"DatagramIterator");
117 #include "datagramIterator.I"
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...