Optika Development
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected 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::ParameterEntry * getFirstDependee () 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

Detailed Description

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

See also:
DependencyList

Member Typedef Documentation

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

Maps parameters to their associated parent ParametersList.


Member Enumeration Documentation

Enum classifying various types of dependencies.


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.
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.
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.
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.
virtual Optika::Dependency::~Dependency ( ) [inline, virtual]

Desctructor

Simply declaring the descrutor as virtual.


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.
virtual void Optika::Dependency::evaluate ( ) [pure virtual]
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.
std::set< std::string > Optika::Dependency::getDependeeNames ( ) const

Gets the names of the dependee parameters.

Returns:
The names of the dependee parameters.
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.
Dependency::ParameterParentMap Optika::Dependency::getDependees ( ) const

Gets the dependees of the dependency.

Returns:
The dependees of the dependency.
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.
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.
Dependency::ParameterParentMap Optika::Dependency::getDependents ( ) const

Gets the dependents of the dependency.

Returns:
The dependents of the dependency.
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.
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.
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.
Dependency::Type Optika::Dependency::getType ( ) const

Gets the type of the dependency.

Returns:
The type of dependency.

Member Data Documentation

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

The names of all the dependees

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

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

The names of all the dependents

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


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