43 #ifndef TEUCHOS_DEPENDENCYXMLCONVERTERDB_HPP
44 #define TEUCHOS_DEPENDENCYXMLCONVERTERDB_HPP
145 out <<
"Known DependencyXMLConverters: " << std::endl;
147 ConverterMap::const_iterator it = getConverterMap().begin();
148 it != getConverterMap().end();
151 out <<
"\t" << it->first <<std::endl;
163 typedef std::map<std::string, RCP<DependencyXMLConverter> > ConverterMap;
166 typedef std::pair<std::string, RCP<DependencyXMLConverter> >
172 static ConverterMap& getConverterMap();
189 #define TEUCHOS_ADD_DEP_CONVERTER(DEP_TYPE, CONVERTER) \
190 Teuchos::DependencyXMLConverterDB::addConverter( \
191 Teuchos::DummyObjectGetter< DEP_TYPE >:: \
193 Teuchos::rcp(new CONVERTER));
201 #define TEUCHOS_ADD_TEMPLATED_NUMBER_DEPS(T) \
202 TEUCHOS_ADD_NUMBER_VISUAL_DEP(T); \
203 TEUCHOS_ADD_RANGE_VALIDATOR_DEP(T); \
204 TEUCHOS_ADD_ARRAY_MODIFIER_DEP_GROUP(T);
210 #define TEUCHOS_ADD_NUMBER_VISUAL_DEP(T) \
211 Teuchos::DependencyXMLConverterDB::addConverter( \
212 Teuchos::DummyObjectGetter<Teuchos::NumberVisualDependency< T > >:: \
214 Teuchos::rcp(new Teuchos::NumberVisualDependencyXMLConverter< T >));
220 #define TEUCHOS_ADD_RANGE_VALIDATOR_DEP(T) \
221 Teuchos::DependencyXMLConverterDB::addConverter( \
222 Teuchos::DummyObjectGetter<Teuchos::RangeValidatorDependency< T > >:: \
224 Teuchos::rcp(new Teuchos::RangeValidatorDependencyXMLConverter< T >));
229 #define TEUCHOS_ADD_NUMBER_ARRAY_LENGTH_DEP(DEPENDEE_TYPE , DEPENDENT_TYPE) \
230 Teuchos::DependencyXMLConverterDB::addConverter( \
231 Teuchos::DummyObjectGetter<Teuchos::NumberArrayLengthDependency< \
232 DEPENDEE_TYPE , DEPENDENT_TYPE > >::getDummyObject(), \
233 Teuchos::rcp(new Teuchos::NumberArrayLengthDependencyXMLConverter< \
234 DEPENDEE_TYPE , DEPENDENT_TYPE >));
240 #define TEUCHOS_ADD_TWODROW_DEP(DEPENDEE_TYPE , DEPENDENT_TYPE) \
241 Teuchos::DependencyXMLConverterDB::addConverter( \
242 Teuchos::DummyObjectGetter<Teuchos::TwoDRowDependency< \
243 DEPENDEE_TYPE , DEPENDENT_TYPE > >::getDummyObject(), \
244 Teuchos::rcp(new Teuchos::TwoDRowDependencyXMLConverter< \
245 DEPENDEE_TYPE , DEPENDENT_TYPE >));
250 #define TEUCHOS_ADD_TWODCOL_DEP(DEPENDEE_TYPE , DEPENDENT_TYPE) \
251 Teuchos::DependencyXMLConverterDB::addConverter( \
252 Teuchos::DummyObjectGetter<Teuchos::TwoDColDependency< \
253 DEPENDEE_TYPE , DEPENDENT_TYPE > >::getDummyObject(), \
254 Teuchos::rcp(new Teuchos::TwoDColDependencyXMLConverter< \
255 DEPENDEE_TYPE , DEPENDENT_TYPE >));
261 #define TEUCHOS_ADD_ARRAY_MODIFIER_DEP_GROUP(DEPENDEE_TYPE) \
262 TEUCHOS_ADD_NUMBER_ARRAY_LENGTH_DEP( DEPENDEE_TYPE , std::string) \
263 TEUCHOS_ADD_NUMBER_ARRAY_LENGTH_DEP( DEPENDEE_TYPE , int) \
264 TEUCHOS_ADD_NUMBER_ARRAY_LENGTH_DEP( DEPENDEE_TYPE , long long int) \
265 TEUCHOS_ADD_NUMBER_ARRAY_LENGTH_DEP( DEPENDEE_TYPE , double) \
266 TEUCHOS_ADD_NUMBER_ARRAY_LENGTH_DEP( DEPENDEE_TYPE , float) \
267 TEUCHOS_ADD_TWODROW_DEP( DEPENDEE_TYPE , std::string) \
268 TEUCHOS_ADD_TWODROW_DEP( DEPENDEE_TYPE , int) \
269 TEUCHOS_ADD_TWODROW_DEP( DEPENDEE_TYPE , long long int) \
270 TEUCHOS_ADD_TWODROW_DEP( DEPENDEE_TYPE , double) \
271 TEUCHOS_ADD_TWODROW_DEP( DEPENDEE_TYPE , float) \
272 TEUCHOS_ADD_TWODCOL_DEP( DEPENDEE_TYPE , std::string) \
273 TEUCHOS_ADD_TWODCOL_DEP( DEPENDEE_TYPE , int) \
274 TEUCHOS_ADD_TWODCOL_DEP( DEPENDEE_TYPE , long long int) \
275 TEUCHOS_ADD_TWODCOL_DEP( DEPENDEE_TYPE , double) \
276 TEUCHOS_ADD_TWODCOL_DEP( DEPENDEE_TYPE , float)
279 #endif // TEUCHOS_DEPENDENCYXMLCONVERTERDB_HPP
Writes an XML object to a parameter list.
Provides ability to lookup DependencyXMLConverterDB.
Maps Validators to integers.
This class represents a depndency between elements in a Parameter List.
static void printKnownConverters(std::ostream &out)
prints the xml tags associated with all known converters
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
A collection of standard DependencyXMLConverters.
std::map< RCP< const ParameterEntry >, ParameterEntry::ParameterEntryID, RCPConstComp > EntryIDsMap
A class for mapping validators to integers.
A collection of standard dependencies.
std::map< ParameterEntry::ParameterEntryID, RCP< ParameterEntry > > EntryIDsMap
Convenience typedef.
Smart reference counting pointer class for automatic garbage collection.