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);
void convertCondition(const RCP< const Condition > condition, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const
RCP< ParameterCondition > getSpecificParameterCondition(const XMLObject &xmlObj, RCP< ParameterEntry > parameterEntry) const
A Bool Logic Condition that returns the result or perfroming a logical OR on the conditions.
virtual RCP< Condition > convertXML(const XMLObject &xmlObj, const XMLParameterListReader::EntryIDsMap &entryIDsMap) const
const std::string & getTag() const
Return the tag of the current node.
Array< T > & append(const T &x)
Add a new entry at the end of the array.
RCP< ParameterCondition > getSpecificParameterCondition(const XMLObject &xmlObj, RCP< ParameterEntry > parameterEntry) 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.
A Not condition returns the result of performing a logical NOT on a given condition.
RCP< BoolLogicCondition > getSpecificBoolLogicCondition(Condition::ConstConditionList &conditions) const
Thrown when a referenced ParameterEntry can't be found.
Thrown when a StringConditon is missing it's Value tag.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
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
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...
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
RCP< BoolLogicCondition > getSpecificBoolLogicCondition(Condition::ConstConditionList &conditions) const
A Bool Condition is a Parameter Condition that evaluates whether or not a Boolean parameter is ture...
std::map< ParameterEntry::ParameterEntryID, RCP< ParameterEntry > > EntryIDsMap
Convenience typedef.
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.
virtual void addSpecificXMLTraits(RCP< const ParameterCondition > condition, XMLObject &xmlObj) const =0
Adds specific xml traits to the xmlObj for a particular ParmaterCondtion.
RCP< BoolLogicCondition > getSpecificBoolLogicCondition(Condition::ConstConditionList &conditions) const
int numChildren() const
Return the number of child nodes owned by this node.
void addSpecificXMLTraits(RCP< const ParameterCondition > condition, XMLObject &xmlObj) const
A collection of Exceptions that can be potentially thrown when converting a ParameterList to and from...
virtual RCP< Condition > convertXML(const XMLObject &xmlObj, const XMLParameterListReader::EntryIDsMap &entryIDsMap) const
void convertCondition(const RCP< const Condition > condition, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const
An abstract parent class for all Bool Logic Conditions.
Smart reference counting pointer class for automatic garbage collection.
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...
const XMLObject & getChild(int i) const
Return the i-th child node.
void addSpecificXMLTraits(RCP< const ParameterCondition > condition, XMLObject &xmlObj) const
A collection of standard ConditionXMLConverters.
An Abstract Base class for all ParameterConditions.
const std::string & getRequired(const std::string &name) const
Get an attribute, throwing an std::exception if it is not found.
virtual RCP< Condition > convertXML(const XMLObject &xmlObj, const XMLParameterListReader::EntryIDsMap &entryIDsMap) const
Replacement for std::vector that is compatible with the Teuchos Memory Management classes...