Optika GUI Toolik Version of the Day
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
Optika::Dependency Class Reference

#include <Optika_Dependency.hpp>

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

List of all members.

Classes

class  DepComp

Public Types

enum  Type { VisualDep, ValidatorDep, NumberValidatorAspectDep, NumberArrayLengthDep }
typedef std::map< const
std::string, const
Teuchos::RCP
< Teuchos::ParameterList > > 
ParameterParentMap

Public Member Functions

 Dependency (ParameterParentMap &dependees, ParameterParentMap &dependents, Type type)
 Dependency (ParameterParentMap &dependees, std::string dependentName, Teuchos::RCP< Teuchos::ParameterList > dependentParentList, Type type)
 Dependency (std::string dependeeName, Teuchos::RCP< Teuchos::ParameterList > dependeeParentList, ParameterParentMap &dependents, Type type)
 Dependency (std::string dependeeName, Teuchos::RCP< Teuchos::ParameterList > dependeeParentList, std::string dependentName, Teuchos::RCP< Teuchos::ParameterList > dependentParentList, Type type)
virtual ~Dependency ()
ParameterParentMap getDependees () const
ParameterParentMap getDependents () const
std::set< std::string > getDependeeNames () const
std::set< std::string > getDependentNames () const
std::string getDependeeNamesString () const
std::string getDependentNamesString () const
std::string getDependeeName (const Teuchos::ParameterEntry *dependee) const
Type getType () const
virtual void evaluate ()=0

Static Public Member Functions

static bool doesListContainList (Teuchos::RCP< Teuchos::ParameterList > parentList, Teuchos::RCP< Teuchos::ParameterList > listToFind)

Protected Member Functions

const Teuchos::ParameterEntrygetFirstDependee () const
template<class S >
const S getFirstDependeeValue () const
std::string getFirstDependeeName () const

Protected Attributes

ParameterParentMap dependees
ParameterParentMap dependents
std::set< std::string > dependeeNames
std::set< std::string > dependentNames

Private Member Functions

virtual void validateDep ()=0
void intitializeDependeesAndDependents (ParameterParentMap &dependees, ParameterParentMap &dependents)

Private Attributes

Type type

Detailed Description

This class represents a depndency between elements in a Parameter List.

See also:
DependencyList

Definition at line 41 of file Optika_Dependency.hpp.


Member Typedef Documentation

typedef std::map<const std::string, const Teuchos::RCP<Teuchos::ParameterList> > Optika::Dependency::ParameterParentMap

Maps parameters to their associated parent ParametersList.

Definition at line 61 of file Optika_Dependency.hpp.


Member Enumeration Documentation

Enum classifying various types of dependencies.

Enumerator:
VisualDep 
ValidatorDep 
NumberValidatorAspectDep 
NumberArrayLengthDep 

Definition at line 56 of file Optika_Dependency.hpp.


Constructor & Destructor Documentation

Optika::Dependency::Dependency ( ParameterParentMap dependees,
ParameterParentMap dependents,
Type  type 
)

Constructs a Dependency

Parameters:
dependeesA map of all the dependees and their associated parent lists.
dependentsA map of all the dependents and their associated parent lists.
typeThe type of dependency.

Definition at line 32 of file Optika_Dependency.cpp.

Optika::Dependency::Dependency ( ParameterParentMap dependees,
std::string  dependentName,
Teuchos::RCP< Teuchos::ParameterList dependentParentList,
Type  type 
)

Constructs a Dependency

Parameters:
dependeesA map of all the dependees and their associated parent lists.
dependentNameThe name of the dependent parameter.
dependentParentListThe ParameterList containing the dependent.
typeThe type of dependency.

Definition at line 38 of file Optika_Dependency.cpp.

Optika::Dependency::Dependency ( std::string  dependeeName,
Teuchos::RCP< Teuchos::ParameterList dependeeParentList,
ParameterParentMap dependents,
Type  type 
)

Constructs a Dependency

Parameters:
dependeeNameThe name of the dependee parameter.
dependeeParentListThe ParameterList containing the dependee.
dependentsA map of all the dependents and their associated parent lists.
typeThe type of dependency.

Definition at line 46 of file Optika_Dependency.cpp.

Optika::Dependency::Dependency ( std::string  dependeeName,
Teuchos::RCP< Teuchos::ParameterList dependeeParentList,
std::string  dependentName,
Teuchos::RCP< Teuchos::ParameterList dependentParentList,
Type  type 
)

Constructs a Dependency

Parameters:
dependeeNameThe name of the dependee parameter.
dependeeParentListThe ParameterList containing the dependee.
dependentNameThe name of the dependent parameter.
dependentParentListThe ParameterList containing the dependent.
typeThe type of dependency.

