Class Decoder

Class Documentation

class Decoder

Decoder is a class that decodes data from a buffer.

Public Functions

inline Decoder(ConstBuffer buffer, CdrVersion default_cdr = CdrVersion::DDS_CDR)
inline const CdrHeader &header() const
template<typename T>
inline void decode(T &out)

Decode a single value from the buffer.

Template Parameters:

T – The type of the value to decode.

Parameters:

out – The value to decode into.

template<typename T, typename Allocator>
inline void decode(std::vector<T, Allocator> &out)
template<typename T, size_t N>
inline void decode(std::array<T, N> &out)
inline void decode(std::string &out)
inline void decode(ConstBuffer &out)
inline void jump(size_t offset)
inline ConstBuffer currentBuffer() const

Get a view to the current buffer (bytes left to decode)