class SerTestNS::WithSchema
Overview
A class that does support schema-based (JSON,…) serialization.
#include </home/jlblanco/mrpt/modules/mrpt_serialization/tests/serialization_test_types.h> class WithSchema: public mrpt::serialization::CSerializable { public: // typedefs typedef std::shared_ptr<SerTestNS ::WithSchema> Ptr; typedef std::shared_ptr<const SerTestNS ::WithSchema> ConstPtr; typedef std::unique_ptr<SerTestNS ::WithSchema> UniquePtr; typedef std::unique_ptr<const SerTestNS ::WithSchema> ConstUniquePtr; // fields static constexpr const char* className = "SerTestNS" "::" "WithSchema"; int32_t m_int {0}; std::string m_str; // methods static constexpr auto getClassName(); static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic(); static std::shared_ptr<CObject> CreateObject(); 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); virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; virtual mrpt::rtti::CObject* clone() const; };
Inherited Members
public: // typedefs typedef std::shared_ptr<CSerializable> Ptr; typedef std::shared_ptr<const CSerializable> ConstPtr; // methods virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic();
Typedefs
typedef std::shared_ptr<SerTestNS ::WithSchema> Ptr
A type for the associated smart pointer.
Methods
virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const
Returns information about the class of an object in runtime.
virtual mrpt::rtti::CObject* clone() const
Returns a deep copy (clone) of the object, indepently of its class.