|
MRPT
1.9.9
|
Serialization (marshalling) portable library for C++ objects persistence.
Back to list of all libraries | See all modules
mrpt-serialization[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).
CStreamsSee: serialization_stl/test.cpp
Output:
std::ostream and std::istreamSee: 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 | |
| #include <mrpt/serializatin/CSerializable.h>) | |
| Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020 |