14 #ifndef DATAGRAMITERATOR_H 15 #define DATAGRAMITERATOR_H 29 INLINE
void assign(
Datagram &datagram,
size_t offset = 0);
35 INLINE
bool get_bool();
36 INLINE int8_t get_int8();
37 INLINE uint8_t get_uint8();
39 INLINE int16_t get_int16();
40 INLINE int32_t get_int32();
41 INLINE int64_t get_int64();
42 INLINE uint16_t get_uint16();
43 INLINE uint32_t get_uint32();
44 INLINE uint64_t get_uint64();
45 INLINE PN_float32 get_float32();
46 INLINE PN_float64 get_float64();
47 INLINE PN_stdfloat get_stdfloat();
49 INLINE int16_t get_be_int16();
50 INLINE int32_t get_be_int32();
51 INLINE int64_t get_be_int64();
52 INLINE uint16_t get_be_uint16();
53 INLINE uint32_t get_be_uint32();
54 INLINE uint64_t get_be_uint64();
55 INLINE PN_float32 get_be_float32();
56 INLINE PN_float64 get_be_float64();
58 std::string get_string();
59 std::string get_string32();
60 std::string get_z_string();
61 std::string get_fixed_string(
size_t size);
62 std::wstring get_wstring();
64 INLINE vector_uchar get_blob();
65 INLINE vector_uchar get_blob32();
67 INLINE
void skip_bytes(
size_t size);
68 vector_uchar extract_bytes(
size_t size);
69 size_t extract_bytes(
unsigned char *into,
size_t size);
71 INLINE vector_uchar get_remaining_bytes()
const;
72 INLINE
size_t get_remaining_size()
const;
74 INLINE
const Datagram &get_datagram()
const;
75 INLINE
size_t get_current_index()
const;
77 void output(std::ostream &out)
const;
78 void write(std::ostream &out,
unsigned int indent=0)
const;
82 size_t _current_index;
88 static void init_type() {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...