Optika GUI Toolik Version of the Day
Public Member Functions | Private Member Functions | Private Attributes
Optika::NumberArrayLengthDependency Class Reference

#include <Optika_StandardDependencies.hpp>

Inheritance diagram for Optika::NumberArrayLengthDependency:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 NumberArrayLengthDependency (std::string dependeeName, Teuchos::RCP< Teuchos::ParameterList > dependeeParentList, std::string dependentName, Teuchos::RCP< Teuchos::ParameterList > dependentParentList, int(*func)(int)=0)
 NumberArrayLengthDependency (std::string dependeeName, std::string dependentName, Teuchos::RCP< Teuchos::ParameterList > parentList, int(*func)(int)=0)
 NumberArrayLengthDependency (std::string dependeeName, Teuchos::RCP< Teuchos::ParameterList > dependeeParentList, ParameterParentMap dependents, int(*func)(int)=0)
void evaluate ()

Private Member Functions

int runFunction (int argument) const
template<class S >
void modifyArrayLength (int newLength, Teuchos::ParameterEntry *dependentToModify)
void validateDep ()

Private Attributes

int(* func )(int)

Detailed Description

An ArrayLengthDependency says the following about the relationship between two parameters: The length of the dependent's array depends on the value of the dependee.

An ArrayLengthDependency must have the following characteristics:

Definition at line 806 of file Optika_StandardDependencies.hpp.


Constructor & Destructor Documentation

Optika::NumberArrayLengthDependency::NumberArrayLengthDependency ( std::string  dependeeName,
Teuchos::RCP< Teuchos::ParameterList dependeeParentList,
std::string  dependentName,
Teuchos::RCP< Teuchos::ParameterList dependentParentList,
int(*)(int)  func = 0 
)

Constructs an ArrayLengthDependency.

Parameters:
dependeeNameThe name of the dependee parameter.
dependeeParentListThe ParameterList containing the dependee.
dependentNameThe name of the dependent parameter.
dependentParentListThe ParameterList containing the dependent.
funcA function specifying how the arrays length should be calculated from the dependees value.

Definition at line 219 of file Optika_StandardDependencies.cpp.

Optika::NumberArrayLengthDependency::NumberArrayLengthDependency ( std::string  dependeeName,
std::string  dependentName,
Teuchos::RCP< Teuchos::ParameterList parentList,
int(*)(int)  func = 0 
)

Constructs an ArrayLengthDependency.

Parameters:
dependeeNameThe name of the dependee parameter.
dependentNameThe name of the dependent parameter.
parentListThe ParameterList containing the dependent and the dependee.
funcA function specifying how the arrays length should be calculated from the dependees value.

Definition at line 225 of file Optika_StandardDependencies.cpp.

Optika::NumberArrayLengthDependency::NumberArrayLengthDependency ( std::string  dependeeName,
Teuchos::RCP< Teuchos::ParameterList dependeeParentList,
ParameterParentMap  dependents,
int(*)(int)  func = 0 
)

Constructs an ArrayLengthDependency.

Parameters:
dependeeNameThe name of the dependee parameter.
dependeeParentListThe ParameterList containing the dependee.
dependentsA map containing dependent Parameters associated with their paraent ParameterLists.
funcA function specifying how the arrays length should be calculated from the dependees value.

Definition at line 231 of file Optika_StandardDependencies.cpp.


Member Function Documentation

void Optika::NumberArrayLengthDependency::evaluate ( ) [virtual]

Evaluates the dependency and makes any appropriate changes to the dependee based on the dependent.

Implements Optika::Dependency.

Definition at line 292 of file Optika_StandardDependencies.cpp.

int Optika::NumberArrayLengthDependency::runFunction ( int  argument) const [private]

Runs the dependency's function on the given argument and returns the value that function returns.

Parameters:
Thevalue to run the function on.
Returns:
The value the function returned.

Definition at line 237 of file Optika_StandardDependencies.cpp.

template<class S >
void Optika::NumberArrayLengthDependency::modifyArrayLength ( int  newLength,
Teuchos::ParameterEntry dependentToModify 
) [private]

Modifies the length of an array.

Parameters:
newLengthThe new length the array should be.
dependentValueThe index of the dependent array that is going to be changed.

Definition at line 247 of file Optika_StandardDependencies.cpp.

void Optika::NumberArrayLengthDependency::validateDep ( ) [private, virtual]

Validates the dependency to make sure it's valid/has been setup properly. If subclassing, this fucntion should be called in the new subclasses constructor.

Implements Optika::Dependency.

Definition at line 331 of file Optika_StandardDependencies.cpp.


Member Data Documentation

The function used to calculate the new value of the arrays length.

Definition at line 852 of file Optika_StandardDependencies.hpp.


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