Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Class Class Reference

The class class or meta class. More...

#include <Class.h>

Collaboration diagram for Class:

Collaboration graph
[legend]
List of all members.

Public Types

typedef DynamicObjectCreateFunction ())
 Object instantiation function.


Public Methods

 Class (const string name, const string sup, CreateFunction f)
 Constructor. More...

const string & name ()
 Returns the class name.

DynamicObjectcreate ()
 Creates an instance of the class.

bool isKindOf (Class *aClass)
 Returns true iff 'this' inherits from aClass. More...

bool isKindOf (const string super)
 Returns true iff 'this' inherits from the class with name super. More...


Static Public Methods

Class * find (const string &name)
 Return the class with name 'name' or NULL. More...

DynamicObjectCreate (const string &name)
 Create an instance of the class 'name' or NULL. More...


Detailed Description

The class class or meta class.

Note:
Class MT safe.
A Class stores class information abount a DynamicObject. With the static methods find and Create objects can be instantiated dynamically.


Constructor & Destructor Documentation

Class::Class const string    n,
const string    sup,
CreateFunction    f
 

Constructor.

Parameters:
name  The name of the class.
sup  The name of its super class.
f  A function that creates and returns an instance of the class.


Member Function Documentation

DynamicObject * Class::Create const string &    name [static]
 

Create an instance of the class 'name' or NULL.

Parameters:
name  Name of the Class with to find and instanciate.
Precondition:
none.
Returns:
  • Returns a pointer to a new instance of the class with name 'name'.
  • Returns NULL is the class name is not found.

Class * Class::find const string &    name [static]
 

Return the class with name 'name' or NULL.

Parameters:
name  Name of the Class instance to find.
Precondition:
none.
Returns:
  • Returns a pointer to the Class instance with name 'name'.
  • Returns NULL is the class is not found.

bool Class::isKindOf const string    superName
 

Returns true iff 'this' inherits from the class with name super.

Finds the class with name 'superName' and checks if 'this' inherits from 'superName'.

Parameters:
superName  The name of the class to check.
Precondition:
none.
Returns:
true iff 'this' inherits from 'superName'.

bool Class::isKindOf Class *    aClass
 

Returns true iff 'this' inherits from aClass.

Parameters:
aClass  Pointer to a Class instance.
Precondition:
none.
Returns:
true iff 'this' inherits from 'aClass'.


The documentation for this class was generated from the following files:
This documentation was generated using doxygen. If you have any comments or additions please mail me.