template class mrpt::serialization::CArchiveStreamBase<std::vector<uint8_t>>¶
Specialization for std::vector, suitable for read/write, using the vector<uint8_t>
as the underlaying stream container.
Writing always happen at the end of the vector. Reading starts at the beggining upon construction of this wrapper class (via archiveFrom()
).
#include <mrpt/serialization/archiveFrom_std_vector.h> template <> class CArchiveStreamBase<std::vector<uint8_t>>: public mrpt::serialization::CArchive { public: // typedefs typedef std::shared_ptr<CArchive> Ptr; typedef std::unique_ptr<CArchive> UniquePtr; // construction CArchiveStreamBase(std::vector<uint8_t>& v); // methods template <typename TYPE_TO_STORE, typename TYPE_FROM_ACTUAL> CArchive& WriteAs(const TYPE_FROM_ACTUAL& value); void WriteObject(const CSerializable& o); };
Inherited Members¶
public: // methods size_t ReadBuffer(void* Buffer, size_t Count); template <typename T> size_t ReadBufferFixEndianness(T* ptr, size_t ElementCount); void WriteBuffer(const void* Buffer, size_t Count); template <typename T> void WriteBufferFixEndianness(const T* ptr, size_t ElementCount); template <typename STORED_TYPE, typename CAST_TO_TYPE> void ReadAsAndCastTo(CAST_TO_TYPE& read_here); template <typename STORED_TYPE> STORED_TYPE ReadAs(); void WriteObject(const CSerializable* o); CArchive& operator << (const std::monostate&); CSerializable::Ptr ReadObject(); template <typename T> T::Ptr ReadObject(); template <typename... T> std::variant<T...> ReadVariant(); template <typename T> void WriteVariant(T t); template <typename T> T ReadPOD(); void ReadObject(CSerializable* existingObj); void sendMessage(const CMessage& msg); bool receiveMessage(CMessage& msg); CArchive& operator << (const CSerializable& obj); CArchive& operator << (const CSerializable::Ptr& pObj); CArchive& operator >> (CSerializable& obj); CArchive& operator >> (CSerializable::Ptr& pObj);