Definition at line 55 of file Optika_Dependency.cpp.

virtual Optika::Dependency::~Dependency ( ) [inline, virtual]

Desctructor

Simply declaring the descrutor as virtual.

Definition at line 110 of file Optika_Dependency.hpp.


Member Function Documentation

bool Optika::Dependency::doesListContainList ( Teuchos::RCP< Teuchos::ParameterList parentList,
Teuchos::RCP< Teuchos::ParameterList listToFind 
) [static]

Determines whether or not a ParameterList or any of it's children lists contain a specific ParameterList.

Parameters:
parentListThe ParameterList to search.
listToFindThe ParameterList to for which we are searching.
Returns:
True if the parentList or and or any of it's children ParameterLists contains the list specified by the listToFind parameter.

Definition at line 153 of file Optika_Dependency.cpp.

Dependency::ParameterParentMap Optika::Dependency::getDependees ( ) const

Gets the dependees of the dependency.

Returns:
The dependees of the dependency.

Definition at line 101 of file Optika_Dependency.cpp.

Dependency::ParameterParentMap Optika::Dependency::getDependents ( ) const

Gets the dependents of the dependency.

Returns:
The dependents of the dependency.

Definition at line 105 of file Optika_Dependency.cpp.

std::set< std::string > Optika::Dependency::getDependeeNames ( ) const

Gets the names of the dependee parameters.

Returns:
The names of the dependee parameters.

Definition at line 109 of file Optika_Dependency.cpp.

std::set< std::string > Optika::Dependency::getDependentNames ( ) const

Gets a set containing the names of the dependent parameters.

Returns:
A set containing the names of the dependent parameters.

Definition at line 129 of file Optika_Dependency.cpp.

std::string Optika::Dependency::getDependeeNamesString ( ) const

Gets a string containing all the names of the dependee parameters.

Returns:
A string containing all the names of the dependee parameters.

Definition at line 133 of file Optika_Dependency.cpp.

std::string Optika::Dependency::getDependentNamesString ( ) const

Gets a string containing all the names of the dependent parameters.

Returns:
A string containing all the names of the dependent parameters.

Definition at line 141 of file Optika_Dependency.cpp.

std::string Optika::Dependency::getDependeeName ( const Teuchos::ParameterEntry dependee) const

Gets the name of a dependee given a pointer to the dependee parameter.

Parameters:
Pointerto the dependee parameter whose name is desired.
Returns:
The name of the dependee parameter associated with the pointer specified in the arguments.

Definition at line 113 of file Optika_Dependency.cpp.

Dependency::Type Optika::Dependency::getType ( ) const

Gets the type of the dependency.

Returns:
The type of dependency.

Definition at line 149 of file Optika_Dependency.cpp.

virtual void Optika::Dependency::evaluate ( ) [pure virtual]
const Teuchos::ParameterEntry* Optika::Dependency::getFirstDependee ( ) const [inline, protected]

Convienence function. Returns the first dependee in the list of dependees.

Returns:
The first dependee in the list of dependees.

Definition at line 214 of file Optika_Dependency.hpp.

template<class S >
const S Optika::Dependency::getFirstDependeeValue ( ) const [inline, protected]

Convienence function. Returns the first dependee in the list of dependees.

Returns:
The first dependee in the list of dependees.

Definition at line 224 of file Optika_Dependency.hpp.

std::string Optika::Dependency::getFirstDependeeName ( ) const [inline, protected]

Gets the name of the first dependee in the dependees map.

Returns:
the name of the first dependee in the dependees map.

Definition at line 233 of file Optika_Dependency.hpp.

virtual void Optika::Dependency::validateDep ( ) [private, pure virtual]
void Optika::Dependency::intitializeDependeesAndDependents ( ParameterParentMap dependees,
ParameterParentMap dependents 
) [private]

Initializes all the dependnees and dependents along with checking to make sure that their parents lists are actually valid.

Parameters:
dependeesThe dependees to be initialized.
dependentsThe dependents to be initialized.

Definition at line 66 of file Optika_Dependency.cpp.


Member Data Documentation

The dependee is the parameter being depended upon. This is a map of all the dependees and their associated parent ParameterLists.

Definition at line 191 of file Optika_Dependency.hpp.

The dependent is the parameter that dependes on another parameter. This is a map of all the dependents and their associated parent ParametersLists.

Definition at line 197 of file Optika_Dependency.hpp.

std::set<std::string> Optika::Dependency::dependeeNames [protected]

The names of all the dependees

Definition at line 202 of file Optika_Dependency.hpp.

std::set<std::string> Optika::Dependency::dependentNames [protected]

The names of all the dependents

Definition at line 207 of file Optika_Dependency.hpp.

The type of dependency.

Definition at line 241 of file Optika_Dependency.hpp.


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