Teuchos - Trilinos Tools Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
Teuchos::DependencySheet Class Reference

A Dependency sheet keeps track of dependencies between various ParameterEntries. More...

#include <Teuchos_DependencySheet.hpp>

Public Types

Public types
typedef std::set< RCP
< Dependency >, RCPComp
DepSet
 Convience typedef representing a set of dependencies. More...
 
typedef map< RCP< const
ParameterEntry >, DepSet,
RCPConstComp
DepMap
 Convience typedef. Maps dependee parameter entries to a set of their corresponding dependencies. More...
 

Public Member Functions

Constructors/Destructor
 DependencySheet ()
 Constructs an empty DependencySheet with the name DEP_ANONYMOUS. More...
 
 DependencySheet (const std::string &name)
 Constructs a DependencySheet. More...
 
Add/Remove Functions
void addDependency (RCP< Dependency > dependency)
 Adds a dependency to the sheet. More...
 
void addDependencies (RCP< DependencySheet > otherSheet)
 Adds a dependencies from another she to this sheet. More...
 
void removeDependency (RCP< Dependency > dependency)
 Removes a particular dependency between two parameters. More...
 
void setName (const std::string newName)
 sets the name of the dependency sheet More...
 
Attribute/Query Functions
bool hasDependents (RCP< const ParameterEntry > dependee) const
 Determines whether or not a parameter is depended upon by any another parameters or parameter lists. More...
 
RCP< const DepSetgetDependenciesForParameter (RCP< const ParameterEntry > dependee) const
 Returns a set of all the dependencies associated with a particular dependee. If no dependencies with the given dependee have ever been enetered into the sheet then a null reference is returned. More...
 
const std::string & getName () const
 Gets the name of the dependency sheet. More...
 
bool empty () const
 Determines whether or not this dependency sheet has any dependencies. More...
 
Iterator Functions
DepSet::iterator depBegin ()
 Returns an iterator to the beginning of all the dependees in the sheet. More...
 
DepSet::iterator depEnd ()
 
DepSet::const_iterator depBegin () const
 Returns a const iterator to the beginning of all the dependees in the sheet. More...
 
DepSet::const_iterator depEnd () const
 Returns a const iterator to the end of all of the dependees in the sheet. More...
 
DepSet::size_type size ()
 Returns the number of Dependencies in this DependencySheet. More...
 

I/O Functions

void printDeps (std::ostream &out) const
 Prints out a list of the dependencies in the DependencySheet. More...
 
static const std::string & getNameAttributeName ()
 When serializing to XML, this string should be used as the name of the name attribute. More...
 

Detailed Description

A Dependency sheet keeps track of dependencies between various ParameterEntries.

Definition at line 61 of file Teuchos_DependencySheet.hpp.

Member Typedef Documentation

Convience typedef representing a set of dependencies.

Definition at line 71 of file Teuchos_DependencySheet.hpp.

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

Definition at line 77 of file Teuchos_DependencySheet.hpp.

Constructor & Destructor Documentation

Teuchos::DependencySheet::DependencySheet ( )

Constructs an empty DependencySheet with the name DEP_ANONYMOUS.

Definition at line 50 of file Teuchos_DependencySheet.cpp.

Teuchos::DependencySheet::DependencySheet ( const std::string &  name)

Constructs a DependencySheet.

Parameters
nameName of the Dependency Sheet.

Definition at line 54 of file Teuchos_DependencySheet.cpp.

Member Function Documentation

void Teuchos::DependencySheet::addDependency ( RCP< Dependency dependency)

Adds a dependency to the sheet.

Parameters
dependencyThe dependency to be added.

Definition at line 58 of file Teuchos_DependencySheet.cpp.

void Teuchos::DependencySheet::addDependencies ( RCP< DependencySheet otherSheet)

Adds a dependencies from another she to this sheet.

Parameters
otherSheetThe other sheet from which to add dependencies.

Definition at line 98 of file Teuchos_DependencySheet.cpp.

void Teuchos::DependencySheet::removeDependency ( RCP< 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 70 of file Teuchos_DependencySheet.cpp.

void Teuchos::DependencySheet::setName ( const std::string  newName)
inline

sets the name of the dependency sheet

Definition at line 128 of file Teuchos_DependencySheet.hpp.

bool Teuchos::DependencySheet::hasDependents ( RCP< const ParameterEntry dependee) const
inline

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 144 of file Teuchos_DependencySheet.hpp.

RCP< const DependencySheet::DepSet > Teuchos::DependencySheet::getDependenciesForParameter ( RCP< const ParameterEntry dependee) const

Returns a set of all the dependencies associated with a particular dependee. If no dependencies with the given dependee have ever been enetered into the sheet then a null reference is returned.

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

Definition at line 82 of file Teuchos_DependencySheet.cpp.

const std::string& Teuchos::DependencySheet::getName ( ) const
inline

Gets the name of the dependency sheet.

Definition at line 163 of file Teuchos_DependencySheet.hpp.

bool Teuchos::DependencySheet::empty ( ) const
inline

Determines whether or not this dependency sheet has any dependencies.

Definition at line 170 of file Teuchos_DependencySheet.hpp.

DepSet::iterator Teuchos::DependencySheet::depBegin ( )
inline

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

Definition at line 183 of file Teuchos_DependencySheet.hpp.

DepSet::iterator Teuchos::DependencySheet::depEnd ( )
inline

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 192 of file Teuchos_DependencySheet.hpp.

DepSet::const_iterator Teuchos::DependencySheet::depBegin ( ) const
inline

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

Definition at line 199 of file Teuchos_DependencySheet.hpp.

DepSet::const_iterator Teuchos::DependencySheet::depEnd ( ) const
inline

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

Definition at line 206 of file Teuchos_DependencySheet.hpp.

DepSet::size_type Teuchos::DependencySheet::size ( )
inline

Returns the number of Dependencies in this DependencySheet.

Returns
The number of Depenedencies in this DependencySheet.

Definition at line 217 of file Teuchos_DependencySheet.hpp.

void Teuchos::DependencySheet::printDeps ( std::ostream &  out) const

Prints out a list of the dependencies in the DependencySheet.

Definition at line 91 of file Teuchos_DependencySheet.cpp.

static const std::string& Teuchos::DependencySheet::getNameAttributeName ( )
inlinestatic

When serializing to XML, this string should be used as the name of the name attribute.

Definition at line 234 of file Teuchos_DependencySheet.hpp.


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