Optika GUI Toolik Version of the Day
Public Member Functions | Private Member Functions | Private Attributes
Optika::NumberCondition< T > Class Template Reference

#include <Optika_StandardConditions.hpp>

Inheritance diagram for Optika::NumberCondition< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 NumberCondition (std::string parameterName, Teuchos::RCP< Teuchos::ParameterList > parentList, T(*func)(T)=0, bool whenParamEqualsValue=true)
 NumberCondition (std::string parameterName, Teuchos::RCP< Teuchos::ParameterList > parentList, bool whenParamEqualsValue=true)
virtual ~NumberCondition ()
bool isConditionTrue ()

Private Member Functions

runFunction (T argument) const

Private Attributes

T(* func )(T)

Detailed Description

template<class T>
class Optika::NumberCondition< T >

A Number Condition is a Parameter Condition that evaluates whether or not a number parameter is greater 0. If the parameter is greater than 0 this is interperted as the condition being "true". Otherwise the oncidiont is interperted as false.

Definition at line 281 of file Optika_StandardConditions.hpp.


Constructor & Destructor Documentation

template<class T >
Optika::NumberCondition< T >::NumberCondition ( std::string  parameterName,
Teuchos::RCP< Teuchos::ParameterList parentList,
T(*)(T)  func = 0,
bool  whenParamEqualsValue = true 
) [inline]

Constructs a Number Condition.

Parameters:
parameterNameThe name of the parameter to be evaluated.
parentListThe parent Parameter List of the parameter to be evaluated.
funcA function to run the value of the parameter through. If the function returns a value greater than 0, this will be interperted as the condition being "true". If the function returns a value of 0 or less, this will be interperted as the condition being false.
whenParamEqualsValueIndicates whether the condition should be true when the evaluation results in a true or when the evaluation results in a false. When set to true, if the parameter evaluates to true then the condition will evaluate to true. If seet to false if the parameter evaluates to false, then the condition will evaluatae to true.

Definition at line 296 of file Optika_StandardConditions.hpp.

template<class T >
Optika::NumberCondition< T >::NumberCondition ( std::string  parameterName,
Teuchos::RCP< Teuchos::ParameterList parentList,
bool  whenParamEqualsValue = true 
) [inline]

Constructs a Number Condition.

Parameters:
parameterNameThe name of the parameter to be evaluated.
parentListThe parent Parameter List of the parameter to be evaluated.
funcA function to run the value of the parameter through. If the function returns a value greater than 0, this will be interperted as the parameter's current state being "true". If the function returns a value of 0 or less, this will be interperted as the parameter's current state being "false".
whenParamEqualsValueIndicates whether the condition should be true when the evaluation results in a true or when the evaluation results in a fals. When set to true, if the parameter evaluates to true then the condition will evaluate to true. If seet to false if the parameter evaluates to false, then the condition will evaluatae to true.

Definition at line 325 of file Optika_StandardConditions.hpp.

template<class T >
virtual Optika::NumberCondition< T >::~NumberCondition ( ) [inline, virtual]

Definition at line 328 of file Optika_StandardConditions.hpp.


Member Function Documentation

template<class T >
bool Optika::NumberCondition< T >::isConditionTrue ( ) [inline, virtual]

Determins whether or not a condition is true.

Implements Optika::ParameterCondition.

Definition at line 330 of file Optika_StandardConditions.hpp.

template<class T >
T Optika::NumberCondition< T >::runFunction ( argument) const [inline, private]

Runs the function associated with this condition and returns the result.

Parameters:
argumentThe value upon which to run the function.

Definition at line 344 of file Optika_StandardConditions.hpp.


Member Data Documentation

template<class T >
T(* Optika::NumberCondition< T >::func)(T) [private]

Definition at line 336 of file Optika_StandardConditions.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends