Class DrObjectBase

Synopsis

#include <lib/inc/drogon/DrObject.h>

class DrObjectBase

Description

The base class for all drogon reflection classes.

Inheritance

Decsendents: DrObject, HttpSimpleControllerBase, PluginBase, HttpFilterBase, WebSocketControllerBase, DrTemplateBase

Methods

~DrObjectBase
classNameGet the class name.
isClassReturn true if the class name is 'class_name'.

Source

Lines 32-56 in lib/inc/drogon/DrObject.h.

class DrObjectBase
{
  public:
    /**
     * @brief Get the class name
     *
     * @return const std::string& the class name
     */
    virtual const std::string &className() const
    {
        static const std::string name{"DrObjectBase"};
        return name;
    }

    /**
     * @brief Return true if the class name is 'class_name'
     */
    virtual bool isClass(const std::string &class_name) const
    {
        return (className() == class_name);
    }
    virtual ~DrObjectBase()
    {
    }
};





Add Discussion as Guest

Log in to DocsForge