Isis 3 Developer Reference
Isis::ParameterFx Class Reference

This class is used to bind function names with corresponding Calculator functions that take a parameter. More...

#include <InlineCalculator.h>

Inheritance diagram for Isis::ParameterFx:
Inheritance graph
Collaboration diagram for Isis::ParameterFx:
Collaboration graph

Public Types

typedef void(InlineCalculator::* calcOp) (const QVariant &arg)
 Defines an InlineCalculator function that takes arguments. More...
 

Public Member Functions

 ParameterFx (const QString &name, calcOp function, InlineCalculator *calculator)
 Constructs a Parameter function from the given name (containing the appropriate parameters), InlineCalculator operator, and InlineCalculator. More...
 
virtual ~ParameterFx ()
 Destroys the ParameterFx object. More...
 
void dispatch ()
 Calls the function corresponding to this object using its stored InlineCalculator, InlineCalculator operator, and arguments. More...
 
QString name () const
 The name assigned to this function binder. More...
 
void execute ()
 Executes the function. More...
 
void operator() ()
 Executes the function. More...
 
virtual QVariant args ()
 Accesses the arguments for this function. More...
 

Detailed Description

This class is used to bind function names with corresponding Calculator functions that take a parameter.

Author
2012-07-15 Kris Becker

Member Typedef Documentation

◆ calcOp

typedef void(InlineCalculator::* Isis::ParameterFx::calcOp) (const QVariant &arg)

Defines an InlineCalculator function that takes arguments.

Constructor & Destructor Documentation

◆ ParameterFx()

Isis::ParameterFx::ParameterFx ( const QString &  name,
calcOp  function,
InlineCalculator calculator 
)

Constructs a Parameter function from the given name (containing the appropriate parameters), InlineCalculator operator, and InlineCalculator.

Parameters
nameA string containing a name for this function. Note: The name given should include the parameters to be passed into this function.
functionAn InlineCalculator operator that takes parameters.
calculatorThe InlineCalculator used to evaluate this function.

◆ ~ParameterFx()

Isis::ParameterFx::~ParameterFx ( )
virtual

Destroys the ParameterFx object.

Member Function Documentation

◆ args()

QVariant Isis::FxBinder::args ( )
virtualinherited

Accesses the arguments for this function.

For scalars and variables, the argument is also the function name.

Returns
QVariant The parameters of this function, as a QVariant.

Referenced by dispatch().

◆ dispatch()

void Isis::ParameterFx::dispatch ( )
virtual

Calls the function corresponding to this object using its stored InlineCalculator, InlineCalculator operator, and arguments.

Implements Isis::FxBinder.

References Isis::FxBinder::args(), and CALL_MEMBER_FN.

◆ execute()

void Isis::FxBinder::execute ( )
inherited

Executes the function.

This method is a wrapper for the virtual dispatch method.

References Isis::FxBinder::dispatch().

◆ name()

QString Isis::FxBinder::name ( ) const
inherited

The name assigned to this function binder.

Returns
QString A string containing the name of this function.

◆ operator()()

void Isis::FxBinder::operator() ( )
inherited

Executes the function.

This method is a wrapper for the virtual dispatch method.

References Isis::FxBinder::dispatch().


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