USGS

Isis 3.0 Object Programmers' Reference

Home

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.

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.
virtual ~ParameterFx ()
 Destroys the ParameterFx object.
void dispatch ()
 Calls the function corresponding to this object using its stored InlineCalculator, InlineCalculator operator, and arguments.
QString name () const
 The name assigned to this function binder.
void execute ()
 Executes the function.
void operator() ()
 Executes the function.
virtual QVariant args ()
 Accesses the arguments for this function.

Private Attributes

calcOp m_func
 The InlineCalculator operator that takes parameters.
InlineCalculatorm_calc
 The InlineCalculator used to evaluate this function.

Detailed Description

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

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

Definition at line 208 of file InlineCalculator.h.

Member Typedef Documentation

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

Defines an InlineCalculator function that takes arguments.

Definition at line 211 of file InlineCalculator.h.

Constructor & Destructor Documentation

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.

Definition at line 782 of file InlineCalculator.cpp.

Isis::ParameterFx::~ParameterFx ( )
virtual

Destroys the ParameterFx object.

Definition at line 792 of file InlineCalculator.cpp.

Member Function Documentation

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 735 of file InlineCalculator.cpp.

References Isis::FxBinder::m_name.

Referenced by dispatch().

void Isis::ParameterFx::dispatch ( )
virtual

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

Implements Isis::FxBinder.

Definition at line 801 of file InlineCalculator.cpp.

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

void Isis::FxBinder::execute ( )
inherited

Executes the function.

This method is a wrapper for the virtual dispatch method.

Definition at line 715 of file InlineCalculator.cpp.

References Isis::FxBinder::dispatch().

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 706 of file InlineCalculator.cpp.

References Isis::FxBinder::m_name.

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

Executes the function.

This method is a wrapper for the virtual dispatch method.

Definition at line 724 of file InlineCalculator.cpp.

References Isis::FxBinder::dispatch().

Member Data Documentation

InlineCalculator* Isis::ParameterFx::m_calc
private

The InlineCalculator used to evaluate this function.

Definition at line 220 of file InlineCalculator.h.

Referenced by dispatch().

calcOp Isis::ParameterFx::m_func
private

The InlineCalculator operator that takes parameters.

Definition at line 219 of file InlineCalculator.h.

Referenced by dispatch().


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