42#include "Teuchos_Dependency.hpp"
48Dependency::Dependency(
53 checkDependeesAndDependents();
54 createConstDependents();
57Dependency::Dependency(
63 checkDependeesAndDependents();
64 createConstDependents();
68Dependency::Dependency(
74 checkDependeesAndDependents();
75 createConstDependents();
78Dependency::Dependency(
84 checkDependeesAndDependents();
85 createConstDependents();
89void Dependency::createConstDependents(){
91 ParameterEntryList::iterator
it = dependents_.begin();
92 it != dependents_.end();
101 out <<
"Number of dependees: " << dependees_.size() << std::endl;
102 out <<
"Number of dependents: " << dependents_.size() << std::endl;
106void Dependency::checkDependeesAndDependents(){
107 ConstParameterEntryList::iterator
it1 = dependees_.begin();
108 for(;
it1 != dependees_.end(); ++
it1){
111 "Cannot have a null dependee!" << std::endl << std::endl);
114 ParameterEntryList::iterator it2 = dependents_.begin();
115 for(; it2 != dependents_.end(); ++it2){
117 InvalidDependencyException,
118 "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,...