Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
Teuchos::NumberVisualDependency< T > Class Template Reference

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 UI. More...

#include <Teuchos_StandardDependencies.hpp>

Inheritance diagram for Teuchos::NumberVisualDependency< T >:
Inheritance graph
[legend]

Constructors

 NumberVisualDependency (RCP< const ParameterEntry > dependee, RCP< ParameterEntry > dependent, bool showIf=true, RCP< SimpleFunctionObject< T > > func=null)
 Constructs a NumberVisualDependency. More...
 
 NumberVisualDependency (RCP< const ParameterEntry > dependee, ParameterEntryList dependents, bool showIf=true, RCP< SimpleFunctionObject< T > > func=null)
 Constructs a NumberVisualDependency. More...
 

Overridden from VisualDependency

bool getDependeeState () const
 Get the state of the dependee in order to evaluate the dependency. More...
 

Overridden from Dependency

std::string getTypeAttributeValue () const
 
void validateDep () const
 

Getter Functions

RCP< const
SimpleFunctionObject< T > > 
getFunctionObject () const
 Const version of function getter. More...
 

Private Members

RCP< SimpleFunctionObject< T > > func_
 the function used to determine the visibility of the dependent. More...
 

Additional Inherited Members

- Public Types inherited from Teuchos::Dependency
typedef std::set< RCP
< ParameterEntry >, RCPComp
ParameterEntryList
 A list of Dependees. More...
 
typedef std::set< RCP< const
ParameterEntry >, RCPConstComp
ConstParameterEntryList
 A list of dependents. More...
 
- Public Member Functions inherited from Teuchos::VisualDependency
 VisualDependency (RCP< const ParameterEntry > dependee, RCP< ParameterEntry > dependent, bool showIf=getShowIfDefaultValue())
 Constructs a VisualDependency. More...
 
 VisualDependency (RCP< const ParameterEntry > dependee, ParameterEntryList dependents, bool showIf=getShowIfDefaultValue())
 Constructs a VisualDependency. More...
 
 VisualDependency (ConstParameterEntryList dependees, RCP< ParameterEntry > dependent, bool showIf=getShowIfDefaultValue())
 Constructs a VisualDependency. More...
 
 VisualDependency (ConstParameterEntryList dependees, ParameterEntryList dependents, bool showIf=getShowIfDefaultValue())
 Constructs a VisualDependency. More...
 
bool isDependentVisible () const
 Determines whether or not the dependent is currently visible. More...
 
bool getShowIf () const
 Get's the value of the showIf variable. More...
 
void evaluate ()
 
- Public Member Functions inherited from Teuchos::Dependency
 Dependency (ConstParameterEntryList dependees, ParameterEntryList dependents)
 Constructs a Dependency. More...
 
 Dependency (ConstParameterEntryList dependees, RCP< ParameterEntry > dependent)
 Constructs a Dependency. More...
 
 Dependency (RCP< const ParameterEntry > dependee, ParameterEntryList dependents)
 Constructs a Dependency. More...
 
 Dependency (RCP< const ParameterEntry > dependee, RCP< ParameterEntry > dependent)
 Constructs a Dependency. More...
 
const ConstParameterEntryListgetDependees () const
 Gets the dependees of the dependency. More...
 
ParameterEntryListgetDependents ()
 Gets the dependents of the dependency. More...
 
const ConstParameterEntryListgetDependents () const
 Gets the dependents of the dependency. More...
 
RCP< const ParameterEntrygetFirstDependee () const
 Gets the first dependee in the dependees list. This is a convience function. More...
 
template<class S >
getFirstDependeeValue () const
 Convienence function. Returns the first dependee in the list of dependees. More...
 
virtual void print (std::ostream &out) const
 prints out information about the dependency. More...
 
- Public Member Functions inherited from Teuchos::Describable
virtual std::string description () const
 Return a simple one-line description of this object. More...
 
