muParserX 2.0.0
Loading...
Searching...
No Matches
mup::ICallback Class Referenceabstract

Interface for callback objects. More...

#include <mpICallback.h>

Inherits mup::IToken.

Inherited by mup::FunACos, mup::FunACosH, mup::FunASin, mup::FunASinH, mup::FunATan, mup::FunATanH, mup::FunAbs, mup::FunAtan2, mup::FunCbrt, mup::FunCmplxAbs, mup::FunCmplxArg, mup::FunCmplxConj, mup::FunCmplxCos, mup::FunCmplxCosH, mup::FunCmplxExp, mup::FunCmplxImag, mup::FunCmplxLn, mup::FunCmplxLog, mup::FunCmplxLog10, mup::FunCmplxLog2, mup::FunCmplxNorm, mup::FunCmplxPow, mup::FunCmplxReal, mup::FunCmplxSin, mup::FunCmplxSinH, mup::FunCmplxSqrt, mup::FunCmplxTan, mup::FunCmplxTanH, mup::FunCos, mup::FunCosH, mup::FunExp, mup::FunFmod, mup::FunHypot, mup::FunLn, mup::FunLog, mup::FunLog10, mup::FunLog2, mup::FunMatrixEye, mup::FunMatrixOnes, mup::FunMatrixSize, mup::FunMatrixZeros, mup::FunMax, mup::FunMin, mup::FunParserID, mup::FunPow, mup::FunRemainder, , mup::FunSin, mup::FunSinH, mup::FunSizeOf, mup::FunSqrt, mup::FunStrLen, mup::FunStrToDbl, mup::FunStrToLower, mup::FunStrToUpper, mup::FunSum, mup::FunTan, mup::FunTanH, , mup::IOprtBin, mup::IOprtInfix, and mup::IOprtPostfix.

Collaboration diagram for mup::ICallback:

Public Member Functions

int GetArgc () const
 Returns the mĀ“number of arguments required by this callback.
void SetParent (parent_type *a_pParent)
 Assign a parser object to the callback.
Public Member Functions inherited from mup::IToken
ECmdCode GetCode () const
 return the token code.
const string_typeGetIdent () const
 Return the token identifier string.

Protected Member Functions

parent_typeGetParent ()
 Returns a pointer to the parser object owning this callback.
Protected Member Functions inherited from mup::IToken
virtual ~IToken ()
 Destructor (trivial).
 IToken (const IToken &ref)
 Copy constructor.

Detailed Description

Interface for callback objects.

All Parser functions and operators must implement this interface.

Member Function Documentation

◆ GetArgc()

int mup::ICallback::GetArgc ( ) const

Returns the m“number of arguments required by this callback.

Returns
Number of arguments or -1 if the number of arguments is variable.
Here is the call graph for this function:

◆ GetParent()

ParserXBase * mup::ICallback::GetParent ( )
protected

Returns a pointer to the parser object owning this callback.

Precondition
[assert] m_pParent must be defined
Here is the call graph for this function:

◆ SetParent()

void mup::ICallback::SetParent ( parent_type * a_pParent)

Assign a parser object to the callback.

Parameters
a_pParentThe parser that belongs to this callback object.

The parent object can be used in order to access internals of the parser from within a callback object. Thus enabling callbacks to delete variables or functions if this is desired.

Here is the call graph for this function:


muParserX documentation - (C) 2010 Ingo Berg