![]() |
dbus-cxx
|
Implements the marshaling algorithms on a given vector of data. More...
#include <marshaling.h>
Public Member Functions | |
| Marshaling () | |
| Marshaling (std::vector< uint8_t > *data, Endianess endian) | |
| Create a new Marshaling class that operates on the given vector of data, with the given endianess. More... | |
| ~Marshaling () | |
| void | set_data (std::vector< uint8_t > *data) |
| Set the data vector to marshal/demarshal. More... | |
| void | set_endianess (Endianess endian) |
| void | marshal (bool v) |
| void | marshal (uint8_t v) |
| void | marshal (int16_t v) |
| void | marshal (uint16_t v) |
| void | marshal (int32_t v) |
| void | marshal (uint32_t v) |
| void | marshal (int64_t v) |
| void | marshal (uint64_t v) |
| void | marshal (double v) |
| void | marshal (std::string v) |
| void | marshal (Path v) |
| void | marshal (Signature v) |
| void | marshal (const Variant &v) |
| void | align (int alignment) |
| void | marshal_at_offset (uint32_t offset, uint32_t value) |
| Marshal a uint32_t value at the given offset. More... | |
| uint32_t | currentOffset () const |
Private Member Functions | |
| void | marshalShortBig (uint16_t toMarshal) |
| void | marshalIntBig (uint32_t toMarshal) |
| void | marshalLongBig (uint64_t toMarshal) |
| void | marshalShortLittle (uint16_t toMarshal) |
| void | marshalIntLittle (uint32_t toMarshal) |
| void | marshalLongLittle (uint64_t toMarshal) |
Private Attributes | |
| std::shared_ptr< priv_data > | m_priv |
Implements the marshaling algorithms on a given vector of data.
Note that all marshal() methods will always append to the given buffer.
| Marshaling::Marshaling | ( | ) |
References m_priv.
| Marshaling::Marshaling | ( | std::vector< uint8_t > * | data, |
| Endianess | endian | ||
| ) |
Create a new Marshaling class that operates on the given vector of data, with the given endianess.
References m_priv.
| Marshaling::~Marshaling | ( | ) |
| void Marshaling::align | ( | int | alignment | ) |
References m_priv.
Referenced by marshal(), marshalIntBig(), marshalIntLittle(), marshalLongBig(), marshalLongLittle(), marshalShortBig(), marshalShortLittle(), DBus::Variant::recurseArray(), DBus::Variant::recurseDictEntry(), DBus::Variant::recurseStruct(), DBus::Variant::remarshal(), and DBus::Message::serialize_to_vector().
| uint32_t Marshaling::currentOffset | ( | ) | const |
References m_priv.
| void Marshaling::marshal | ( | bool | v | ) |
| void Marshaling::marshal | ( | const Variant & | v | ) |
| void Marshaling::marshal | ( | double | v | ) |
References DBus::Big, m_priv, marshalLongBig(), and marshalLongLittle().
| void Marshaling::marshal | ( | int16_t | v | ) |
References DBus::Big, m_priv, marshalShortBig(), and marshalShortLittle().
| void Marshaling::marshal | ( | int32_t | v | ) |
References DBus::Big, m_priv, marshalIntBig(), and marshalIntLittle().
| void Marshaling::marshal | ( | int64_t | v | ) |
References DBus::Big, m_priv, marshalLongBig(), and marshalLongLittle().
| void Marshaling::marshal | ( | Signature | v | ) |
References m_priv, and DBus::Signature::str().
| void Marshaling::marshal | ( | uint16_t | v | ) |
References DBus::Big, m_priv, marshalShortBig(), and marshalShortLittle().
| void Marshaling::marshal | ( | uint32_t | v | ) |
References DBus::Big, m_priv, marshalIntBig(), and marshalIntLittle().
| void Marshaling::marshal | ( | uint64_t | v | ) |
References DBus::Big, m_priv, marshalLongBig(), and marshalLongLittle().
| void Marshaling::marshal | ( | uint8_t | v | ) |
References m_priv.
| void Marshaling::marshal_at_offset | ( | uint32_t | offset, |
| uint32_t | value | ||
| ) |
Marshal a uint32_t value at the given offset.
This is only used to update the length of a marshaled array.
| offset | The location to set the value |
| value | The actual value to set. |
References DBus::Little, m_priv, and value.
Referenced by DBus::Message::serialize_to_vector().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| void Marshaling::set_data | ( | std::vector< uint8_t > * | data | ) |
|
private |