10 #include <gtest/gtest.h> 47 TEST(rtti, CObject_CLASSID)
54 TEST(rtti, MyDerived1_CLASSID)
61 EXPECT_TRUE(cid_myd1->getBaseClass() == cid_cobj);
84 TEST(rtti, CreateSmartPointerTypes)
90 EXPECT_EQ(
p->m_value, 0);
93 auto p = T::Create(123);
95 EXPECT_EQ(
p->m_value, 123);
98 auto p = T::CreateUnique();
100 EXPECT_EQ(
p->m_value, 0);
103 auto p = T::CreateUnique(123);
105 EXPECT_EQ(
p->m_value, 123);
109 auto p = T::CreateAlloc(alloc, 123);
111 EXPECT_EQ(
p->m_value, 123);
IMPLEMENTS_MRPT_OBJECT(CMultiObjMotionOpt_Scalarization, CMultiObjectiveMotionOptimizerBase, mrpt::nav) CMultiObjMotionOpt_Scalarization
Virtual base to provide a compiler-independent RTTI system.
TEST(rtti, CObject_CLASSID)
#define CLASS_ID(T)
Access to runtime class ID for a defined class name.
#define DEFINE_MRPT_OBJECT(class_name)
This declaration must be inserted in all CObject classes definition, within the class declaration...
#define IS_DERIVED(obj, class_name)
True if the given reference to object (derived from mrpt::rtti::CObject) is an instance of the given ...
Aligned allocator that is compatible with C++11.
GLsizei const GLchar ** string
#define CLASS_ID_NAMESPACE(class_name, namespaceName)
static const mrpt::rtti::TRuntimeClassId & GetRuntimeClassIdStatic()
#define IMPLEMENTS_MRPT_OBJECT_NS_PREFIX(class_name, base, NameSpace)
This must be inserted in all CObject classes implementation files.
mrpt::rtti::CObject::Ptr classFactory(const std::string &className)
Creates an object given by its registered name.
void registerClass(const mrpt::rtti::TRuntimeClassId *pNewClass)
Register a class into the MRPT internal list of "CObject" descendents.
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
std::shared_ptr< CObject > Ptr