10 #include <gtest/gtest.h> 36 TEST(Serialization, CustomClassSerialize)
51 EXPECT_EQ(
a.value,
b.value);
IMPLEMENTS_SERIALIZABLE(Foo, CSerializable, MyNS)
CArchiveStreamBase< STREAM > archiveFrom(STREAM &s)
Helper function to create a templatized wrapper CArchive object for a: MRPT's CStream, std::istream, std::ostream, std::stringstream.
#define CLASS_ID(T)
Access to runtime class ID for a defined class name.
This CStream derived class allow using a memory buffer as a CStream.
uint64_t Seek(int64_t Offset, CStream::TSeekOrigin Origin=sFromBeginning) override
Introduces a pure virtual method for moving to a specified position in the streamed resource...
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Virtual base class for "archives": classes abstracting I/O streams.
The virtual base class which provides a unified interface for all persistent objects in MRPT...
void registerClass(const mrpt::rtti::TRuntimeClassId *pNewClass)
Register a class into the MRPT internal list of "CObject" descendents.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
GLsizei const GLfloat * value
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
GLubyte GLubyte GLubyte a
TEST(Observations, WriteReadToMem)