virtual void describe (FancyOStream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 Print the object with some verbosity level to a FancyOStream. More...
 
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 Version of describe() that takes an std::ostream instead of a FancyOStream. More...
 
virtual ~Describable ()
 Destructor (marked virtual for memory safety of derived classes). More...
 
- Public Member Functions inherited from Teuchos::LabeledObject
 LabeledObject ()
 Construct with an empty label. More...
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 Set the object label (see LabeledObject). More...
 
virtual std::string getObjectLabel () const
 Get the object label (see LabeledObject). More...
 
- Static Public Member Functions inherited from Teuchos::VisualDependency
static const bool & getShowIfDefaultValue ()
 
- Static Public Member Functions inherited from Teuchos::Dependency
static const std::string & getXMLTagName ()
 Returns the XML tag to use when serializing Dependencies. More...
 
- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default = VERB_DEFAULT
 Default value for the verbLevel argument of describe(). More...
 
- Protected Member Functions inherited from Teuchos::Dependency

Detailed Description

template<class T>
class Teuchos::NumberVisualDependency< T >

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 UI.

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. If no function is provided, then the value of the Dependee is simply compared to 0. If it is greater than 0, the dependency evaluates to true. Otherwise it evaluates to false. If a function is provided, then the value of the Dependee is first ran through that function. The result of that function is then compared to 0 using the same criteria as above.

Please see NumberVisualDependencyXMLConverter for documentation regarding the XML representation of this Dependency.

Definition at line 660 of file Teuchos_StandardDependencies.hpp.

Constructor & Destructor Documentation

template<class T >
Teuchos::NumberVisualDependency< T >::NumberVisualDependency ( RCP< const ParameterEntry dependee,
RCP< ParameterEntry dependent,
bool  showIf = true,
RCP< SimpleFunctionObject< T > >  func = null 
)

Constructs a NumberVisualDependency.

Parameters
dependeeThe dependee parameter.
dependentThe dependent parameter.
showIfWhen true, the depndent will be be shown if the dependee is set to the same value as specified by the value parameter. If false, the dependent will be shown only when the dependee is set to a value other than the one specified by the value parameter.
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 showIf is set to valse then these visibility results will be reversed. If no fuction is specified, the direct value of the dependee will be used to determine the dependents visibility in a similar fashion (positive numbers causing the dependent to be displayed and 0 or negative numbers causing the dependent to be hidden).

Definition at line 770 of file Teuchos_StandardDependencies.hpp.

template<class T >
Teuchos::NumberVisualDependency< T >::NumberVisualDependency ( RCP< const ParameterEntry dependee,
ParameterEntryList  dependents,
bool  showIf = true,
RCP< SimpleFunctionObject< T > >  func = null 
)

Constructs a NumberVisualDependency.

Parameters
dependeeThe dependee parameter.
dependentsThe dependents.
showIfWhen true, the depndent will be be shown if the dependee is set to the same value as specified by the value parameter. If false, the dependent will be shown only when the dependee is set to a value other than the one specified by the value parameter.
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 showIf is set to false, then these visibility results will be reversed. If no fuction is specified, the direct value of the dependee will be used to determine the dependents visibility in a similar fashion (positive numbers causing the dependent to be displayed and 0 or negative numbers causing the dependent to be hidden).

Definition at line 782 of file Teuchos_StandardDependencies.hpp.

Member Function Documentation

template<class T >
bool Teuchos::NumberVisualDependency< T >::getDependeeState ( ) const
virtual

Get the state of the dependee in order to evaluate the dependency.

Returns
The state of the dependee.

Implements Teuchos::VisualDependency.

Definition at line 794 of file Teuchos_StandardDependencies.hpp.

template<class T >
std::string Teuchos::NumberVisualDependency< T >::getTypeAttributeValue ( ) const
virtual

Implements Teuchos::Dependency.

Definition at line 803 of file Teuchos_StandardDependencies.hpp.

template<class T >
RCP< const SimpleFunctionObject< T > > Teuchos::NumberVisualDependency< T >::getFunctionObject ( ) const

Const version of function getter.

Definition at line 809 of file Teuchos_StandardDependencies.hpp.

template<class T >
void Teuchos::NumberVisualDependency< T >::validateDep ( ) const
protectedvirtual

Implements Teuchos::Dependency.

Definition at line 815 of file Teuchos_StandardDependencies.hpp.

Member Data Documentation

template<class T >
RCP<SimpleFunctionObject<T> > Teuchos::NumberVisualDependency< T >::func_
private

the function used to determine the visibility of the dependent.

Definition at line 763 of file Teuchos_StandardDependencies.hpp.


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