29#ifndef NOMLIB_CORE_IOBJECT_HPP
30#define NOMLIB_CORE_IOBJECT_HPP
35#include "nomlib/config.hpp"
36#include "nomlib/core/ObjectTypeInfo.hpp"
48 static uint64 total_alloc_bytes;
49 static uint64 total_dealloc_bytes;
103 template <
typename Base,
typename Derived>
104 static bool is_a(
const Derived
object )
106 if(
dynamic_cast<Base
>(
object ) !=
nullptr )
114 static void*
operator new( nom::size_type mem );
115 static void operator delete(
void* ptr );
119inline bool operator ==(
const IObject& lhs,
const IObject& rhs )
121 return( &lhs == &rhs );
127 return ! ( &lhs == &rhs );
132#define NOM_ISA(type, expr) nom::IObject::is_a<type>( expr )
Root object hierarchy for object type identification (RTTI).
virtual bool is_type(const ObjectTypeInfo &rhs) const
Compare this object type with another object's type.
virtual ~IObject(void)
Virtual destructor.
IObject(void)
Default constructor.
static bool is_a(const Derived object)
Compare two objects to determine if a derived class inherits from a base class object.
virtual ObjectTypeInfo type(void) const
Obtain the object's class type.
Run-time type information (RTTI) container class.