43 #ifndef TEUCHOS_PARAMETERENTRYXMLCONVERTERDB_HPP
44 #define TEUCHOS_PARAMETERENTRYXMLCONVERTERDB_HPP
71 getConverterMap().insert(
72 ConverterPair(converterToAdd->getTypeAttributeValue(), converterToAdd));
113 const std::string& name,
117 return getConverter(entry)->fromParameterEntrytoXML(
118 entry, name,
id, validatorIDsMap);
126 return getConverter(xmlObj)->fromXMLtoParameterEntry(xmlObj);
139 static void printKnownConverters(std::ostream& out);
148 typedef std::map<std::string, RCP<ParameterEntryXMLConverter> >
ConverterMap;
151 typedef std::pair<std::string, RCP<ParameterEntryXMLConverter> >
ConverterPair;
172 #define TEUCHOS_ADD_TYPE_CONVERTER(T) \
174 Teuchos::ParameterEntryXMLConverterDB::addConverter( \
175 Teuchos::rcp(new Teuchos::StandardTemplatedParameterConverter< T >));
180 #define TEUCHOS_ADD_ARRAYTYPE_CONVERTER(T) \
181 Teuchos::ParameterEntryXMLConverterDB::addConverter( \
182 Teuchos::rcp(new Teuchos::StandardTemplatedParameterConverter< Teuchos::Array< T > >)); \
183 Teuchos::ParameterEntryXMLConverterDB::addConverter( \
184 Teuchos::rcp(new Teuchos::StandardTemplatedParameterConverter< Teuchos::TwoDArray< T > >));
189 #define TEUCHOS_ADD_TYPE_AND_ARRAYTYPE_CONVERTER(T) \
191 TEUCHOS_ADD_TYPE_CONVERTER(T); \
192 TEUCHOS_ADD_ARRAYTYPE_CONVERTER(T);
195 #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.