Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
Class< T, B, I > Class Template Reference

#include <elm/rtti/Class.h>

+ Inheritance diagram for Class< T, B, I >:

Public Member Functions

 Class (CString name, const AbstractClass &base=type_of< B >().asClass())
 
 Class (const make &m)
 
voidinstantiate (void) const override
 
void free (void *obj) const override
 
voidupCast (void *ptr) const override
 
voiddownCast (void *ptr) const override
 
voidupCast (void *ptr, const AbstractClass &cls) const
 
voiddownCast (void *ptr, const AbstractClass &cls) const
 
const voidupCast (const void *ptr) const
 
const voiddownCast (const void *ptr) const
 
const voidupCast (const void *ptr, const AbstractClass &cls) const
 
const voiddownCast (const void *ptr, const AbstractClass &cls) const
 
- Public Member Functions inherited from AbstractClass
 AbstractClass (CString name, const AbstractClass &base)
 
 AbstractClass (const make &m)
 
 AbstractClass (const make &m, const AbstractClass &base)
 
const AbstractClassbase (void) const
 
bool baseOf (const AbstractClass *clazz)
 
virtual bool isClass (void) const
 
virtual const AbstractClassasClass (void) const
 
virtual const TupletoTuple () const
 
voidupCast (void *ptr, const AbstractClass &cls) const
 
voiddownCast (void *ptr, const AbstractClass &cls) const
 
const voidupCast (const void *ptr) const
 
const voiddownCast (const void *ptr) const
 
const voidupCast (const void *ptr, const AbstractClass &cls) const
 
const voiddownCast (const void *ptr, const AbstractClass &cls) const
 
const List< Operation * > & operations (void) const
 
const List< const Type * > params (void) const
 
- Public Member Functions inherited from Type
 Type (string name="")
 
virtual ~Type (void)
 
string name (void) const
 
const PointerTypepointer (void) const
 
virtual bool canCast (const Type *t) const
 
virtual bool isVoid (void) const
 
virtual bool isBool (void) const
 
virtual bool isInt (void) const
 
virtual bool isFloat (void) const
 
virtual bool isPtr (void) const
 
virtual const PointerTypeasPtr (void) const
 
virtual bool isEnum (void) const
 
virtual const EnumerableasEnum (void) const
 
virtual bool isSerial (void) const
 
virtual const SerializableasSerial (void) const
 
virtual const TemplateTypeasTemplate (void) const
 
virtual const InstanceTypeasInstance (void) const
 
virtual const ParamTypeasParam (void) const
 
void initialize (void)
 
bool operator== (const Type &t) const
 
bool operator!= (const Type &t) const
 

Additional Inherited Members

- Public Types inherited from Type
typedef HashMap< string, const Type * >::Iter TypeIter
 
- Static Public Member Functions inherited from Type
static const Typeget (string name)
 
static TypeIter types (void)
 
- Static Public Attributes inherited from Type
static const Typeparam0
 
static const Typeparam1
 
static const Typeparam2
 
static const Typeparam3
 

Detailed Description

template<class T, class B = void, template< class _ > class I = inst>
class elm::rtti::Class< T, B, I >

Type for top-level Object class.

Type building for a class.

Parameters
TC++ type of the class this descriptor is used for.

Constructor & Destructor Documentation

◆ Class() [1/2]

Class ( CString  name,
const AbstractClass< T, B, I > &  base = type_of<B>().asClass< T, B, I >() 
)
inline

◆ Class() [2/2]

Class ( const make m)
inline

Member Function Documentation

◆ downCast() [1/4]

const void* downCast ( const void ptr) const
inline

◆ downCast() [2/4]

const void* downCast ( const void ptr,
const AbstractClass< T, B, I > &  cls 
) const
inline

◆ downCast() [3/4]

void* downCast ( void ptr) const
inlineoverridevirtual

Cast a pointer from the base type to the current type. Default implementation is the identity.

Parameters
ptrPointer to the base type.
Returns
Pointer to the current type.

Reimplemented from AbstractClass.

◆ downCast() [4/4]

void* downCast ( void ptr,
const AbstractClass< T, B, I > &  cls 
) const
inline

◆ free()

void free ( void obj) const
inlineoverridevirtual

Free an object corresponding to the current class.

Parameters
objObject to free.

Implements AbstractClass.

◆ instantiate()

void* instantiate ( void  ) const
inlineoverridevirtual

Call this function to get a new allocated fresh object of the corresponding class. This function must be overridden to perform the actual allocation and the class must support constructor without any argument.

Returns
Allocated instance of class.

Implements AbstractClass.

References elm::_.

◆ upCast() [1/4]

const void* upCast ( const void ptr) const
inline

◆ upCast() [2/4]

const void* upCast ( const void ptr,
const AbstractClass< T, B, I > &  cls 
) const
inline

◆ upCast() [3/4]

void* upCast ( void ptr) const
inlineoverridevirtual

Cast a pointer from the current to the base type of this type. Default implementation is the identity.

Parameters
ptrPointer to the current type.
Returns
Pointer to the base type.

Reimplemented from AbstractClass.

◆ upCast() [4/4]

void* upCast ( void ptr,
const AbstractClass< T, B, I > &  cls 
) const
inline

The documentation for this class was generated from the following file: