Go to the documentation of this file.
20 namespace serialization
22 template <
class Derived>
32 template <
class Derived>
37 Derived&
derived() {
return static_cast<Derived&
>(*this); }
40 return static_cast<const Derived&
>(*this);
44 template <
class Derived>
49 template <
class Derived>
52 out << static_cast<uint64_t>(derived().getTotalBytesCount());
53 if (derived().getTotalBytesCount())
55 ASSERT_(derived().getRawBufferData());
57 derived().getRawBufferData(), derived().getTotalBytesCount());
60 template <
class Derived>
69 derived().changeSize(N);
71 if (N)
in.ReadBuffer(derived().getRawBufferData(), N);
uint8_t serializeGetVersion() const override
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define ASSERT_(f)
Defines an assertion mechanism.
Virtual base class for "archives": classes abstracting I/O streams.
mrpt::io::CMemoryStream CMemoryStream
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
void WriteBuffer(const void *Buffer, size_t Count)
Writes a block of bytes to the stream from Buffer.
unsigned __int64 uint64_t
The virtual base class which provides a unified interface for all persistent objects in MRPT.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
const Derived & derived() const
void serializeTo(mrpt::serialization::CArchive &out) const override
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
A memory buffer (implements CStream) which can be itself serialized.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at mié 12 jul 2023 10:03:34 CEST | |