10 #ifndef TEUCHOS_DEPENDENCYXMLCONVERTERDB_HPP
11 #define TEUCHOS_DEPENDENCYXMLCONVERTERDB_HPP
112 out <<
"Known DependencyXMLConverters: " << std::endl;
114 ConverterMap::const_iterator it = getConverterMap().begin();
115 it != getConverterMap().end();
118 out <<
"\t" << it->first <<std::endl;
130 typedef std::map<std::string, RCP<DependencyXMLConverter> > ConverterMap;
133 typedef std::pair<std::string, RCP<DependencyXMLConverter> >
139 static ConverterMap& getConverterMap();
156 #define TEUCHOS_ADD_DEP_CONVERTER(DEP_TYPE, CONVERTER) \
157 Teuchos::DependencyXMLConverterDB::addConverter( \
158 Teuchos::DummyObjectGetter< DEP_TYPE >:: \
160 Teuchos::rcp(new CONVERTER));
168 #define TEUCHOS_ADD_TEMPLATED_NUMBER_DEPS(T) \
169 TEUCHOS_ADD_NUMBER_VISUAL_DEP(T); \
170 TEUCHOS_ADD_RANGE_VALIDATOR_DEP(T); \
171 TEUCHOS_ADD_ARRAY_MODIFIER_DEP_GROUP(T);
177 #define TEUCHOS_ADD_NUMBER_VISUAL_DEP(T) \
178 Teuchos::DependencyXMLConverterDB::addConverter( \
179 Teuchos::DummyObjectGetter<Teuchos::NumberVisualDependency< T > >:: \
181 Teuchos::rcp(new Teuchos::NumberVisualDependencyXMLConverter< T >));
187 #define TEUCHOS_ADD_RANGE_VALIDATOR_DEP(T) \
188 Teuchos::DependencyXMLConverterDB::addConverter( \
189 Teuchos::DummyObjectGetter<Teuchos::RangeValidatorDependency< T > >:: \
191 Teuchos::rcp(new Teuchos::RangeValidatorDependencyXMLConverter< T >));
196 #define TEUCHOS_ADD_NUMBER_ARRAY_LENGTH_DEP(DEPENDEE_TYPE , DEPENDENT_TYPE) \
197 Teuchos::DependencyXMLConverterDB::addConverter( \
198 Teuchos::DummyObjectGetter<Teuchos::NumberArrayLengthDependency< \
199 DEPENDEE_TYPE , DEPENDENT_TYPE > >::getDummyObject(), \
200 Teuchos::rcp(new Teuchos::NumberArrayLengthDependencyXMLConverter< \
201 DEPENDEE_TYPE , DEPENDENT_TYPE >));
207 #define TEUCHOS_ADD_TWODROW_DEP(DEPENDEE_TYPE , DEPENDENT_TYPE) \
208 Teuchos::DependencyXMLConverterDB::addConverter( \
209 Teuchos::DummyObjectGetter<Teuchos::TwoDRowDependency< \
210 DEPENDEE_TYPE , DEPENDENT_TYPE > >::getDummyObject(), \
211 Teuchos::rcp(new Teuchos::TwoDRowDependencyXMLConverter< \
212 DEPENDEE_TYPE , DEPENDENT_TYPE >));
217 #define TEUCHOS_ADD_TWODCOL_DEP(DEPENDEE_TYPE , DEPENDENT_TYPE) \
218 Teuchos::DependencyXMLConverterDB::addConverter( \
219 Teuchos::DummyObjectGetter<Teuchos::TwoDColDependency< \
220 DEPENDEE_TYPE , DEPENDENT_TYPE > >::getDummyObject(), \
221 Teuchos::rcp(new Teuchos::TwoDColDependencyXMLConverter< \
222 DEPENDEE_TYPE , DEPENDENT_TYPE >));
228 #define TEUCHOS_ADD_ARRAY_MODIFIER_DEP_GROUP(DEPENDEE_TYPE) \
229 TEUCHOS_ADD_NUMBER_ARRAY_LENGTH_DEP( DEPENDEE_TYPE , std::string) \
230 TEUCHOS_ADD_NUMBER_ARRAY_LENGTH_DEP( DEPENDEE_TYPE , int) \
231 TEUCHOS_ADD_NUMBER_ARRAY_LENGTH_DEP( DEPENDEE_TYPE , long long int) \
232 TEUCHOS_ADD_NUMBER_ARRAY_LENGTH_DEP( DEPENDEE_TYPE , double) \
233 TEUCHOS_ADD_NUMBER_ARRAY_LENGTH_DEP( DEPENDEE_TYPE , float) \
234 TEUCHOS_ADD_TWODROW_DEP( DEPENDEE_TYPE , std::string) \
235 TEUCHOS_ADD_TWODROW_DEP( DEPENDEE_TYPE , int) \
236 TEUCHOS_ADD_TWODROW_DEP( DEPENDEE_TYPE , long long int) \
237 TEUCHOS_ADD_TWODROW_DEP( DEPENDEE_TYPE , double) \
238 TEUCHOS_ADD_TWODROW_DEP( DEPENDEE_TYPE , float) \
239 TEUCHOS_ADD_TWODCOL_DEP( DEPENDEE_TYPE , std::string) \
240 TEUCHOS_ADD_TWODCOL_DEP( DEPENDEE_TYPE , int) \
241 TEUCHOS_ADD_TWODCOL_DEP( DEPENDEE_TYPE , long long int) \
242 TEUCHOS_ADD_TWODCOL_DEP( DEPENDEE_TYPE , double) \
243 TEUCHOS_ADD_TWODCOL_DEP( DEPENDEE_TYPE , float)
246 #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.