10#ifndef TEUCHOS_STANDARDCONDITION_HPP_
11#define TEUCHOS_STANDARDCONDITION_HPP_
18#include "Teuchos_InvalidConditionException.hpp"
20#include "Teuchos_StandardFunctionObjects.hpp"
69 return parameterEntry_.getConst();
153 return "StringCondition";
161 bool evaluateParameter()
const;
186 void checkParameterType();
270 if(!func_.is_null()){
271 value = func_->runFunction(value);
285 return func_.getConst();
363 return "BoolCondition";
371 bool evaluateParameter()
const;
473 virtual bool isConditionTrue()
const;
476 bool containsAtLeasteOneParameter()
const;
491 ConstConditionList conditions_;
529 return "OrCondition";
538 bool applyOperator(
bool op1,
bool op2)
const;
600 return "AndCondition";
610 bool applyOperator(
bool op1,
bool op2)
const;
672 return "EqualsCondition";
681 bool applyOperator(
bool op1,
bool op2)
const;
745 return childCondition_;
754 bool isConditionTrue()
const;
757 bool containsAtLeasteOneParameter()
const;
763 return "NotCondition";
An object to determin if a particular set of conditions are occuring.
Templated Parameter List class.
Defines basic traits for the scalar field type.
A Bool Logic Condition that returns the result or perfroming a logical AND on the conditions.
virtual ~AndCondition()
Deconstructs an And Condition.
std::string getTypeAttributeValue() const
Get the value that should be used for the condition type attribute when converting a condition to XML...
AndCondition(ConstConditionList &conditions)
Constructs an And Condition.
Replacement for std::vector that is compatible with the Teuchos Memory Management classes.
A Bool Condition is a Parameter Condition that evaluates whether or not a Boolean parameter is ture.
std::string getTypeAttributeValue() const
Get the value that should be used for the condition type attribute when converting a condition to XML...
BoolCondition(RCP< const ParameterEntry > parameter)
Constructs a Bool Condition.
const ConstConditionList & getConditions() const
Gets a list of all conditions that are a part of this BoolLogicCondition/.
virtual ~BoolLogicCondition()
Deconstructor for a BoolLogicCondition.
BoolLogicCondition(ConstConditionList &conditions)
Constructs a BoolLogicCondition.
virtual bool applyOperator(bool op1, bool op2) const =0
Applies a Bool Logic operator to two operands and returns the result.
Condition()
Constructs a Condition.
std::set< RCP< const ParameterEntry >, RCPConstComp > ConstParameterEntryList
A list of dependents.
static RCP< AndCondition > getDummyObject()
Retrieves a dummy object of type AndCondition.
static RCP< BoolCondition > getDummyObject()
Retrieves a dummy object of type BoolCondition.
static RCP< EqualsCondition > getDummyObject()
Retrieves a dummy object of type EqualsCondition.
static RCP< NotCondition > getDummyObject()
Retrieves a dummy object of type NotCondition.
static RCP< NumberCondition< T > > getDummyObject()
Retrieves a dummy object of type NumberCondition.
static RCP< OrCondition > getDummyObject()
Retrieves a dummy object of type OrCondition.
static RCP< StringCondition > getDummyObject()
Retrieves a dummy object of type StringCondition.
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.
EqualsCondition(ConstConditionList &conditions)
Constructs an Equals Condition.
std::string getTypeAttributeValue() const
Get the value that should be used for the condition type attribute when converting a condition to XML...
virtual ~EqualsCondition()
Deconstructs an Equals Condition.
A Not condition returns the result of performing a logical NOT on a given condition.
NotCondition(RCP< const Condition > condition)
Constructs a Not Condition.
RCP< const Condition > getChildCondition() const
Retrieve the child condition.
virtual ~NotCondition()
Deconstructs a Not Condition.
std::string getTypeAttributeValue() const
Get the value that should be used for the condition type attribute when converting a condition to XML...
A Number Condition is a Parameter Condition that evaluates whether or not a number parameter is great...
bool evaluateParameter() const
NumberCondition(RCP< const ParameterEntry > parameter, RCP< const SimpleFunctionObject< T > > func=null)
Constructs a Number Condition.
RCP< const SimpleFunctionObject< T > > getFunctionObject() const
Gets the funciton this NumberCondition is using. Returns null if the NumberCondition is not using one...
std::string getTypeAttributeValue() const
Get the value that should be used for the condition type attribute when converting a condition to XML...
A Bool Logic Condition that returns the result or perfroming a logical OR on the conditions.
std::string getTypeAttributeValue() const
Get the value that should be used for the condition type attribute when converting a condition to XML...
virtual ~OrCondition()
Deconstructs an Or Condition.
OrCondition(ConstConditionList &conditions)
Constructs an Or Condition.
ParameterCondition(RCP< const ParameterEntry > parameter)
Constructs a Parameter Condition.
bool containsAtLeasteOneParameter() const
Determines whether or not the evaluation of a parameter occurs somewhere in this condition.
RCP< const ParameterEntry > getParameter() const
Gets a const pointer to the Parameter being evaluated by this ParameterCondition.
virtual bool evaluateParameter() const =0
bool isConditionTrue() const
Determins whether or not a condition is true.
This object is held as the "value" in the Teuchos::ParameterList std::map.
T & getValue(const ParameterEntry &entry)
A templated helper function for returning the value of type T held in the ParameterEntry object,...
Smart reference counting pointer class for automatic garbage collection.
A simple function object that applies a given operand to a spcified arguement using a specific operat...
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.
std::string getTypeAttributeValue() const
Get the value that should be used for the condition type attribute when converting a condition to XML...
Array< std::string > ValueList
Convience typedef representing an array of strings.
const ValueList & getValueList() const
Returns the value list being used with this StringCondition.
static std::string name()
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.
static T zero()
Returns representation of zero for this scalar type.