Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
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
18#include "Teuchos_XMLObject.hpp"
19#include "Teuchos_Describable.hpp"
21#include "Teuchos_ParameterEntryValidator.hpp"
24
25
26namespace Teuchos {
27
28
32class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT ValidatorXMLConverter : public Describable {
33
34public:
35
38
47 fromXMLtoValidator(
48 const XMLObject& xmlObj,
50
62 const IDtoValidatorMap& validatorIDsMap) const=0;
63
74 XMLObject fromValidatortoXML(
77 bool assignedID=true) const;
78
88 virtual void convertValidator(
91 const ValidatortoIDMap& validatorIDsMap) const = 0;
92
94
95 #ifdef HAVE_TEUCHOS_DEBUG
98
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";
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 }
138
139};
140
141
142} // namespace Teuchos
143
144
145#endif // TEUCHOS_VALIDATORXMLCONVERTER_HPP
An object representation of a subset of XML data.
A collection of Exceptions that can be potentially thrown when converting a ParameterList to and from...
Writes an XML object to a parameter list.
Writes a ParameterList to an XML object.
Base class for all objects that can describe themselves.
Maps Validators to integers.
Smart reference counting pointer class for automatic garbage collection.
An abstract base class for converting ParameterEntryValidators to and from XML.
static const std::string & getValidatorTagName()
static const std::string & getIdAttributeName()
static const std::string & getPrototypeIdAttributeName()
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...
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.
static const std::string & getTypeAttributeName()
A class for mapping validators to integers.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object,...
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...