10#include "Teuchos_Dependency.hpp"
16Dependency::Dependency(
21 checkDependeesAndDependents();
22 createConstDependents();
25Dependency::Dependency(
31 checkDependeesAndDependents();
32 createConstDependents();
36Dependency::Dependency(
42 checkDependeesAndDependents();
43 createConstDependents();
46Dependency::Dependency(
52 checkDependeesAndDependents();
53 createConstDependents();
57void Dependency::createConstDependents(){
59 ParameterEntryList::iterator
it = dependents_.begin();
60 it != dependents_.end();
69 out <<
"Number of dependees: " << dependees_.size() << std::endl;
70 out <<
"Number of dependents: " << dependents_.size() << std::endl;
74void Dependency::checkDependeesAndDependents(){
75 ConstParameterEntryList::iterator
it1 = dependees_.begin();
76 for(;
it1 != dependees_.end(); ++
it1){
79 "Cannot have a null dependee!" << std::endl << std::endl);
82 ParameterEntryList::iterator it2 = dependents_.begin();
83 for(; it2 != dependents_.end(); ++it2){
85 InvalidDependencyException,
86 "Cannot have a null dependent!" << std::endl << std::endl);
virtual std::string getTypeAttributeValue() const =0
Returns the string to be used for the value of the type attribute when converting the dependency to X...
std::set< RCP< ParameterEntry >, RCPComp > ParameterEntryList
A list of Dependees.
virtual void print(std::ostream &out) const
prints out information about the dependency.
std::set< RCP< const ParameterEntry >, RCPConstComp > ConstParameterEntryList
A list of dependents.
Smart reference counting pointer class for automatic garbage collection.
RCP< const T > getConst() const
Return an RCP<const T> version of *this.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...