49 parameterEntry_(parameter)
53 "Parameter conditions can't be given a null parameter" <<
54 std::endl << std::endl);
66 conditions_(conditions)
70 "You must provide at least one condition "
71 "when you're constructing a BoolLogicCondition. "
72 << std::endl << std::endl <<
73 "Error: Empty condition list given to a BoolLogicCondition "
84 bool toReturn = (*it)->isConditionTrue();
86 for(;it != conditions_.
end(); ++it){
95 it!=conditions_.
end();
98 if((*it)->containsAtLeasteOneParameter()){
111 it != conditions_.
end();
114 currentList = (*it)->getAllParameters();
115 toReturn.insert(currentList.begin(), currentList.end());
160 childCondition_(childCondition)
164 "OOOOOOOOPppppps! Looks like you tried "
166 "a null pointer when you were making a not conditon. "
167 "That's a no no. Go back and "
168 "checkout your not conditions and make sure you didn't "
169 "give any of them a null pointer "
170 "as an argument to the constructor." << std::endl << std::endl <<
171 "Error: Null pointer given to NotCondition constructor.");
175 return (!childCondition_->isConditionTrue());
179 return childCondition_->containsAtLeasteOneParameter();
183 return childCondition_->getAllParameters();
197 checkParameterType();
206 checkParameterType();
209void StringCondition::checkParameterType(){
212 "The parameter of a String Condition "
213 "must be of type string." << std::endl <<
216 std::endl << std::endl);
227 std::string empty =
"";
236 "The parameter of a Bool Condition "
238 "Expected type: Bool" << std::endl <<
240 std::endl << std::endl);
Standard Conditions to be used.
A Bool Logic Condition that returns the result or perfroming a logical AND on the conditions.
AndCondition(ConstConditionList &conditions)
Constructs an And Condition.
bool applyOperator(bool op1, bool op2) const
Replacement for std::vector that is compatible with the Teuchos Memory Management classes.
std::vector< T >::const_iterator const_iterator
The type of a const forward iterator.
Array< T > & append(const T &x)
Add a new entry at the end of the array.
A Bool Condition is a Parameter Condition that evaluates whether or not a Boolean parameter is ture.
bool evaluateParameter() const
BoolCondition(RCP< const ParameterEntry > parameter)
Constructs a Bool Condition.
An abstract parent class for all Bool Logic Conditions.
Dependency::ConstParameterEntryList getAllParameters() const
BoolLogicCondition(ConstConditionList &conditions)
Constructs a BoolLogicCondition.
void addCondition(RCP< const Condition > toAdd)
Adds a Condition to the list of conditions that will be evaluated by this Bool Logic Condition.
virtual bool isConditionTrue() const
bool containsAtLeasteOneParameter() const
virtual bool applyOperator(bool op1, bool op2) const =0
Applies a Bool Logic operator to two operands and returns the result.
std::set< RCP< const ParameterEntry >, RCPConstComp > ConstParameterEntryList
A list of dependents.
Class for retrieving a dummy object of type T.
static RCP< T > getDummyObject()
Retrieves a dummy object of type T.
A Bool Logic Condition that returns the result or perfroming a logical EQUALS on the conditions.
bool applyOperator(bool op1, bool op2) const
EqualsCondition(ConstConditionList &conditions)
Constructs an Equals Condition.
A Not condition returns the result of performing a logical NOT on a given condition.
Dependency::ConstParameterEntryList getAllParameters() const
bool isConditionTrue() const
bool containsAtLeasteOneParameter() const
NotCondition(RCP< const Condition > condition)
Constructs a Not Condition.
A Bool Logic Condition that returns the result or perfroming a logical OR on the conditions.
OrCondition(ConstConditionList &conditions)
Constructs an Or Condition.
bool applyOperator(bool op1, bool op2) const
An Abstract Base class for all ParameterConditions.
ParameterCondition(RCP< const ParameterEntry > parameter)
Constructs a Parameter Condition.
RCP< const ParameterEntry > getParameter() const
Gets a const pointer to the Parameter being evaluated by this ParameterCondition.
Dependency::ConstParameterEntryList getAllParameters() const
Gets all of the parameters that are evaluated in this condition.
This object is held as the "value" in the Teuchos::ParameterList std::map.
Smart reference counting pointer class for automatic garbage collection.
A String Condition is a Parameter Condition that evaluates whether or not a string parameter has take...
StringCondition(RCP< const ParameterEntry > parameter, std::string value)
Constructs a String Condition.
bool evaluateParameter() const
Default traits class that just returns typeid(T).name().
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
bool is_null(const std::shared_ptr< T > &p)
Returns true if p.get()==NULL.
std::string typeName(const T &t)
Template function for returning the concrete type name of a passed-in object.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.