MRPT  1.9.9
MyNS::MyDerived1 Class Reference

Detailed Description

Definition at line 16 of file rtti_unittest.cpp.

Inheritance diagram for MyNS::MyDerived1:

Public Member Functions

 MyDerived1 ()=default
 
 MyDerived1 (int v)
 
RTTI classes and functions for polymorphic hierarchies
mrpt::rtti::CObject::Ptr duplicateGetSmartPtr () const
 Makes a deep copy of the object and returns a smart pointer to it. More...
 

Public Attributes

int m_value {0}
 

RTTI stuff

using Ptr = std::shared_ptr< MyDerived1 >
 
using ConstPtr = std::shared_ptr< const MyDerived1 >
 
using UniquePtr = std::unique_ptr< MyDerived1 >
 
using ConstUniquePtr = std::unique_ptr< const MyDerived1 >
 
static const mrpt::rtti::TRuntimeClassId runtimeClassId
 
static constexpr const char * className = "MyDerived1"
 
virtual const mrpt::rtti::TRuntimeClassIdGetRuntimeClass () const override
 Returns information about the class of an object in runtime. More...
 
virtual mrpt::rtti::CObjectclone () const override
 Returns a deep copy (clone) of the object, indepently of its class. More...
 
static const mrpt::rtti::TRuntimeClassId_GetBaseClass ()
 
static constexpr auto getClassName ()
 
static const mrpt::rtti::TRuntimeClassIdGetRuntimeClassIdStatic ()
 
static std::shared_ptr< CObjectCreateObject ()
 
template<typename... Args>
static Ptr Create (Args &&... args)
 
template<typename Alloc , typename... Args>
static Ptr CreateAlloc (const Alloc &alloc, Args &&... args)
 
template<typename... Args>
static UniquePtr CreateUnique (Args &&... args)
 

Member Typedef Documentation

◆ ConstPtr

Definition at line 23 of file rtti_unittest.cpp.

◆ ConstUniquePtr

using MyNS::MyDerived1::ConstUniquePtr = std::unique_ptr<const MyDerived1 >

Definition at line 23 of file rtti_unittest.cpp.

◆ Ptr

A type for the associated smart pointer

Definition at line 23 of file rtti_unittest.cpp.

◆ UniquePtr

using MyNS::MyDerived1::UniquePtr = std::unique_ptr< MyDerived1 >

Definition at line 23 of file rtti_unittest.cpp.

Constructor & Destructor Documentation

◆ MyDerived1() [1/2]

MyNS::MyDerived1::MyDerived1 ( )
default

◆ MyDerived1() [2/2]

MyNS::MyDerived1::MyDerived1 ( int  v)
inline

Definition at line 22 of file rtti_unittest.cpp.

Member Function Documentation

◆ _GetBaseClass()

static const mrpt::rtti::TRuntimeClassId* MyNS::MyDerived1::_GetBaseClass ( )
staticprotected

◆ clone()

virtual mrpt::rtti::CObject* MyNS::MyDerived1::clone ( ) const
overridevirtual

Returns a deep copy (clone) of the object, indepently of its class.

Implements mrpt::rtti::CObject.

◆ Create()

template<typename... Args>
static Ptr MyNS::MyDerived1::Create ( Args &&...  args)
inlinestatic

Definition at line 23 of file rtti_unittest.cpp.

◆ CreateAlloc()

template<typename Alloc , typename... Args>
static Ptr MyNS::MyDerived1::CreateAlloc ( const Alloc &  alloc,
Args &&...  args 
)
inlinestatic

Definition at line 23 of file rtti_unittest.cpp.

◆ CreateObject()

static std::shared_ptr<CObject> MyNS::MyDerived1::CreateObject ( )
static

◆ CreateUnique()

template<typename... Args>
static UniquePtr MyNS::MyDerived1::CreateUnique ( Args &&...  args)
inlinestatic

Definition at line 23 of file rtti_unittest.cpp.

◆ duplicateGetSmartPtr()

mrpt::rtti::CObject::Ptr CObject::duplicateGetSmartPtr ( ) const
inlineinherited

Makes a deep copy of the object and returns a smart pointer to it.

Definition at line 191 of file CObject.h.

References mrpt::rtti::CObject::clone().

Referenced by mrpt::obs::CRawlog::addActions(), and mrpt::obs::CRawlog::addObservations().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getClassName()

static constexpr auto MyNS::MyDerived1::getClassName ( )
inlinestatic

Definition at line 23 of file rtti_unittest.cpp.

◆ GetRuntimeClass()

virtual const mrpt::rtti::TRuntimeClassId* MyNS::MyDerived1::GetRuntimeClass ( ) const
overridevirtual

Returns information about the class of an object in runtime.

Reimplemented from mrpt::rtti::CObject.

◆ GetRuntimeClassIdStatic()

static const mrpt::rtti::TRuntimeClassId& MyNS::MyDerived1::GetRuntimeClassIdStatic ( )
static

Member Data Documentation

◆ className

constexpr const char* MyNS::MyDerived1::className = "MyDerived1"
static

Definition at line 23 of file rtti_unittest.cpp.

◆ m_value

int MyNS::MyDerived1::m_value {0}

Definition at line 19 of file rtti_unittest.cpp.

◆ runtimeClassId

const mrpt::rtti::TRuntimeClassId MyNS::MyDerived1::runtimeClassId
staticprotected

Definition at line 23 of file rtti_unittest.cpp.




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 1de0e027c Sat Sep 14 16:15:22 2019 +0200 at sáb sep 14 16:20:14 CEST 2019