MRPT logo

mrpt::utils::CSerializable Class Reference

The virtual base class which provides a unified interface for all persistent objects in MRPT. More...

#include <mrpt/utils/CSerializable.h>

Inheritance diagram for mrpt::utils::CSerializable:

mrpt::gui::CDisplayWindow mrpt::gui::CDisplayWindow3D mrpt::gui::CDisplayWindowPlots mrpt::math::CMatrix mrpt::math::CMatrixB mrpt::math::CMatrixD mrpt::math::CPolygon mrpt::math::CSplineInterpolator1D mrpt::opengl::COpenGLScene mrpt::opengl::COpenGLViewport mrpt::opengl::CRenderizable mrpt::poses::CPointPDF mrpt::poses::CPose3DInterpolator mrpt::poses::CPose3DPDF mrpt::poses::CPoseOrPoint mrpt::poses::CPosePDF mrpt::poses::CPoses2DSequence mrpt::poses::CPoses3DSequence mrpt::poses::TSimple3DPoint mrpt::reactivenav::CHolonomicLogFileRecord mrpt::reactivenav::CLogFileRecord mrpt::slam::CAction mrpt::slam::CActionCollection mrpt::slam::CIncrementalMapPartitioner mrpt::slam::CLandmark mrpt::slam::CMetricMap mrpt::slam::CMultiMetricMapPDF mrpt::slam::CObservation mrpt::slam::CRawlog mrpt::slam::CRawlogXXL mrpt::slam::CRBPFParticleData mrpt::slam::CSensFrameProbSequence mrpt::slam::CSensoryFrame mrpt::utils::CMemoryChunk mrpt::utils::CMHPropertiesValuesList mrpt::utils::CMRPTImage mrpt::utils::CMRPTImageFloat mrpt::utils::CPropertiesValuesList mrpt::utils::CSimpleDatabase mrpt::utils::CSimpleDatabaseTable mrpt::utils::CStringList mrpt::utils::CTypeSelector mrpt::vision::CFeature

List of all members.

Public Member Functions

virtual const
mrpt::utils::TRuntimeClassId
GetRuntimeClass () const
 Returns information about the class of an object in runtime.
virtual CSerializableduplicate () const =0
 Returns a copy of the object, independtly of its class.
CSerializableclone () 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


Detailed Description

The virtual base class which provides a unified interface for all persistent objects in MRPT.

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.

See also:
CStream

Definition at line 247 of file CSerializable.h.


Constructor & Destructor Documentation

virtual mrpt::utils::CSerializable::~CSerializable (  )  [virtual]


Member Function Documentation

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 264 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.

Parameters:
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.
Exceptions:
std::exception On any error, see CStream::ReadBuffer
See also:
CStream

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.

Parameters:
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.
Exceptions:
std::exception On any error, see CStream::WriteBuffer
See also:
CStream


Friends And Related Function Documentation

friend class mrpt::utils::CStream [friend]

Definition at line 253 of file CSerializable.h.


Member Data Documentation

Definition at line 252 of file CSerializable.h.




Page generated by Doxygen 1.5.9 for MRPT 0.6.5 SVN: at Sun Aug 2 11:39:56 CDT 2009