![]() |
nomlib
|
Root object hierarchy for object type identification (RTTI). More...
#include <IObject.hpp>
Public Types | |
| typedef IObject | self_type |
| typedef IObject * | raw_ptr |
Public Member Functions | |
| IObject (void) | |
| Default constructor. | |
| virtual | ~IObject (void) |
| Virtual destructor. | |
| virtual ObjectTypeInfo | type (void) const |
| Obtain the object's class type. | |
| virtual bool | is_type (const ObjectTypeInfo &rhs) const |
| Compare this object type with another object's type. | |
Static Public Member Functions | |
| template<typename Base, typename Derived> | |
| static bool | is_a (const Derived object) |
| Compare two objects to determine if a derived class inherits from a base class object. | |
| static void * | operator new (nom::size_type mem) |
| static void | operator delete (void *ptr) |
Static Public Attributes | |
| static uint64 | total_alloc_bytes |
| static uint64 | total_dealloc_bytes |
Root object hierarchy for object type identification (RTTI).
References (class design, ideas, inspiration):
http://stackoverflow.com/questions/5330835/why-is-stdtype-info-noncopyable-am-i-allowed-to-store-it-somewhere http://docs.wxwidgets.org/trunk/classwx_object.html http://docs.wxwidgets.org/trunk/classwx_class_info.html http://msdn.microsoft.com/en-us/library/system.object(v=vs.110).aspx?cs-save-lang=1&cs-lang=cpp#code-snippet-2
Definition at line 41 of file IObject.hpp.
| typedef IObject* nom::IObject::raw_ptr |
Definition at line 46 of file IObject.hpp.
| typedef IObject nom::IObject::self_type |
Definition at line 44 of file IObject.hpp.
|
inlinestatic |
Compare two objects to determine if a derived class inherits from a base class object.
Definition at line 104 of file IObject.hpp.
|
virtual |
Compare this object type with another object's type.
|
virtual |
Obtain the object's class type.
Generally, you can get away with a simple declaration, like so:
Reimplemented in nom::Decorator, nom::FinalFantasyDecorator, nom::FinalFantasyFrame, nom::Gradient, nom::IDrawable, nom::Line, nom::MinimalDecorator, nom::Rectangle, nom::Shape, nom::Sprite, nom::SpriteBatch, nom::Text, and nom::Transformable.
|
static |
Definition at line 48 of file IObject.hpp.
|
static |
Definition at line 49 of file IObject.hpp.