Main MRPT website > C++ reference for MRPT 1.4.0
List of all members | Public Member Functions | Static Public Attributes | Static Protected Member Functions
mrpt::utils::CObject Class Referenceabstract

Detailed Description

The virtual base class of all MRPT classes with a unified RTTI system.

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

See also
mrpt::utils::CSerializable

Definition at line 119 of file CObject.h.

#include <mrpt/utils/CObject.h>

Inheritance diagram for mrpt::utils::CObject:
Inheritance graph

Public Member Functions

virtual const mrpt::utils::TRuntimeClassIdGetRuntimeClass () const
 Returns information about the class of an object in runtime.
 
virtual CObjectduplicate () const =0
 Returns a copy of the object, indepently of its class.
 
mrpt::utils::CObjectPtr duplicateGetSmartPtr () const
 Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).
 
CObjectclone () const
 Cloning interface for smart pointers.
 
virtual ~CObject ()
 

Static Public Attributes

static const mrpt::utils::TRuntimeClassId classCObject
 

Static Protected Member Functions

static mrpt::utils::TRuntimeClassId_GetBaseClass ()
 

Constructor & Destructor Documentation

◆ ~CObject()

virtual mrpt::utils::CObject::~CObject ( )
inlinevirtual

Definition at line 141 of file CObject.h.

Member Function Documentation

◆ _GetBaseClass()

static mrpt::utils::TRuntimeClassId * mrpt::utils::CObject::_GetBaseClass ( )
staticprotected

◆ clone()

CObject * mrpt::utils::CObject::clone ( ) const
inline

Cloning interface for smart pointers.

Definition at line 139 of file CObject.h.

◆ duplicate()

virtual CObject * mrpt::utils::CObject::duplicate ( ) const
pure virtual

Returns a copy of the object, indepently of its class.

Implemented in mrpt::gui::CDisplayWindow, mrpt::gui::CDisplayWindow3D, and mrpt::gui::CDisplayWindowPlots.

◆ duplicateGetSmartPtr()

mrpt::utils::CObjectPtr mrpt::utils::CObject::duplicateGetSmartPtr ( ) const
inline

Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).

Definition at line 136 of file CObject.h.

◆ GetRuntimeClass()

virtual const mrpt::utils::TRuntimeClassId * mrpt::utils::CObject::GetRuntimeClass ( ) const
inlinevirtual

Returns information about the class of an object in runtime.

Reimplemented in mrpt::gui::CBaseGUIWindow, mrpt::gui::CDisplayWindow, mrpt::gui::CDisplayWindow3D, and mrpt::gui::CDisplayWindowPlots.

Definition at line 127 of file CObject.h.

References CLASS_ID.

Member Data Documentation

◆ classCObject

const mrpt::utils::TRuntimeClassId mrpt::utils::CObject::classCObject
static

Definition at line 124 of file CObject.h.




Page generated by Doxygen 1.9.8 for MRPT 1.4.0 SVN: at Thu Dec 14 17:13:25 UTC 2023