namespace mrpt_test
Overview
namespace mrpt_test { // global functions void writeLegacyObjectFrame( mrpt::io::CMemoryStream& buf, const std::string& className, uint8_t version, const std::function<void(mrpt::serialization::CArchive&)>& writePayload ); void writeLegacyRenderHeader( mrpt::serialization::CArchive& arch, uint8_t renderVersion = 4, const std::string& name = std::string(), const mrpt::img::TColor& color = mrpt::img::TColor(0xff, 0xff, 0xff, 0xff) ); } // namespace mrpt_test
Global Functions
void writeLegacyObjectFrame( mrpt::io::CMemoryStream& buf, const std::string& className, uint8_t version, const std::function<void(mrpt::serialization::CArchive&)>& writePayload )
Writes an MRPT object frame (class name, streaming version, payload and end flag) with an arbitrary version number, so that the backwards-compatibility branches of serializeFrom() can be exercised without shipping binary fixture files.
The stream is left rewound and ready to be read back.
void writeLegacyRenderHeader( mrpt::serialization::CArchive& arch, uint8_t renderVersion = 4, const std::string& name = std::string(), const mrpt::img::TColor& color = mrpt::img::TColor(0xff, 0xff, 0xff, 0xff) )
Emits the header that every mrpt::viz class writes first via CVisualObject::writeToStreamRender(), at an arbitrary version of that header (0..4), which is versioned independently of the class itself.
Scales are always written as “all unity”, the common case, so the caller need not care about the scale bits of the magic signature.