Main Page Modules Class Hierarchy Compound List File List Compound Members

# cClassRegister Class Reference

`#include <ctypes.h>`

Inheritance diagram for cClassRegister::

List of all members.

## Public Methods

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

## 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

## Constructor & Destructor Documentation

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

| Copy constructor.

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

| Constructor.

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

| Destructor.

## Member Function Documentation

void * 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 by hand.

cObject * 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 cException when called.

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

- ctypes.h