Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Teuchos_ParameterEntryXMLConverter.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_PARAMETERENTRYXMLCONVERTER_HPP
11 #define TEUCHOS_PARAMETERENTRYXMLCONVERTER_HPP
12 
13 
20 #include "Teuchos_XMLObject.hpp"
21 #include "Teuchos_Describable.hpp"
23 
24 
25 namespace Teuchos {
26 
30 
31 public:
32 
35 
41  ParameterEntry fromXMLtoParameterEntry(const XMLObject &xmlObj) const;
42 
49  XMLObject fromParameterEntrytoXML(
51  const std::string &name,
53  const ValidatortoIDMap& validatorIDsMap) const;
54 
55  virtual any getAny(const XMLObject& xmlObj) const=0;
56 
58 
60 
61 
68  virtual const std::string getTypeAttributeValue() const=0;
69 
78  virtual const std::string getValueAttributeValue(
79  RCP<const ParameterEntry > entry) const=0;
80 
82  static const std::string& getTypeAttributeName() {
83  static const std::string typeAttributeName_ = "type";
84  return typeAttributeName_;
85  }
86 
88  static const std::string& getIdAttributeName() {
89  static const std::string idAttributeName_ = "id";
90  return idAttributeName_;
91  }
92 
94  static const std::string& getValueAttributeName() {
95  static const std::string valueAttributeName_ = "value";
96  return valueAttributeName_;
97  }
98 
100 
101 private:
102 
105 
107  static const std::string& getDefaultAttributeName() {
108  static const std::string defaultAttributeName_ = "isDefault";
109  return defaultAttributeName_;
110  }
111 
113  static const std::string& getUsedAttributeName() {
114  static const std::string usedAttributeName_ = "isUsed";
115  return usedAttributeName_;
116  }
117 
119  static const std::string& getDocStringAttributeName() {
120  static const std::string docStringAttributeName_ = "docString";
121  return docStringAttributeName_;
122  }
123 
125 
126 };
127 
128 
129 } // namespace Teuchos
130 
131 
132 #endif // TEUCHOS_PARAMETERENTRYXMLCONVERTER_HPP
Object held as the &quot;value&quot; in the Teuchos::ParameterList std::map.
This object is held as the &quot;value&quot; in the Teuchos::ParameterList std::map.
Modified boost::any class, which is a container for a templated value.
A class used to convert parameter entries to xml and vice versa.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
Writes a ParameterList to an XML object.
A class for mapping validators to integers.
#define TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
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.