23 ConverterPair(condition->getTypeAttributeValue(), converterToAdd));
29 ConverterMap::const_iterator it =
33 "Could not find a ConditionXMLConverter for a condition of type " <<
35 "xml." << std::endl << std::endl
46 ConverterMap::const_iterator it =
getConverterMap().find(conditionType);
49 "Could not find a ConditionXMLConverter for a condition of type " <<
50 conditionType <<
" when reading in a condition from " <<
51 "xml." << std::endl << std::endl
60 return getConverter(*condition)->fromConditiontoXML(condition, entryIDsMap);
68 fromXMLtoCondition(xmlObject, entryIDsMap);
An xml converter for AndConditions.
An xml converter for StringConditions The valid XML represntation for a StringCondition is: ...
An xml converter for OrConditions.
An xml converter for NotConditions.
virtual std::string getTypeAttributeValue() const =0
Get the value that should be used for the condition type attribute when converting a condition to XML...
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.
An xml converter for EqualsConditions.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
Thrown when an appropriate Condition Converter can't be found.
static RCP< const ConditionXMLConverter > getConverter(const Condition &condition)
Get an appropriate ConditionXMLConverter given a Condition.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
std::pair< std::string, RCP< ConditionXMLConverter > > ConverterPair
convience typedef.
std::map< std::string, RCP< ConditionXMLConverter > > ConverterMap
convience class.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
A database for ConditionXMLConverters.
std::map< RCP< const ParameterEntry >, ParameterEntry::ParameterEntryID, RCPConstComp > EntryIDsMap
An xml converter for BoolConditions.
std::map< ParameterEntry::ParameterEntryID, RCP< ParameterEntry > > EntryIDsMap
Convenience typedef.
static XMLObject convertCondition(RCP< const Condition > condition, const XMLParameterListWriter::EntryIDsMap &entryIDsMap)
Given a condition and ConditiontoIDMap, converts the condition to XML.
Class for retrieving a dummy object of type T.
A Condition determines whether or not a particular set of conditions are currently occuring...
#define TEUCHOS_ADD_NUMBERCONDITION_CONVERTER(T)
Adds a NumberCondition of type T.
static void addConverter(RCP< const Condition > condition, RCP< ConditionXMLConverter > converterToAdd)
Add a converter to the database.
Smart reference counting pointer class for automatic garbage collection.
static const std::string & getTypeAttributeName()
Returns the string to be used for the type attribute.
const std::string & getRequired(const std::string &name) const
Get an attribute, throwing an std::exception if it is not found.
static ConverterMap & getConverterMap()
Gets the default converter to be used to convert Conditions.