Teuchos - Trilinos Tools Package
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
parameterlist
src
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
17
18
#include "
Teuchos_XMLObject.hpp
"
19
#include "Teuchos_Describable.hpp"
20
#include "
Teuchos_XMLParameterListExceptions.hpp
"
21
#include "Teuchos_ParameterEntryValidator.hpp"
22
#include "
Teuchos_XMLParameterListReader.hpp
"
23
#include "
Teuchos_XMLParameterListWriter.hpp
"
24
25
26
namespace
Teuchos
{
27
28
32
class
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
ValidatorXMLConverter
:
public
Describable
{
33
34
public
:
35
38
46
RCP<ParameterEntryValidator>
47
fromXMLtoValidator
(
48
const
XMLObject
& xmlObj,
49
const
IDtoValidatorMap
& validatorIDsMap)
const
;
50
60
virtual
RCP<ParameterEntryValidator>
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
98
105
virtual
Teuchos::RCP<const ParameterEntryValidator>
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
}
137
138
139
};
140
141
142
}
// namespace Teuchos
143
144
145
#endif
// TEUCHOS_VALIDATORXMLCONVERTER_HPP
Teuchos_XMLObject.hpp
An object representation of a subset of XML data.
Teuchos_XMLParameterListExceptions.hpp
A collection of Exceptions that can be potentially thrown when converting a ParameterList to and from...
Teuchos_XMLParameterListReader.hpp
Writes an XML object to a parameter list.
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::IDtoValidatorMap
Maps Validators to integers.
Definition
Teuchos_ValidatorMaps.hpp:24
Teuchos::RCP
Smart reference counting pointer class for automatic garbage collection.
Definition
Teuchos_RCPDecl.hpp:397
Teuchos::ValidatorXMLConverter
An abstract base class for converting ParameterEntryValidators to and from XML.
Definition
Teuchos_ValidatorXMLConverter.hpp:32
Teuchos::ValidatorXMLConverter::fromValidatortoXML
XMLObject fromValidatortoXML(const RCP< const ParameterEntryValidator > validator, const ValidatortoIDMap &validatorIDsMap, bool assignedID=true) const
Converters a given ParameterEntryValidator to XML.
Definition
Teuchos_ValidatorXMLConverter.cpp:36
Teuchos::ValidatorXMLConverter::getValidatorTagName
static const std::string & getValidatorTagName()
Definition
Teuchos_ValidatorXMLConverter.hpp:133
Teuchos::ValidatorXMLConverter::getIdAttributeName
static const std::string & getIdAttributeName()
Definition
Teuchos_ValidatorXMLConverter.hpp:115
Teuchos::ValidatorXMLConverter::getPrototypeIdAttributeName
static const std::string & getPrototypeIdAttributeName()
Definition
Teuchos_ValidatorXMLConverter.hpp:121
Teuchos::ValidatorXMLConverter::convertValidator
virtual void convertValidator(const RCP< const ParameterEntryValidator > validator, XMLObject &xmlObj, const ValidatortoIDMap &validatorIDsMap) const =0
Preforms any and all special validator conversion that is specific to a particlar ParameterEntryValid...
Teuchos::ValidatorXMLConverter::fromXMLtoValidator
RCP< ParameterEntryValidator > fromXMLtoValidator(const XMLObject &xmlObj, const IDtoValidatorMap &validatorIDsMap) const
Converts a given XMLObject to a ParameterEntryValidator.
Definition
Teuchos_ValidatorXMLConverter.cpp:15
Teuchos::ValidatorXMLConverter::convertXML
virtual RCP< ParameterEntryValidator > convertXML(const XMLObject &xmlObj, const IDtoValidatorMap &validatorIDsMap) const =0
Preforms any and all special xml conversion that is specific to a particular ParameterEntryValidator.
Teuchos::ValidatorXMLConverter::getTypeAttributeName
static const std::string & getTypeAttributeName()
Definition
Teuchos_ValidatorXMLConverter.hpp:127
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
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
Generated by
1.17.0