# cClassRegister Class Reference
[Internal classes]

`#include <ctypes.h>`

Inheritance diagram for cClassRegister:

List of all members.

## Detailed Description

The class behind the createOne() function and the Register_Class() macro.

Each instance is a factory for a particular class: it knows how to create an object of that class.

See also:
  createOne() function

  Register_Class() macro

## Public Member Functions

Constructors, destructor, assignment.
| cClassRegister (const cClassRegister &c)
| cClassRegister (const char *name, cPolymorphic *(*f)())
virtual | ~cClassRegister ()
cClassRegister & | operator= (const cClassRegister &)
Redefined cObject member functions.
virtual cPolymorphic * | dup () const
Factory function.
cPolymorphic * | createOne () const

## Constructor & Destructor Documentation

cClassRegister::cClassRegister | ( | const cClassRegister & | c | ) | `[inline]`

| Copy constructor.

cClassRegister::cClassRegister | ( | const char * | name,
|  | cPolymorphic *(*)() | f
| ) |

| Constructor.

virtual cClassRegister::~cClassRegister | ( |  | ) | `[inline, virtual]`

| Destructor.

## Member Function Documentation

cPolymorphic* cClassRegister::createOne | ( |  | ) | const`[inline]`

| Creates an instance of a particular class by calling the creator function. The result has to be cast to the appropriate type (preferably by dynamic_cast or check_and_cast).

virtual cPolymorphic* cClassRegister::dup | ( |  | ) | const`[inline, virtual]`

| Creates and returns an exact copy of this object. See cObject for more details. Reimplemented from cObject.

cClassRegister& cClassRegister::operator= | ( | const cClassRegister & |  | ) | `[inline]`

| Assignment is not supported by this class: this method throws a cRuntimeError when called.

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

- ctypes.h