Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
parameterlist
src
Teuchos_StandardParameterEntryXMLConverters.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_STANDARDPARAMETERENTRYXMLCONVERTERS_HPP
11
#define TEUCHOS_STANDARDPARAMETERENTRYXMLCONVERTERS_HPP
12
18
#include "
Teuchos_ParameterEntryXMLConverter.hpp
"
19
20
21
namespace
Teuchos {
22
23
29
class
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
AnyParameterEntryConverter
:
public
ParameterEntryXMLConverter
{
30
31
public
:
32
35
37
const
std::string getTypeAttributeValue()
const
;
38
40
const
std::string getValueAttributeValue(
41
RCP<const ParameterEntry>
entry)
const
;
42
44
any
getAny(
const
XMLObject
& xmlObj)
const
;
46
47
};
48
49
54
template
<
class
T>
55
class
StandardTemplatedParameterConverter
:
56
public
ParameterEntryXMLConverter
57
{
58
59
public
:
60
63
65
virtual
const
std::string
getTypeAttributeValue
()
const
{
66
return
TypeNameTraits<T>::name
();
67
}
68
70
virtual
const
std::string
getValueAttributeValue
(
71
RCP<const ParameterEntry>
entry)
const
{
72
return
toString
(any_cast<T>(entry->getAny(
false
)));
73
}
74
76
any
getAny
(
const
XMLObject
& xmlObj)
const
{
77
return
any
(xmlObj.
getRequired
<T>(
getValueAttributeName
()));
78
}
79
81
82
};
83
84
85
86
}
// namespace Teuchos
87
88
89
#endif // TEUCHOS_STANDARDPARAMETERENTRYXMLCONVERTERS_HPP
Teuchos::StandardTemplatedParameterConverter::getTypeAttributeValue
virtual const std::string getTypeAttributeValue() const
Definition:
Teuchos_StandardParameterEntryXMLConverters.hpp:65
Teuchos::any
Modified boost::any class, which is a container for a templated value.
Definition:
Teuchos_any.hpp:122
Teuchos::ParameterEntryXMLConverter
A class used to convert parameter entries to xml and vice versa.
Definition:
Teuchos_ParameterEntryXMLConverter.hpp:29
Teuchos::ParameterEntryXMLConverter::getValueAttributeName
static const std::string & getValueAttributeName()
Definition:
Teuchos_ParameterEntryXMLConverter.hpp:94
Teuchos::XMLObject
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
Definition:
Teuchos_XMLObject.hpp:30
Teuchos::toString
std::string toString(const HashSet< Key > &h)
Definition:
Teuchos_HashSet.hpp:80
Teuchos::StandardTemplatedParameterConverter
A standard ParameterEntryXMLConverter for most data types.
Definition:
Teuchos_StandardParameterEntryXMLConverters.hpp:55
Teuchos::StandardTemplatedParameterConverter::getValueAttributeValue
virtual const std::string getValueAttributeValue(RCP< const ParameterEntry > entry) const
Definition:
Teuchos_StandardParameterEntryXMLConverters.hpp:70
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
#define TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
Definition:
Teuchos_DLLExportMacro.h:37
Teuchos::AnyParameterEntryConverter
A last resort converter for when no others will do.
Definition:
Teuchos_StandardParameterEntryXMLConverters.hpp:29
Teuchos::RCP
Smart reference counting pointer class for automatic garbage collection.
Definition:
Teuchos_RCPDecl.hpp:397
Teuchos::StandardTemplatedParameterConverter::getAny
any getAny(const XMLObject &xmlObj) const
Definition:
Teuchos_StandardParameterEntryXMLConverters.hpp:76
Teuchos_ParameterEntryXMLConverter.hpp
Teuchos::XMLObject::getRequired
const std::string & getRequired(const std::string &name) const
Get an attribute, throwing an std::exception if it is not found.
Definition:
Teuchos_XMLObject.cpp:61
Teuchos::TypeNameTraits::name
static std::string name()
Definition:
Teuchos_TypeNameTraits.hpp:56
Generated on Thu Nov 21 2024 09:21:40 for Teuchos Package Browser (Single Doxygen Collection) by
1.8.5