Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_StandardFunctionObjectXMLConverters.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_STANDARDFUNCTIONOBJECTXMLCONVERTERS_HPP
11#define TEUCHOS_STANDARDFUNCTIONOBJECTXMLCONVERTERS_HPP
12
19#include "Teuchos_StandardFunctionObjects.hpp"
20
21
22namespace Teuchos {
23
24
26template<class OperandType>
28
29public:
30
33
42
51 const RCP<const SimpleFunctionObject<OperandType> > /* functionObject */,
52 XMLObject& /* xmlObj */) const{}
53
55
58
61 convertXML(const XMLObject& xmlObj) const;
62
66 XMLObject& xmlObj) const;
67
69
71
72
73 static std::string getOperandAttributeName(){
74 static const std::string operandAttributeName = "operand";
76 }
77
79
80};
81
82template<class OperandType>
83RCP<FunctionObject>
85 const XMLObject& xmlObj) const
86{
88 xmlObj.getRequired<OperandType>(getOperandAttributeName());
89 return getSpecificSimpleFunction(operand);
90}
91
92template<class OperandType>
104
113template<class OperandType>
128
129template<class OperandType>
136
145template<class OperandType>
160
161template<class OperandType>
168
177template<class OperandType>
192
193template<class OperandType>
200
209template<class OperandType>
224
225template<class OperandType>
232
233
234} // namespace Teuchos
235
236
237#endif // TEUCHOS_STANDARDFUNCTIONOBJECTXMLCONVERTERS_HPP
238
Converts back and forth between XML and FunctionObjects.
Class for converting AdditionFunction objects to and from XML.
RCP< SimpleFunctionObject< OperandType > > getSpecificSimpleFunction(OperandType operand) const
Class for converting DivisionFunction objects to and from XML.
RCP< SimpleFunctionObject< OperandType > > getSpecificSimpleFunction(OperandType operand) const
An abstract base class for converting FunctionObjects to and from XML.
Class for converting MultiplicationFunction objects to and from XML.
RCP< SimpleFunctionObject< OperandType > > getSpecificSimpleFunction(OperandType operand) const
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.
virtual void getSpecialSimpleFunctionXMLTraits(const RCP< const SimpleFunctionObject< OperandType > >, XMLObject &) const
Add and extra XML traits that are specific to a certain FuncitonOjbect when converting that function ...
RCP< FunctionObject > convertXML(const XMLObject &xmlObj) const
virtual RCP< SimpleFunctionObject< OperandType > > getSpecificSimpleFunction(OperandType operand) const =0
Gets the specific SimpleFunction to be returned by this converter when converting from XML.
void convertFunctionObject(const RCP< const FunctionObject > functionObject, XMLObject &xmlObj) const
Class for converting SubtractionFunction objects to and from XML.
RCP< SimpleFunctionObject< OperandType > > getSpecificSimpleFunction(OperandType operand) const
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,...