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);
131 return getSpecificParameterCondition(
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);
153 addSpecificXMLTraits(castedCondition, xmlObj);
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.
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
const std::string & getRequired(const std::string &name) const
Get an attribute, throwing an std::exception if it is not found.
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
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.
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
virtual RCP< BoolLogicCondition > getSpecificBoolLogicCondition(Condition::ConstConditionList &conditions) const =0
Gets the specific BoolLogicCondition to be returned by this conveter when converting from XML...
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.
virtual RCP< Condition > convertXML(const XMLObject &xmlObj, const XMLParameterListReader::EntryIDsMap &entryIDsMap) const
Memory-safe templated array class that encapsulates std::vector.