72 it != conditions.end();
116 castedCondition->getChildCondition(), entryIDsMap));
125 getParameterEntryIdAttributeName());
127 entryIDsMap.find(paramID) == entryIDsMap.end(),
129 "Can't find a parameter entry with id " << paramID <<
" in the " 130 "given entryIDsMap!" << std::endl << std::endl);
132 xmlObj, entryIDsMap.find(paramID)->second);
144 entryIDsMap.find(castedCondition->getParameter()) == entryIDsMap.end(),
146 "Couldn't find an id for the parameter in the given entryIDsMap!" <<
147 std::endl << std::endl);
150 getParameterEntryIdAttributeName(),
151 entryIDsMap.find(castedCondition->getParameter())->second);
165 "A StringCondtion must have a tag with the name " <<
166 getValuesTagName() <<
" as one of it's children!");
171 if(child.
getTag() == getStringTagName()){
186 castedCon->getValueList().begin();
187 it != castedCon->getValueList().end();
191 stringTag.
addAttribute(getStringValueAttributeName(), *it);
192 valueTag.addChild(stringTag);
A Bool Logic Condition that returns the result or perfroming a logical OR on the conditions.
Array< T > & append(const T &x)
Add a new entry at the end of the array.
virtual RCP< Condition > convertXML(const XMLObject &xmlObj, const XMLParameterListReader::EntryIDsMap &entryIDsMap) const
RCP< BoolLogicCondition > getSpecificBoolLogicCondition(Condition::ConstConditionList &conditions) const
A collection of Exceptions thrown when converting Conditions to and from XML.
static RCP< Condition > convertXML(const XMLObject &xmlObject, const XMLParameterListReader::EntryIDsMap &entryIDsMap)
Given an XMLObject and IDtoConditionMap, converts the XMLObject to a Condition.
virtual RCP< ParameterCondition > getSpecificParameterCondition(const XMLObject &xmlObj, RCP< ParameterEntry > parameterEntry) const =0
Gets the specific ParameterCondition to be returned by this conveter when converting from XML...
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.
void addChild(const XMLObject &child)
Add a child node to the node.
const XMLObject & getChild(int i) const
Return the i-th child node.
A Not condition returns the result of performing a logical NOT on a given condition.
virtual RCP< Condition > convertXML(const XMLObject &xmlObj, const XMLParameterListReader::EntryIDsMap &entryIDsMap) const
Thrown when a referenced ParameterEntry can't be found.
RCP< ParameterCondition > getSpecificParameterCondition(const XMLObject &xmlObj, RCP< ParameterEntry > parameterEntry) const
RCP< ParameterCondition > getSpecificParameterCondition(const XMLObject &xmlObj, RCP< ParameterEntry > parameterEntry) const
void addSpecificXMLTraits(RCP< const ParameterCondition > condition, XMLObject &xmlObj) const
Thrown when a StringConditon is missing it's Value tag.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
virtual RCP< Condition > convertXML(const XMLObject &xmlObj, const XMLParameterListReader::EntryIDsMap &entryIDsMap) const
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
A database for ConditionXMLConverters.
A String Condition is a Parameter Condition that evaluates whether or not a string parameter has take...
std::map< RCP< const ParameterEntry >, ParameterEntry::ParameterEntryID, RCPConstComp > EntryIDsMap
void convertCondition(const RCP< const Condition > condition, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const
RCP< BoolLogicCondition > getSpecificBoolLogicCondition(Condition::ConstConditionList &conditions) const
void addAttribute(const std::string &name, T value)
Lookup whether or not Doubles are allowed.
A Bool Logic Condition that returns the result or perfroming a logical EQUALS on the conditions...
void convertCondition(const RCP< const Condition > condition, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const
const std::string & getTag() const
Return the tag of the current node.
std::vector< T >::const_iterator const_iterator
The type of a const forward iterator.
virtual RCP< BoolLogicCondition > getSpecificBoolLogicCondition(Condition::ConstConditionList &conditions) const =0
Gets the specific BoolLogicCondition to be returned by this conveter when converting from XML...
unsigned int ParameterEntryID
A Bool Condition is a Parameter Condition that evaluates whether or not a Boolean parameter is ture...
void convertCondition(const RCP< const Condition > condition, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const
std::map< ParameterEntry::ParameterEntryID, RCP< ParameterEntry > > EntryIDsMap
Convenience typedef.
int findFirstChild(std::string tagName) const
Returns the index of the first child found with the given tag name. Returns -1 if no child is found...
void push_back(const value_type &x)
static XMLObject convertCondition(RCP< const Condition > condition, const XMLParameterListWriter::EntryIDsMap &entryIDsMap)
Given a condition and ConditiontoIDMap, converts the condition to XML.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos, as well as a number of utility routines.
const std::string & getRequired(const std::string &name) const
Get an attribute, throwing an std::exception if it is not found.
virtual void addSpecificXMLTraits(RCP< const ParameterCondition > condition, XMLObject &xmlObj) const =0
Adds specific xml traits to the xmlObj for a particular ParmaterCondtion.
A collection of Exceptions that can be potentially thrown when converting a ParameterList to and from...
void addSpecificXMLTraits(RCP< const ParameterCondition > condition, XMLObject &xmlObj) const
int numChildren() const
Return the number of child nodes owned by this node.
An abstract parent class for all Bool Logic Conditions.
Smart reference counting pointer class for automatic garbage collection.
A collection of standard ConditionXMLConverters.
An Abstract Base class for all ParameterConditions.
RCP< BoolLogicCondition > getSpecificBoolLogicCondition(Condition::ConstConditionList &conditions) const
Replacement for std::vector that is compatible with the Teuchos Memory Management classes...