# cFunctionType Class Reference
[Internal classes]

`#include <ctypes.h>`

Inheritance diagram for cFunctionType:

List of all members.

## Detailed Description

Registration class for extending NED with new functions.

Stores a function pointer (returning a double).

Objects of this class are usually created via the Define_Function() macro.

## Public Member Functions

Constructors, destructor, assignment
| cFunctionType (const cFunctionType &ft)
| cFunctionType (const char *name, MathFuncNoArg f, int argc=-1)
| cFunctionType (const char *name, MathFunc1Arg f, int argc=-1)
| cFunctionType (const char *name, MathFunc2Args f, int argc=-1)
| cFunctionType (const char *name, MathFunc3Args f, int argc=-1)
| cFunctionType (const char *name, MathFunc4Args f, int argc=-1)
virtual | ~cFunctionType ()
cFunctionType & | operator= (const cFunctionType &)
Redefined cObject member functions.
virtual cPolymorphic * | dup () const
Member access.
int | argCount ()
MathFunc | mathFunc ()
MathFuncNoArg | mathFuncNoArg ()
MathFunc1Arg | mathFunc1Arg ()
MathFunc2Args | mathFunc2Args ()
MathFunc3Args | mathFunc3Args ()
MathFunc4Args | mathFunc4Args ()

## Constructor & Destructor Documentation

cFunctionType::cFunctionType | ( | const cFunctionType & | ft | ) | `[inline]`

| Copy constructor.

cFunctionType::cFunctionType | ( | const char * | name,
|  | MathFuncNoArg | f,
|  | int | argc = `-1`
| ) |

| Constructor.

cFunctionType::cFunctionType | ( | const char * | name,
|  | MathFunc1Arg | f,
|  | int | argc = `-1`
| ) |

| Constructor.

cFunctionType::cFunctionType | ( | const char * | name,
|  | MathFunc2Args | f,
|  | int | argc = `-1`
| ) |

| Constructor.

cFunctionType::cFunctionType | ( | const char * | name,
|  | MathFunc3Args | f,
|  | int | argc = `-1`
| ) |

| Constructor.

cFunctionType::cFunctionType | ( | const char * | name,
|  | MathFunc4Args | f,
|  | int | argc = `-1`
| ) |

| Constructor.

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

| Destructor.

## Member Function Documentation

int cFunctionType::argCount | ( |  | ) | `[inline]`

| Argument count to function.

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

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

MathFunc cFunctionType::mathFunc | ( |  | ) | `[inline]`

| Returns function pointer as double function with unchecked arg list (no type safety!).

MathFunc1Arg cFunctionType::mathFunc1Arg | ( |  | ) |

| Returns function pointer as double function with 1 double arg. Throws exception is actual arg count is different.

MathFunc2Args cFunctionType::mathFunc2Args | ( |  | ) |

| Returns function pointer as double function with 2 double args. Throws exception is actual arg count is different.

MathFunc3Args cFunctionType::mathFunc3Args | ( |  | ) |

| Returns function pointer as double function with 3 double args. Throws exception is actual arg count is different.

MathFunc4Args cFunctionType::mathFunc4Args | ( |  | ) |

| Returns function pointer as double function with 4 double args. Throws exception is actual arg count is different.

MathFuncNoArg cFunctionType::mathFuncNoArg | ( |  | ) |

| Returns function pointer as double function with no args. Throws exception is actual arg count is different.

cFunctionType& cFunctionType::operator= | ( | const cFunctionType & |  | ) | `[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