41 INLINE
Datagram(
const void *data,
size_t size);
42 INLINE
explicit Datagram(vector_uchar data);
51 void dump_hex(std::ostream &out,
unsigned int indent=0)
const;
53 INLINE
void add_bool(
bool value);
54 INLINE
void add_int8(int8_t value);
55 INLINE
void add_uint8(uint8_t value);
58 INLINE
void add_int16(int16_t value);
59 INLINE
void add_int32(int32_t value);
60 INLINE
void add_int64(int64_t value);
61 INLINE
void add_uint16(uint16_t value);
62 INLINE
void add_uint32(uint32_t value);
63 INLINE
void add_uint64(uint64_t value);
64 INLINE
void add_float32(PN_float32 value);
65 INLINE
void add_float64(PN_float64 value);
66 INLINE
void add_stdfloat(PN_stdfloat value);
69 INLINE
void add_be_int16(int16_t value);
70 INLINE
void add_be_int32(int32_t value);
71 INLINE
void add_be_int64(int64_t value);
72 INLINE
void add_be_uint16(uint16_t value);
73 INLINE
void add_be_uint32(uint32_t value);
74 INLINE
void add_be_uint64(uint64_t value);
75 INLINE
void add_be_float32(PN_float32 value);
76 INLINE
void add_be_float64(PN_float64 value);
78 INLINE
void add_string(
const std::string &str);
79 INLINE
void add_string32(
const std::string &str);
80 INLINE
void add_z_string(
const std::string &str);
81 INLINE
void add_fixed_string(
const std::string &str,
size_t size);
82 void add_wstring(
const std::wstring &str);
84 INLINE
void add_blob(
const vector_uchar &);
85 INLINE
void add_blob32(
const vector_uchar &);
87 void pad_bytes(
size_t size);
88 void append_data(
const void *data,
size_t size);
89 INLINE
void append_data(
const vector_uchar &data);
92 void assign(
const void *data,
size_t size);
94 INLINE std::string get_message()
const;
95 INLINE
const void *get_data()
const;
98 EXTENSION(INLINE PyObject *get_message()
const);
99 EXTENSION(INLINE PyObject *__bytes__()
const);
100 EXTENSION(PyObject *__reduce__()
const);
102 INLINE
size_t get_length()
const;
104 INLINE
void set_array(PTA_uchar data);
107 INLINE PTA_uchar modify_array();
109 INLINE
void set_stdfloat_double(
bool stdfloat_double);
110 INLINE
bool get_stdfloat_double()
const;
112 INLINE
bool operator == (
const Datagram &other)
const;
113 INLINE
bool operator != (
const Datagram &other)
const;
114 INLINE
bool operator < (
const Datagram &other)
const;
116 void output(std::ostream &out)
const;
117 void write(std::ostream &out,
unsigned int indent=0)
const;
122#ifdef STDFLOAT_DOUBLE
123 bool _stdfloat_double =
true;
125 bool _stdfloat_double =
false;
136 TypedObject::get_class_type());
139 return get_class_type();
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...