cNEDMathFunction Class Reference
[Internal classes]

Registration class for extending NED with new functions. More...

#include <cnedmathfunction.h>

Inheritance diagram for cNEDMathFunction:
cNoncopyableOwnedObject cOwnedObject noncopyable cNamedObject cObject

List of all members.

Public Member Functions

Constructors, destructor, assignment

 cNEDMathFunction (const char *name, MathFuncNoArg f, int argc=-1, const char *category=NULL, const char *description=NULL)
 cNEDMathFunction (const char *name, MathFunc1Arg f, int argc=-1, const char *category=NULL, const char *description=NULL)
 cNEDMathFunction (const char *name, MathFunc2Args f, int argc=-1, const char *category=NULL, const char *description=NULL)
 cNEDMathFunction (const char *name, MathFunc3Args f, int argc=-1, const char *category=NULL, const char *description=NULL)
 cNEDMathFunction (const char *name, MathFunc4Args f, int argc=-1, const char *category=NULL, const char *description=NULL)
virtual ~cNEDMathFunction ()
Redefined cObject member functions.

virtual std::string info () const
Member access.

int getNumArgs () const
MathFunc getMathFunc () const
MathFuncNoArg getMathFuncNoArg () const
MathFunc1Arg getMathFunc1Arg () const
MathFunc2Args getMathFunc2Args () const
MathFunc3Args getMathFunc3Args () const
MathFunc4Args getMathFunc4Args () const
const char * getCategory () const
const char * getDescription () const

Static Public Member Functions

static cNEDMathFunctionfind (const char *name, int numArgs)
static cNEDMathFunctionget (const char *name, int numArgs)
static cNEDMathFunctionfindByPointer (MathFunc f)

Detailed Description

Registration class for extending NED with new functions.

Stores a pointer to a function taking up to 4 doubles as args and returning a double.

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


Member Function Documentation

static cNEDMathFunction* cNEDMathFunction::find ( const char *  name,
int  numArgs 
) [static]

Finds a registered function by name.

Returns NULL if not found.

static cNEDMathFunction* cNEDMathFunction::get ( const char *  name,
int  numArgs 
) [static]

Finds a registered function by name.

Throws an error if not found.

const char* cNEDMathFunction::getCategory (  )  const [inline]

Returns a string that can be useful in classifying NED functions, e.g.

"trigonometric".

MathFunc1Arg cNEDMathFunction::getMathFunc1Arg (  )  const

Returns function pointer as double function with 1 double arg.

Throws exception is actual arg count is different.

MathFunc2Args cNEDMathFunction::getMathFunc2Args (  )  const

Returns function pointer as double function with 2 double args.

Throws exception is actual arg count is different.

MathFunc3Args cNEDMathFunction::getMathFunc3Args (  )  const

Returns function pointer as double function with 3 double args.

Throws exception is actual arg count is different.

MathFunc4Args cNEDMathFunction::getMathFunc4Args (  )  const

Returns function pointer as double function with 4 double args.

Throws exception is actual arg count is different.

MathFuncNoArg cNEDMathFunction::getMathFuncNoArg (  )  const

Returns function pointer as double function with no args.

Throws exception is actual arg count is different.


The documentation for this class was generated from the following file:
Generated on Tue Dec 2 11:16:29 2014 for OMNeT++ Simulation Library by  doxygen 1.6.3