Isis 3 Programmer Reference
Isis::VoidFx Class Reference

This class is used to bind function names with corresponding Calculator functions that do not take parameters. More...

#include <InlineCalculator.h>

Inheritance diagram for Isis::VoidFx:
Inheritance graph
Collaboration diagram for Isis::VoidFx:
Collaboration graph

Public Types

typedef void(Calculator::* calcOp) ()
 Defines a Calculator function that takes no arguments. More...
 

Public Member Functions

 VoidFx (const QString &name, calcOp function, InlineCalculator *calculator)
 Constructs a Void function from the given name, Calculator operator, and Calculator. More...
 
virtual ~VoidFx ()
 Destroys the VoidFx object. More...
 
void dispatch ()
 Calls the function corresponding to this object using its stored Calculator and Calculator operator. 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...
 

Private Attributes

calcOp m_func
 The Calculator operator that takes no parameters. More...
 
InlineCalculatorm_calc
 The Calculator used to evaluate this function. More...
 

Detailed Description

This class is used to bind function names with corresponding Calculator functions that do not take parameters.

Author
2012-07-15 Kris Becker
History:
2012-07-15 Kris Becker - Original version.

Definition at line 235 of file InlineCalculator.h.

Member Typedef Documentation

◆ calcOp

typedef void(Calculator::* Isis::VoidFx::calcOp) ()

Defines a Calculator function that takes no arguments.

Definition at line 238 of file InlineCalculator.h.

Constructor & Destructor Documentation

◆ VoidFx()

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

Constructs a Void function from the given name, Calculator operator, and Calculator.

Parameters
nameA string containing a name for this function.
functionA Calculator operator that takes no arguments.
calculatorThe Calculator used to evaluate this function.

Definition at line 864 of file InlineCalculator.cpp.

◆ ~VoidFx()

Isis::VoidFx::~VoidFx ( )
virtual

Destroys the VoidFx object.

Definition at line 874 of file InlineCalculator.cpp.

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.

Definition at line 785 of file InlineCalculator.cpp.

References Isis::FxBinder::m_name.

Referenced by Isis::ParameterFx::dispatch().

◆ dispatch()

void Isis::VoidFx::dispatch ( )
virtual

Calls the function corresponding to this object using its stored Calculator and Calculator operator.

Implements Isis::FxBinder.

Definition at line 882 of file InlineCalculator.cpp.

References CALL_MEMBER_FN, m_calc, and m_func.

◆ execute()

void Isis::FxBinder::execute ( )
inherited

Executes the function.

This method is a wrapper for the virtual dispatch method.

Definition at line 765 of file InlineCalculator.cpp.

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.

Definition at line 756 of file InlineCalculator.cpp.

References Isis::FxBinder::m_name.

◆ operator()()

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

Executes the function.

This method is a wrapper for the virtual dispatch method.

Definition at line 774 of file InlineCalculator.cpp.

References Isis::FxBinder::dispatch().

Member Data Documentation

◆ m_calc

InlineCalculator* Isis::VoidFx::m_calc
private

The Calculator used to evaluate this function.

Definition at line 247 of file InlineCalculator.h.

Referenced by dispatch().

◆ m_func

calcOp Isis::VoidFx::m_func
private

The Calculator operator that takes no parameters.

Definition at line 246 of file InlineCalculator.h.

Referenced by dispatch().


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