class SerTestNS::Bar

Overview

A second class, to check that class identities are enforced on reading.

#include </home/jlblanco/mrpt/modules/mrpt_serialization/tests/serialization_test_types.h>

class Bar: public mrpt::serialization::CSerializable
{
public:
    // typedefs

    typedef std::shared_ptr<SerTestNS ::Bar> Ptr;
    typedef std::shared_ptr<const SerTestNS ::Bar> ConstPtr;
    typedef std::unique_ptr<SerTestNS ::Bar> UniquePtr;
    typedef std::unique_ptr<const SerTestNS ::Bar> ConstUniquePtr;

    // fields

    static constexpr const char* className = "SerTestNS" "::" "Bar";
    double m_value {0};

    // 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;
    mrpt::rtti::CObject::Ptr duplicateGetSmartPtr() 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 ::Bar> 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.

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

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