15 parameterEntry_(parameter)
19 "Parameter conditions can't be given a null parameter" <<
20 std::endl << std::endl);
32 conditions_(conditions)
36 "You must provide at least one condition "
37 "when you're constructing a BoolLogicCondition. "
38 << std::endl << std::endl <<
39 "Error: Empty condition list given to a BoolLogicCondition "
50 bool toReturn = (*it)->isConditionTrue();
52 for(;it != conditions_.
end(); ++it){
61 it!=conditions_.
end();
64 if((*it)->containsAtLeasteOneParameter()){
77 it != conditions_.
end();
80 currentList = (*it)->getAllParameters();
81 toReturn.insert(currentList.begin(), currentList.end());
126 childCondition_(childCondition)
130 "OOOOOOOOPppppps! Looks like you tried "
132 "a null pointer when you were making a not conditon. "
133 "That's a no no. Go back and "
134 "checkout your not conditions and make sure you didn't "
135 "give any of them a null pointer "
136 "as an argument to the constructor." << std::endl << std::endl <<
137 "Error: Null pointer given to NotCondition constructor.");
141 return (!childCondition_->isConditionTrue());
145 return childCondition_->containsAtLeasteOneParameter();
149 return childCondition_->getAllParameters();
163 checkParameterType();
172 checkParameterType();
175 void StringCondition::checkParameterType(){
178 "The parameter of a String Condition "
179 "must be of type string." << std::endl <<
182 std::endl << std::endl);
193 std::string empty =
"";
202 "The parameter of a Bool Condition "
204 "Expected type: Bool" << std::endl <<
206 std::endl << std::endl);
bool containsAtLeasteOneParameter() const
A Bool Logic Condition that returns the result or perfroming a logical OR on the conditions.
bool isConditionTrue() const
EqualsCondition(ConstConditionList &conditions)
Constructs an Equals Condition.
Array< T > & append(const T &x)
Add a new entry at the end of the array.
static RCP< T > getDummyObject()
Retrieves a dummy object of type T.
std::set< RCP< const ParameterEntry >, RCPConstComp > ConstParameterEntryList
A list of dependents.
BoolLogicCondition(ConstConditionList &conditions)
Constructs a BoolLogicCondition.
Dependency::ConstParameterEntryList getAllParameters() const
This object is held as the "value" in the Teuchos::ParameterList std::map.
bool is_null(const std::shared_ptr< T > &p)
Returns true if p.get()==NULL.
A Bool Logic Condition that returns the result or perfroming a logical AND on the conditions...
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
A Not condition returns the result of performing a logical NOT on a given condition.
ParameterCondition(RCP< const ParameterEntry > parameter)
Constructs a Parameter Condition.
NotCondition(RCP< const Condition > condition)
Constructs a Not Condition.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
A String Condition is a Parameter Condition that evaluates whether or not a string parameter has take...
bool applyOperator(bool op1, bool op2) const
AndCondition(ConstConditionList &conditions)
Constructs an And Condition.
bool containsAtLeasteOneParameter() const
A Bool Logic Condition that returns the result or perfroming a logical EQUALS on the conditions...
Dependency::ConstParameterEntryList getAllParameters() const
std::vector< T >::const_iterator const_iterator
The type of a const forward iterator.
A Bool Condition is a Parameter Condition that evaluates whether or not a Boolean parameter is ture...
Default traits class that just returns typeid(T).name().
virtual bool applyOperator(bool op1, bool op2) const =0
Applies a Bool Logic operator to two operands and returns the result.
Class for retrieving a dummy object of type T.
An abstract parent class for all Bool Logic Conditions.
OrCondition(ConstConditionList &conditions)
Constructs an Or Condition.
RCP< const ParameterEntry > getParameter() const
Gets a const pointer to the Parameter being evaluated by this ParameterCondition. ...
bool applyOperator(bool op1, bool op2) const
Smart reference counting pointer class for automatic garbage collection.
bool evaluateParameter() const
bool evaluateParameter() const
StringCondition(RCP< const ParameterEntry > parameter, std::string value)
Constructs a String Condition.
An Abstract Base class for all ParameterConditions.
Dependency::ConstParameterEntryList getAllParameters() const
Gets all of the parameters that are evaluated in this condition.
bool applyOperator(bool op1, bool op2) const
BoolCondition(RCP< const ParameterEntry > parameter)
Constructs a Bool Condition.
void addCondition(RCP< const Condition > toAdd)
Adds a Condition to the list of conditions that will be evaluated by this Bool Logic Condition...
Standard Conditions to be used.
std::string typeName(const T &t)
Template function for returning the concrete type name of a passed-in object.
virtual bool isConditionTrue() const
Replacement for std::vector that is compatible with the Teuchos Memory Management classes...