#include <mrpt/utils/CSerializable.h>
Public Member Functions | |
virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
Returns information about the class of an object in runtime. | |
virtual CSerializable * | duplicate () const =0 |
Returns a copy of the object, independtly of its class. | |
CSerializable * | clone () const |
Cloning interface for smart pointers. | |
virtual | ~CSerializable () |
Static Public Attributes | |
static const mrpt::utils::TRuntimeClassId | classCSerializable |
Protected Member Functions | |
virtual void | writeToStream (mrpt::utils::CStream &out, int *getVersion) const =0 |
Introduces a pure virtual method responsible for writing to a CStream. | |
virtual void | readFromStream (mrpt::utils::CStream &in, int version)=0 |
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori. | |
Static Protected Member Functions | |
static mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
Friends | |
class | mrpt::utils::CStream |
For each class named CMyClass
, a new type named CMyClassPtr
will be created as a smart pointer suitable for keeping referencing count smart pointers to objects of that class. By default the base class of all these smart pointers is CSerializablePtr. Refer to the tutorial about serialization in the wiki.
Definition at line 129 of file CSerializable.h.
virtual mrpt::utils::CSerializable::~CSerializable | ( | ) | [virtual] |
static mrpt::utils::TRuntimeClassId* mrpt::utils::CSerializable::_GetBaseClass | ( | ) | [static, protected] |
CSerializable* mrpt::utils::CSerializable::clone | ( | ) | const [inline] |
Cloning interface for smart pointers.
Reimplemented in mrpt::opengl::CRenderizable.
Definition at line 146 of file CSerializable.h.
virtual CSerializable* mrpt::utils::CSerializable::duplicate | ( | ) | const [pure virtual] |
Returns a copy of the object, independtly of its class.
virtual const mrpt::utils::TRuntimeClassId* mrpt::utils::CSerializable::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
virtual void mrpt::utils::CSerializable::readFromStream | ( | mrpt::utils::CStream & | in, | |
int | version | |||
) | [protected, pure virtual] |
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.
in | The input binary stream where the object data must read from. | |
version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
std::exception | On any error, see CStream::ReadBuffer |
virtual void mrpt::utils::CSerializable::writeToStream | ( | mrpt::utils::CStream & | out, | |
int * | getVersion | |||
) | const [protected, pure virtual] |
Introduces a pure virtual method responsible for writing to a CStream.
This can not be used directly be users, instead use "stream << object;" for writing it to a stream.
out | The output binary stream where object must be dumped. | |
getVersion | If NULL, the object must be dumped. If not, only the version of the object dump must be returned in this pointer. This enables the versioning of objects dumping and backward compatibility with previously stored data. |
std::exception | On any error, see CStream::WriteBuffer |
friend class mrpt::utils::CStream [friend] |
Definition at line 135 of file CSerializable.h.
Definition at line 134 of file CSerializable.h.
Page generated by Doxygen 1.5.7.1 for MRPT 0.7.1 SVN: at Mon Aug 17 22:58:25 EDT 2009 |