10 #ifndef TEUCHOS_PARAMETERENTRYXMLCONVERTERDB_HPP
11 #define TEUCHOS_PARAMETERENTRYXMLCONVERTERDB_HPP
38 getConverterMap().insert(
39 ConverterPair(converterToAdd->getTypeAttributeValue(), converterToAdd));
80 const std::string& name,
84 return getConverter(entry)->fromParameterEntrytoXML(
85 entry, name,
id, validatorIDsMap);
93 return getConverter(xmlObj)->fromXMLtoParameterEntry(xmlObj);
106 static void printKnownConverters(std::ostream& out);
115 typedef std::map<std::string, RCP<ParameterEntryXMLConverter> >
ConverterMap;
118 typedef std::pair<std::string, RCP<ParameterEntryXMLConverter> >
ConverterPair;
139 #define TEUCHOS_ADD_TYPE_CONVERTER(T) \
141 Teuchos::ParameterEntryXMLConverterDB::addConverter( \
142 Teuchos::rcp(new Teuchos::StandardTemplatedParameterConverter< T >));
147 #define TEUCHOS_ADD_ARRAYTYPE_CONVERTER(T) \
148 Teuchos::ParameterEntryXMLConverterDB::addConverter( \
149 Teuchos::rcp(new Teuchos::StandardTemplatedParameterConverter< Teuchos::Array< T > >)); \
150 Teuchos::ParameterEntryXMLConverterDB::addConverter( \
151 Teuchos::rcp(new Teuchos::StandardTemplatedParameterConverter< Teuchos::TwoDArray< T > >));
156 #define TEUCHOS_ADD_TYPE_AND_ARRAYTYPE_CONVERTER(T) \
158 TEUCHOS_ADD_TYPE_CONVERTER(T); \
159 TEUCHOS_ADD_ARRAYTYPE_CONVERTER(T);
162 #endif // TEUCHOS_PARAMETERENTRYXMLCONVERTERDB_HPP
This object is held as the "value" in the Teuchos::ParameterList std::map.
A collection of standard ParameterEntryXMLConverters.
Provides ability to lookup ParameterEntryXMLConverters.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
Writes a ParameterList to an XML object.
std::pair< std::string, RCP< ParameterEntryXMLConverter > > ConverterPair
convience typedef
A class for mapping validators to integers.
std::map< std::string, RCP< ParameterEntryXMLConverter > > ConverterMap
convience typedef
#define TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
unsigned int ParameterEntryID
static XMLObject convertEntry(RCP< const ParameterEntry > entry, const std::string &name, const ParameterEntry::ParameterEntryID &id, const ValidatortoIDMap &validatorIDsMap)
Converts the given ParameterEntry to XML.
static void addConverter(RCP< ParameterEntryXMLConverter > converterToAdd)
Add a converter to the database.
static ParameterEntry convertXML(const XMLObject &xmlObj)
Converts XML to a ParameterEntry.
A collection of Exceptions that can be potentially thrown when converting a ParameterList to and from...
Smart reference counting pointer class for automatic garbage collection.