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 ()

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.


Member Typedef Documentation

typedef Teuchos::map<const Teuchos::ParameterEntry*, DepSet > Optika::DependencySheet::DepMap

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

Convience typedef representing a set of dependencies.


Constructor & Destructor Documentation

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

Constructs an empty DependencySheet with the name DEP_ANONYMOUS.

Parameters:
rootList The Parameter List containing all parameters and sublists for which this Dependency will keep track of dependencies.
Optika::DependencySheet::DependencySheet ( Teuchos::RCP< Teuchos::ParameterList >  rootList,
const std::string &  name 
)

Constructs a DependencySheet.

Parameters:
rootList The Parameter List containing all parameters and sublists for which this Dependency will keep track of dependencies.
name Name of the Dependency Sheet.

Member Function Documentation

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

Adds a dependency to the sheet.

Parameters:
dependency The dependency to be added.
Returns:
True if the addition was sucessful, false otherwise.
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.
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.
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.
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.
const DependencySheet::DepSet & Optika::DependencySheet::getDependenciesForParameter ( const Teuchos::ParameterEntry *  dependee  )  const

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

Parameters:
dependee The parameter whose dependencies are sought.
Returns:
A set of all dependencies associated with the dependee parameter.
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:
name The paramteter to be checked for dependents.
Returns:
True if the parameter you're checking has other dependents, false otherwise.
void Optika::DependencySheet::printDeps (  ) 

Prints out a list of the dependencies in the DependencySheet

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

Removes a particular dependency between two parameters.

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

The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Enumerations
Generated on Wed Apr 13 10:05:55 2011 for Optika by  doxygen 1.6.3