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

#include <Optika_DependencySheet.hpp>

List of all members.

Public Types

typedef std::set< Teuchos::RCP
< Optika::Dependency >
, Optika::Dependency::DepComp
DepSet
typedef Teuchos::map< const
Teuchos::ParameterEntry
*, DepSet
DepMap

Public Member Functions

 DependencySheet (Teuchos::RCP< Teuchos::ParameterList > rootList)
 DependencySheet (Teuchos::RCP< Teuchos::ParameterList > rootList, const std::string &name)
bool addDependency (const Teuchos::RCP< Optika::Dependency > dependency)
bool removeDependency (Teuchos::RCP< Optika::Dependency > dependency)
bool hasDependents (const Teuchos::ParameterEntry *dependee) const
const DepSetgetDependenciesForParameter (const Teuchos::ParameterEntry *dependee) const
DepMap::iterator depBegin ()
DepMap::iterator depEnd ()
DepMap::const_iterator depBegin () const
DepMap::const_iterator depEnd () const
void printDeps ()

Private Member Functions

void validateExistanceInRoot (Teuchos::RCP< Optika::Dependency > dependency)

Private Attributes

DepMap dependencies
std::string name
Teuchos::RCP
< Teuchos::ParameterList
rootList

Detailed Description

A Dependency sheet keeps track of dependencies between various elements located somewhere within a "Root List". All dependencies added to a DependencySheet must have dependents and dependees who are either in the Root List or one of its sublists.

Note that a DependencySheet never acts on these dependencies. It mearly keeps track of them.

Definition at line 43 of file Optika_DependencySheet.hpp.


Member Typedef Documentation

Convience typedef representing a set of dependencies.

Definition at line 48 of file Optika_DependencySheet.hpp.

Convience typedef. Maps dependee parameter entries to a set of their corresponding dependencies.

Definition at line 54 of file Optika_DependencySheet.hpp.


Constructor & Destructor Documentation

Optika::DependencySheet::DependencySheet ( Teuchos::RCP< Teuchos::ParameterList rootList)

Constructs an empty DependencySheet with the name DEP_ANONYMOUS.

Parameters:
rootListThe Parameter List containing all parameters and sublists for which this Dependency will keep track of dependencies.

Definition at line 34 of file Optika_DependencySheet.cpp.

Optika::DependencySheet::DependencySheet ( Teuchos::RCP< Teuchos::ParameterList rootList,
const std::string &  name 
)

Constructs a DependencySheet.

Parameters:
rootListThe Parameter List containing all parameters and sublists for which this Dependency will keep track of dependencies.
nameName of the Dependency Sheet.

Definition at line 36 of file Optika_DependencySheet.cpp.


Member Function Documentation

bool Optika::DependencySheet::addDependency ( const Teuchos::RCP< Optika::Dependency dependency)

Adds a dependency to the sheet.

Parameters:
dependencyThe dependency to be added.
Returns:
True if the addition was sucessful, false otherwise.

Definition at line 38 of file Optika_DependencySheet.cpp.

bool Optika::DependencySheet::removeDependency ( Teuchos::RCP< Optika::Dependency dependency)

Removes a particular dependency between two parameters.

Parameters:
dependencyThe dependency to be removed.
Returns:
True if the removal was sucessfull, false otherwise.

Definition at line 50 of file Optika_DependencySheet.cpp.

bool Optika::DependencySheet::hasDependents ( const Teuchos::ParameterEntry dependee) const

Determines whether or not a parameter is depended upon by any another parameters or parameter lists.

Parameters:
nameThe paramteter to be checked for dependents.
Returns:
True if the parameter you're checking has other dependents, false otherwise.

Definition at line 70 of file Optika_DependencySheet.cpp.

const DependencySheet::DepSet & Optika::DependencySheet::getDependenciesForParameter ( const Teuchos::ParameterEntry dependee) const

Returns a set of all the dependencies associated with a particular dependee.

Parameters:
dependeeThe parameter whose dependencies are sought.
Returns:
A set of all dependencies associated with the dependee parameter.

Definition at line 74 of file Optika_DependencySheet.cpp.

DependencySheet::DepMap::iterator Optika::DependencySheet::depBegin ( )

Returns an iterator to the beginning of all the dependees in the sheet.

Returns:
An iterator to the beginning of all the dependees in the sheet.

Definition at line 78 of file Optika_DependencySheet.cpp.

DependencySheet::DepMap::iterator Optika::DependencySheet::depEnd ( )

Returns an iterator to the end of all of the dependees in the sheet.

Returns:
An iterator to the end of all of the dependees in the sheet.

Definition at line 82 of file Optika_DependencySheet.cpp.

DependencySheet::DepMap::const_iterator Optika::DependencySheet::depBegin ( ) const

Returns a const iterator to the beginning of all the dependees in the sheet.

Returns:
A const iterator to the beginning of all the dependees in the sheet.

Definition at line 86 of file Optika_DependencySheet.cpp.

DependencySheet::DepMap::const_iterator Optika::DependencySheet::depEnd ( ) const

Returns a const iterator to the end of all of the dependees in the sheet.

Returns:
A const iterator to the end of all of the dependees in the sheet.

Definition at line 90 of file Optika_DependencySheet.cpp.

void Optika::DependencySheet::printDeps ( )

Prints out a list of the dependencies in the DependencySheet

Definition at line 94 of file Optika_DependencySheet.cpp.

void Optika::DependencySheet::validateExistanceInRoot ( Teuchos::RCP< Optika::Dependency dependency) [private]

Validates whether or not the dependees and dependents of a dependency exist within the root ParameterList.

Definition at line 115 of file Optika_DependencySheet.cpp.


Member Data Documentation

A map containing all the depenecies for a list. Dependencies with multiple dependees will be found in multiple places within the map. Essentially, for each dependee, there will be a pointer to for dependency of which it is a part.

Definition at line 144 of file Optika_DependencySheet.hpp.

std::string Optika::DependencySheet::name [private]

The Name of the dependency sheet.

Definition at line 149 of file Optika_DependencySheet.hpp.

The root parameterlist that this dependency sheet is associated with.

Definition at line 154 of file Optika_DependencySheet.hpp.


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