Teuchos - Trilinos Tools Package
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
parameterlist
src
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
17
18
19
#include "
Teuchos_ParameterEntry.hpp
"
20
#include "
Teuchos_XMLObject.hpp
"
21
#include "Teuchos_Describable.hpp"
22
#include "
Teuchos_XMLParameterListWriter.hpp
"
23
24
25
namespace
Teuchos
{
26
29
class
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
ParameterEntryXMLConverter
:
public
Describable
{
30
31
public
:
32
35
41
ParameterEntry
fromXMLtoParameterEntry
(
const
XMLObject
&xmlObj)
const
;
42
49
XMLObject
fromParameterEntrytoXML
(
50
RCP<const ParameterEntry>
entry,
51
const
std::string &name,
52
const
ParameterEntry::ParameterEntryID
&
id
,
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
Teuchos_ParameterEntry.hpp
Object held as the "value" in the Teuchos::ParameterList std::map.
Teuchos_XMLObject.hpp
An object representation of a subset of XML data.
Teuchos_XMLParameterListWriter.hpp
Writes a ParameterList to an XML object.
Teuchos::Describable
Base class for all objects that can describe themselves.
Definition
Teuchos_Describable.hpp:44
Teuchos::ParameterEntry
This object is held as the "value" in the Teuchos::ParameterList std::map.
Definition
Teuchos_ParameterEntry.hpp:34
Teuchos::ParameterEntry::ParameterEntryID
unsigned int ParameterEntryID
Definition
Teuchos_ParameterEntry.hpp:42
Teuchos::ParameterEntryXMLConverter
A class used to convert parameter entries to xml and vice versa.
Definition
Teuchos_ParameterEntryXMLConverter.hpp:29
Teuchos::ParameterEntryXMLConverter::getIdAttributeName
static const std::string & getIdAttributeName()
Definition
Teuchos_ParameterEntryXMLConverter.hpp:88
Teuchos::ParameterEntryXMLConverter::getTypeAttributeName
static const std::string & getTypeAttributeName()
Definition
Teuchos_ParameterEntryXMLConverter.hpp:82
Teuchos::ParameterEntryXMLConverter::getTypeAttributeValue
virtual const std::string getTypeAttributeValue() const =0
Gets a string representing the value that should be assigned to the "type" attribute when converting ...
Teuchos::ParameterEntryXMLConverter::fromXMLtoParameterEntry
ParameterEntry fromXMLtoParameterEntry(const XMLObject &xmlObj) const
Converts the given xml into a parameter entry.
Definition
Teuchos_ParameterEntryXMLConverter.cpp:20
Teuchos::ParameterEntryXMLConverter::fromParameterEntrytoXML
XMLObject fromParameterEntrytoXML(RCP< const ParameterEntry > entry, const std::string &name, const ParameterEntry::ParameterEntryID &id, const ValidatortoIDMap &validatorIDsMap) const
Converts the given parameter entry to xml.
Definition
Teuchos_ParameterEntryXMLConverter.cpp:76
Teuchos::ParameterEntryXMLConverter::getValueAttributeValue
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.
Teuchos::ParameterEntryXMLConverter::getValueAttributeName
static const std::string & getValueAttributeName()
Definition
Teuchos_ParameterEntryXMLConverter.hpp:94
Teuchos::RCP
Smart reference counting pointer class for automatic garbage collection.
Definition
Teuchos_RCPDecl.hpp:397
Teuchos::ValidatortoIDMap
A class for mapping validators to integers.
Definition
Teuchos_ValidatorMaps.hpp:71
Teuchos::XMLObject
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object,...
Definition
Teuchos_XMLObject.hpp:30
Teuchos::any
Modified boost::any class, which is a container for a templated value.
Definition
Teuchos_any.hpp:123
Teuchos
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
Generated by
1.17.0