Teuchos Package Browser (Single Doxygen Collection)  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

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...
 

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...
 

Private Members

DepMap dependenciesMap_
 A map containing all the depenecies for a list. More...
 
DepSet dependencies_
 A simple set of all the dependencies in this Dependency Sheet. More...
 
std::string name_
 The Name of the dependency sheet. More...
 

Detailed Description

A Dependency sheet keeps track of dependencies between various ParameterEntries.

Definition at line 27 of file Teuchos_DependencySheet.hpp.

Member Typedef Documentation

Convience typedef representing a set of dependencies.

Definition at line 37 of file Teuchos_DependencySheet.hpp.

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

Definition at line 43 of file Teuchos_DependencySheet.hpp.

Constructor & Destructor Documentation

Teuchos::DependencySheet::DependencySheet ( )

Constructs an empty DependencySheet with the name DEP_ANONYMOUS.

Definition at line 16 of file Teuchos_DependencySheet.cpp.

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

Constructs a DependencySheet.

Parameters
nameName of the Dependency Sheet.

Definition at line 20 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 24 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 64 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 36 of file Teuchos_DependencySheet.cpp.

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

sets the name of the dependency sheet

Definition at line 94 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 110 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 48 of file Teuchos_DependencySheet.cpp.

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

Gets the name of the dependency sheet.

Definition at line 129 of file Teuchos_DependencySheet.hpp.

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

Determines whether or not this dependency sheet has any dependencies.

Definition at line 136 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 149 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 158 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 165 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 172 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 183 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 57 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 200 of file Teuchos_DependencySheet.hpp.

Member Data Documentation

DepMap Teuchos::DependencySheet::dependenciesMap_
private

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 each dependency of which it is a part.

Definition at line 218 of file Teuchos_DependencySheet.hpp.

DepSet Teuchos::DependencySheet::dependencies_
private

A simple set of all the dependencies in this Dependency Sheet.

Definition at line 223 of file Teuchos_DependencySheet.hpp.

std::string Teuchos::DependencySheet::name_
private

The Name of the dependency sheet.

Definition at line 228 of file Teuchos_DependencySheet.hpp.


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