|
OMNeT++ Simulation Library
5.6.1
|
#include <cnedmathfunction.h>
Registration class for extending NED with new mathematical functions.
Objects of this class are usually created via the Define_NED_Math_Function() macro. It stores a pointer to a function taking up to 4 doubles as args and returning a double.
Public Member Functions | |
Constructors, destructor, assignment | |
| cNedMathFunction (const char *name, MathFuncNoArg f, int argc=-1, const char *category=nullptr, const char *description=nullptr) | |
| cNedMathFunction (const char *name, MathFunc1Arg f, int argc=-1, const char *category=nullptr, const char *description=nullptr) | |
| cNedMathFunction (const char *name, MathFunc2Args f, int argc=-1, const char *category=nullptr, const char *description=nullptr) | |
| cNedMathFunction (const char *name, MathFunc3Args f, int argc=-1, const char *category=nullptr, const char *description=nullptr) | |
| cNedMathFunction (const char *name, MathFunc4Args f, int argc=-1, const char *category=nullptr, const char *description=nullptr) | |
| virtual | ~cNedMathFunction () |
Redefined cObject member functions. | |
| virtual std::string | str () const override |
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 |
Public Member Functions inherited from cNoncopyableOwnedObject | |
| cNoncopyableOwnedObject (const char *name=nullptr, bool namepooling=true) | |
| virtual cNoncopyableOwnedObject * | dup () const override |
| virtual void | parsimPack (cCommBuffer *buffer) const override |
| virtual void | parsimUnpack (cCommBuffer *buffer) override |
Public Member Functions inherited from cOwnedObject | |
| cOwnedObject () | |
| cOwnedObject (const char *name, bool namepooling=true) | |
| cOwnedObject (const cOwnedObject &obj) | |
| virtual | ~cOwnedObject () |
| cOwnedObject & | operator= (const cOwnedObject &o) |
| virtual cObject * | getOwner () const override |
| virtual bool | isOwnedObject () const override |
| virtual bool | isSoftOwner () const |
Public Member Functions inherited from cNamedObject | |
| cNamedObject () | |
| cNamedObject (const char *name, bool namepooling=true) | |
| cNamedObject (const cNamedObject &obj) | |
| virtual | ~cNamedObject () |
| cNamedObject & | operator= (const cNamedObject &o) |
| virtual void | setName (const char *s) |
| virtual const char * | getName () const override |
| virtual void | setNamePooling (bool b) |
| virtual bool | getNamePooling () |
Public Member Functions inherited from cObject | |
| cObject () | |
| cObject (const cObject &other) | |
| virtual | ~cObject () |
| virtual const char * | getClassName () const |
| bool | isName (const char *s) const |
| virtual const char * | getFullName () const |
| virtual std::string | getFullPath () const |
| const cObject * | getThisPtr () const |
| virtual _OPPDEPRECATED std::string | info () const |
| virtual _OPPDEPRECATED std::string | detailedInfo () const |
| virtual void | forEachChild (cVisitor *v) |
| cObject * | findObject (const char *name, bool deep=true) |
| void | copyNotSupported () const |
Static Public Member Functions | |
| static cNedMathFunction * | find (const char *name, int numArgs) |
| static cNedMathFunction * | get (const char *name, int numArgs) |
| static cNedMathFunction * | findByPointer (MathFunc f) |
Static Public Member Functions inherited from cOwnedObject | |
| static long | getTotalObjectCount () |
| static long | getLiveObjectCount () |
| static void | resetObjectCounters () |
| static cDefaultList * | getDefaultOwner () |
Additional Inherited Members | |
Protected Member Functions inherited from cObject | |
| virtual void | take (cOwnedObject *obj) |
| virtual void | drop (cOwnedObject *obj) |
| void | dropAndDelete (cOwnedObject *obj) |
| cNedMathFunction | ( | const char * | name, |
| MathFuncNoArg | f, | ||
| int | argc = -1, |
||
| const char * | category = nullptr, |
||
| const char * | description = nullptr |
||
| ) |
Constructor.
| cNedMathFunction | ( | const char * | name, |
| MathFunc1Arg | f, | ||
| int | argc = -1, |
||
| const char * | category = nullptr, |
||
| const char * | description = nullptr |
||
| ) |
Constructor.
| cNedMathFunction | ( | const char * | name, |
| MathFunc2Args | f, | ||
| int | argc = -1, |
||
| const char * | category = nullptr, |
||
| const char * | description = nullptr |
||
| ) |
Constructor.
| cNedMathFunction | ( | const char * | name, |
| MathFunc3Args | f, | ||
| int | argc = -1, |
||
| const char * | category = nullptr, |
||
| const char * | description = nullptr |
||
| ) |
Constructor.
| cNedMathFunction | ( | const char * | name, |
| MathFunc4Args | f, | ||
| int | argc = -1, |
||
| const char * | category = nullptr, |
||
| const char * | description = nullptr |
||
| ) |
Constructor.
|
inlinevirtual |
Destructor.
|
overridevirtual |
Produces a one-line description of the object's contents.
Reimplemented from cObject.
|
inline |
Argument count to function.
|
inline |
Returns function pointer as double function with unchecked arg list (no type safety!)
| MathFuncNoArg getMathFuncNoArg | ( | ) | const |
Returns function pointer as double function with no args. Throws exception if actual arg count is different.
| MathFunc1Arg getMathFunc1Arg | ( | ) | const |
Returns function pointer as double function with 1 double arg. Throws exception if actual arg count is different.
| MathFunc2Args getMathFunc2Args | ( | ) | const |
Returns function pointer as double function with 2 double args. Throws exception if actual arg count is different.
| MathFunc3Args getMathFunc3Args | ( | ) | const |
Returns function pointer as double function with 3 double args. Throws exception if actual arg count is different.
| MathFunc4Args getMathFunc4Args | ( | ) | const |
Returns function pointer as double function with 4 double args. Throws exception if actual arg count is different.
|
inline |
Returns a string that can be useful in classifying NED functions, e.g. "trigonometric".
|
inline |
Returns the function's documentation as a string.
|
static |
Finds a registered function by name. Returns nullptr if not found.
|
static |
Finds a registered function by name. Throws an error if not found.
|
static |
Finds a registered function by function pointer.