Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Teuchos_DependencyXMLConverter.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Teuchos: Common Tools Package
4 //
5 // Copyright 2004 NTESS and the Teuchos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef TEUCHOS_DEPENDENCYXMLCONVERTER_HPP
11 #define TEUCHOS_DEPENDENCYXMLCONVERTER_HPP
12 
18 #include "Teuchos_Dependency.hpp"
19 #include "Teuchos_XMLObject.hpp"
22 #include "Teuchos_Describable.hpp"
23 
24 
25 namespace Teuchos {
26 
27 
32 
33 public:
34 
37 
47  RCP<Dependency> fromXMLtoDependency(
48  const XMLObject& xmlObj,
49  const XMLParameterListReader::EntryIDsMap& entryIDsMap,
50  const IDtoValidatorMap& validatorIDsMap) const;
51 
65  virtual RCP<Dependency> convertXML(
66  const XMLObject& xmlObj,
68  const Dependency::ParameterEntryList dependets,
69  const XMLParameterListReader::EntryIDsMap& entryIDsMap,
70  const IDtoValidatorMap& validatorIDsMap) const = 0;
71 
81  XMLObject fromDependencytoXML(
82  const RCP<const Dependency> dependency,
83  const XMLParameterListWriter::EntryIDsMap& entryIDsMap,
84  ValidatortoIDMap& validatorIDsMap) const;
85 
98  virtual void convertDependency(
99  const RCP<const Dependency> dependency,
100  XMLObject& xmlObj,
101  const XMLParameterListWriter::EntryIDsMap& entryIDsMap,
102  ValidatortoIDMap& validatorIDsMap) const = 0;
103 
105 
107 
108 
112  static const std::string& getDependeeTagName(){
113  static const std::string dependeeTagName = "Dependee";
114  return dependeeTagName;
115  }
116 
120  static const std::string& getDependentTagName(){
121  static const std::string dependentTagName = "Dependent";
122  return dependentTagName;
123  }
124 
128  static const std::string& getParameterIdAttributeName(){
129  static const std::string parameterIdAtrributeName = "parameterId";
130  return parameterIdAtrributeName;
131  }
132 
136  static const std::string& getTypeAttributeName(){
137  static const std::string typeAttributeName = "type";
138  return typeAttributeName;
139  }
140 
142 
143 };
144 
145 
146 } // namespace Teuchos
147 
148 
149 #endif // TEUCHOS_DEPENDENCYXMLCONVERTER_HPP
Writes an XML object to a parameter list.
Maps Validators to integers.
std::set< RCP< const ParameterEntry >, RCPConstComp > ConstParameterEntryList
A list of dependents.
static const std::string & getTypeAttributeName()
Returns the string to be used for the type attribute.
std::set< RCP< ParameterEntry >, RCPComp > ParameterEntryList
A list of Dependees.
static const std::string & getDependeeTagName()
Returns the string to be used for the dependee tag.
An abstract base class for converting Dependencies to and from XML.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
Writes a ParameterList to an XML object.
std::map< RCP< const ParameterEntry >, ParameterEntry::ParameterEntryID, RCPConstComp > EntryIDsMap
static const std::string & getParameterIdAttributeName()
Returns the string to be used for the ParameterID attribute.
static const std::string & getDependentTagName()
Returns the string to be used for the dependent tag.
A class for mapping validators to integers.
#define TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
std::map< ParameterEntry::ParameterEntryID, RCP< ParameterEntry > > EntryIDsMap
Convenience typedef.
Base class for all objects that can describe themselves.
Smart reference counting pointer class for automatic garbage collection.
An object representation of a subset of XML data.