10 #include <gtest/gtest.h> 47 TEST(rtti, CObject_CLASSID)
54 TEST(rtti, MyDerived1_CLASSID)
59 std::string(cid_myd1->className) == std::string(
"MyNS::MyDerived1"));
86 TEST(rtti, CreateSmartPointerTypes)
95 auto p = T::Create(123);
100 auto p = T::CreateUnique();
105 auto p = T::CreateUnique(123);
111 auto p = T::CreateAlloc(alloc, 123);
EXPECT_TRUE(mrpt::system::fileExists(ini_fil))
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 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.
#define CLASS_ID_NAMESPACE(class_name, namespaceName)
static const mrpt::rtti::TRuntimeClassId & GetRuntimeClassIdStatic()
EXPECT_EQ(out.image_pair_was_used.size(), NUM_IMGS)
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.
#define DEFINE_MRPT_OBJECT(class_name, NameSpace)
This declaration must be inserted in all CObject classes definition, within the class declaration...
std::shared_ptr< CObject > Ptr