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

#include <Optika_StandardDependencies.hpp>

Inheritance diagram for Optika::NumberVisualDependency< S >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

Private Member Functions

runFunction (S argument) const
void validateDep ()

Private Attributes

S(* func )(S)

Detailed Description

template<class S>
class Optika::NumberVisualDependency< S >

A number visual dependency says the following about the relationship between two elements in a Parameter List: Depending on whether or not the dependee has a certain value, the dependent may or may not be displayed to the user in a GUI.

The dependee of a NumberVisualDependency must be a number type and can't be an array. The dependent may be any type of parameter or parameter list.

Definition at line 396 of file Optika_StandardDependencies.hpp.


Constructor & Destructor Documentation

template<class S >
Optika::NumberVisualDependency< S >::NumberVisualDependency ( std::string  dependeeName,
Teuchos::RCP< Teuchos::ParameterList dependeeParentList,
std::string  dependentName,
Teuchos::RCP< Teuchos::ParameterList dependentParentList,
S(*)(S)  func = 0 
) [inline]

Constructs a NumberVisualDependency.

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 that takes the dependees value, does some calculations on it, and then returns a value. If this value is greater than 0, the dependent is show. If the value returned is less than or equal to zero, the dependent is not shown. If no fuction is specified, the direct value of the dependee will be used to determine the dependents visibility in a similar fashion (postive numbers causing the dependent to be displayed and 0 or negative numbers cuasing the dependent to be hidden).

Definition at line 412 of file Optika_StandardDependencies.hpp.

template<class S >
Optika::NumberVisualDependency< S >::NumberVisualDependency ( std::string  dependeeName,
std::string  dependentName,
Teuchos::RCP< Teuchos::ParameterList parentList,
S(*)(S)  func = 0 
) [inline]

Constructs a NumberVisualDependency.

Parameters:
dependeeNameThe name of the dependee parameter.
dependentNameThe name of the dependent parameter.
parentListThe ParameterList containing the dependent and the dependee.
funcA function that takes the dependees value, does some calculations on it, and then returns a value. If this value is greater than 0, the dependent is show. If the value returned is less than or equal to zero, the dependent is not shown. If no fuction is specified, the direct value of the dependee will be used to determine the dependents visibility in a similar fashion (postive numbers causing the dependent to be displayed and 0 or negative numbers cuasing the dependent to be hidden).

Definition at line 432 of file Optika_StandardDependencies.hpp.

template<class S >
Optika::NumberVisualDependency< S >::NumberVisualDependency ( std::string  dependeeName,
Teuchos::RCP< Teuchos::ParameterList dependeeParentList,
ParameterParentMap  dependents,
S(*)(S)  func = 0 
) [inline]

Constructs a NumberVisualDependency.

Parameters:
dependeeNameThe name of the dependee parameter.
dependeeParentListThe ParameterList containing the dependee.
dependentsA map containing dependent Parameters associated with their paraent ParameterLists.
funcA function that takes the dependees value, does some calculations on it, and then returns a value. If this value is greater than 0, the dependent is show. If the value returned is less than or equal to zero, the dependent is not shown. If no fuction is specified, the direct value of the dependee will be used to determine the dependents visibility in a similar fashion (postive numbers causing the dependent to be displayed and 0 or negative numbers cuasing the dependent to be hidden).

Definition at line 452 of file Optika_StandardDependencies.hpp.


Member Function Documentation

template<class S >
void Optika::NumberVisualDependency< S >::evaluate ( ) [inline, virtual]

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

Implements Optika::VisualDependency.

Definition at line 459 of file Optika_StandardDependencies.hpp.

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

Run the function on the argument and returns the value of the fucntion. If no function is specified, the argument is simple returned.

Parameters:
argumentthe value to use as an argument for the function.
Returns:
the result of running the function with the value. If no function is specified, the argument is simple returned.

Definition at line 479 of file Optika_StandardDependencies.hpp.

template<class S >
void Optika::NumberVisualDependency< S >::validateDep ( ) [inline, 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::VisualDependency.

Definition at line 486 of file Optika_StandardDependencies.hpp.


Member Data Documentation

template<class S >
S(* Optika::NumberVisualDependency< S >::func)(S) [private]

the function used to determine the visibility of the dependent.

Definition at line 469 of file Optika_StandardDependencies.hpp.


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