Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Teuchos_ValidatorXMLConverter.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_VALIDATORXMLCONVERTER_HPP
11 #define TEUCHOS_VALIDATORXMLCONVERTER_HPP
12 
18 #include "Teuchos_XMLObject.hpp"
19 #include "Teuchos_Describable.hpp"
24 
25 
26 namespace Teuchos {
27 
28 
33 
34 public:
35 
38 
47  fromXMLtoValidator(
48  const XMLObject& xmlObj,
49  const IDtoValidatorMap& validatorIDsMap) const;
50 
61  convertXML(const XMLObject& xmlObj,
62  const IDtoValidatorMap& validatorIDsMap) const=0;
63 
74  XMLObject fromValidatortoXML(
75  const RCP<const ParameterEntryValidator> validator,
76  const ValidatortoIDMap& validatorIDsMap,
77  bool assignedID=true) const;
78 
88  virtual void convertValidator(
89  const RCP<const ParameterEntryValidator> validator,
90  XMLObject& xmlObj,
91  const ValidatortoIDMap& validatorIDsMap) const = 0;
92 
94 
95  #ifdef HAVE_TEUCHOS_DEBUG
96 
98 
106  getDummyValidator() const = 0;
107 
109  #endif
110 
112 
113 
115  static const std::string& getIdAttributeName(){
116  static const std::string idAttributeName = "validatorId";
117  return idAttributeName;
118  }
119 
121  static const std::string& getPrototypeIdAttributeName(){
122  static const std::string prototypeIdAttributeName = "prototypeId";
123  return prototypeIdAttributeName;
124  }
125 
127  static const std::string& getTypeAttributeName(){
128  static const std::string typeAttributeName = "type";
129  return typeAttributeName;
130  }
131 
133  static const std::string& getValidatorTagName(){
134  static const std::string validatorTagName = "Validator";
135  return validatorTagName;
136  }
138 
139 };
140 
141 
142 } // namespace Teuchos
143 
144 
145 #endif // TEUCHOS_VALIDATORXMLCONVERTER_HPP
Writes an XML object to a parameter list.
static const std::string & getIdAttributeName()
Maps Validators to integers.
static const std::string & getTypeAttributeName()
static const std::string & getPrototypeIdAttributeName()
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
Writes a ParameterList to an XML object.
static const std::string & getValidatorTagName()
A class for mapping validators to integers.
#define TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
A collection of Exceptions that can be potentially thrown when converting a ParameterList to and from...
Base class for all objects that can describe themselves.
Smart reference counting pointer class for automatic garbage collection.
An abstract base class for converting ParameterEntryValidators to and from XML.
An object representation of a subset of XML data.