Serialization (marshalling) portable library for C++ objects persistence.
Back to list of all libraries | See all modules
[New in MRPT 2.0.0]
This library is part of MRPT and can be installed in Debian-based systems with:
sudo apt install libmrpt-serialization-dev
Main classes and concepts associated with this library:
Serialization happens via archive << object
operators in all cases but, underneath, two mechanisms are provided:
<<
/>>
operators for mrpt::serialization::CArchive objects.Support for STL containers is provided via this "direct mechanism" for the container structure itself, but contained elements can use any of the serialization mechanisms.
Serializing shared_ptr<T>
is supported for any arbitrary type T
. It is legal to serialize an empty (nullptr
) smart pointer; an empty pointer will be read back. Polymorphic classes can be also writen and read, although reading a smart pointer to a polymorphic base class is only supported for classes derived from MRPT's CSerializable, since that operation requires registering types in a class factory (see mrpt_rtti_grp and mrpt::serialization::CSerializable).
See: serialization_stl/test.cpp
Output:
See: serialization_stl/test.cpp
Output:
Write me!
Write me!
Classes | |
class | mrpt::serialization::CArchive |
Virtual base class for "archives": classes abstracting I/O streams. More... | |
class | mrpt::serialization::CMessage |
A class that contain generic messages, that can be sent and received from a "CClientTCPSocket" object. More... | |
class | mrpt::serialization::CSerializable |
The virtual base class which provides a unified interface for all persistent objects in MRPT. More... | |
Modules | |
Non-CStream serialization functions (in | |
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 |