Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_StandardConditionXMLConverters.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_STANDARDCONDITIONXMLCONVERTERS_HPP
11#define TEUCHOS_STANDARDCONDITIONXMLCONVERTERS_HPP
12
20
21
22namespace Teuchos {
23
24
63
87
111
112
136
147
148public:
149
152
155 const XMLObject& xmlObj,
157
159 void convertCondition(
163
165
166};
167
170class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT ParameterConditionConverter : public ConditionXMLConverter{
171
172public:
173
176
186 const XMLObject& xmlObj,
188
198
200
203
205 virtual RCP<Condition> convertXML(
206 const XMLObject& xmlObj,
208
210 void convertCondition(
214
216
217private:
218
221
223 static const std::string& getParameterEntryIdAttributeName(){
224 static const std::string parameterEntryIdAttributeName = "parameterId";
226 }
227
229
230};
231
244
245public:
246
249
252 const XMLObject& xmlObj,
254
258
260
261private:
262
264 static const std::string& getValuesTagName(){
265 static const std::string valuesTagName = "Values";
266 return valuesTagName;
267 }
268
270 static const std::string& getStringTagName(){
271 static const std::string stringTagName = "String";
272 return stringTagName;
273 }
274
276 static const std::string& getStringValueAttributeName(){
277 static const std::string stringValueAttributeName = "value";
279 }
280
281
282};
283
310
320template<class T>
340
341template<class T>
359
360template<class T>
374
375
376
377} // namespace Teuchos
378
379
380#endif // TEUCHOS_STANDARDCONDITIONXMLCONVERTERS_HPP
381
Converts back and forth between XML and Dependencies.
A database for FunctionObjectXMLConverters.
Standard Conditions to be used.
RCP< BoolLogicCondition > getSpecificBoolLogicCondition(Condition::ConstConditionList &conditions) const
Replacement for std::vector that is compatible with the Teuchos Memory Management classes.
RCP< ParameterCondition > getSpecificParameterCondition(const XMLObject &xmlObj, RCP< ParameterEntry > parameterEntry) const
void addSpecificXMLTraits(RCP< const ParameterCondition > condition, XMLObject &xmlObj) const
virtual RCP< BoolLogicCondition > getSpecificBoolLogicCondition(Condition::ConstConditionList &conditions) const =0
Gets the specific BoolLogicCondition to be returned by this conveter when converting from XML.
virtual RCP< Condition > convertXML(const XMLObject &xmlObj, const XMLParameterListReader::EntryIDsMap &entryIDsMap) const
void convertCondition(const RCP< const Condition > condition, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const
An abstract base class for converting Dependencies to and from XML.
RCP< BoolLogicCondition > getSpecificBoolLogicCondition(Condition::ConstConditionList &conditions) const
static XMLObject convertFunctionObject(RCP< const FunctionObject > function)
Given a FunctionObject, converts the FunctionObject to XML.
static RCP< FunctionObject > convertXML(const XMLObject &xmlObject)
Given an XMLObject, converts the XMLObject to a FunctionObject.
static const std::string & getXMLTagName()
Returns the name of the XML tag used to indicate a funciton object.
void convertCondition(const RCP< const Condition > condition, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const
virtual RCP< Condition > convertXML(const XMLObject &xmlObj, const XMLParameterListReader::EntryIDsMap &entryIDsMap) const
An xml converter for NumberConditions The valid XML represntation for a NumberCondition is:
RCP< ParameterCondition > getSpecificParameterCondition(const XMLObject &xmlObj, RCP< ParameterEntry > parameterEntry) const
void addSpecificXMLTraits(RCP< const ParameterCondition > condition, XMLObject &xmlObj) const
RCP< BoolLogicCondition > getSpecificBoolLogicCondition(Condition::ConstConditionList &conditions) const
virtual void addSpecificXMLTraits(RCP< const ParameterCondition > condition, XMLObject &xmlObj) const =0
Adds specific xml traits to the xmlObj for a particular ParmaterCondtion.
virtual RCP< ParameterCondition > getSpecificParameterCondition(const XMLObject &xmlObj, RCP< ParameterEntry > parameterEntry) const =0
Gets the specific ParameterCondition to be returned by this conveter when converting from XML.
Smart reference counting pointer class for automatic garbage collection.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object.
bool is_null() const
Returns true if the underlying pointer is null.
An xml converter for StringConditions The valid XML represntation for a StringCondition is:
void addSpecificXMLTraits(RCP< const ParameterCondition > condition, XMLObject &xmlObj) const
RCP< ParameterCondition > getSpecificParameterCondition(const XMLObject &xmlObj, RCP< ParameterEntry > parameterEntry) const
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object,...
std::map< ParameterEntry::ParameterEntryID, RCP< ParameterEntry > > EntryIDsMap
Convenience typedef.
std::map< RCP< const ParameterEntry >, ParameterEntry::ParameterEntryID, RCPConstComp > EntryIDsMap
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...