Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_ParameterEntryXMLConverter.hpp
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
25namespace Teuchos {
26
29class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT ParameterEntryXMLConverter : public Describable {
30
31public:
32
35
41 ParameterEntry fromXMLtoParameterEntry(const XMLObject &xmlObj) const;
42
49 XMLObject fromParameterEntrytoXML(
51 const std::string &name,
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";
97 }
98
100
101private:
102
105
107 static const std::string& getDefaultAttributeName() {
108 static const std::string defaultAttributeName_ = "isDefault";
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 "value" in the Teuchos::ParameterList std::map.
An object representation of a subset of XML data.
Writes a ParameterList to an XML object.
Base class for all objects that can describe themselves.
A class used to convert parameter entries to xml and vice versa.
virtual const std::string getTypeAttributeValue() const =0
Gets a string representing the value that should be assigned to the "type" attribute when converting ...
virtual const std::string getValueAttributeValue(RCP< const ParameterEntry > entry) const =0
Gets the value to be assigned to the "value" attribute when converting the paramter entry to xml.
This object is held as the "value" in the Teuchos::ParameterList std::map.
Smart reference counting pointer class for automatic garbage collection.
A class for mapping validators to integers.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object,...
Modified boost::any class, which is a container for a templated value.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...