Teuchos - Trilinos Tools Package
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
parameterlist
src
Teuchos_FunctionObjectXMLConverter.cpp
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
#include "
Teuchos_FunctionObjectXMLConverter.hpp
"
11
12
namespace
Teuchos
{
13
14
15
RCP<FunctionObject>
16
FunctionObjectXMLConverter::fromXMLtoFunctionObject
(
17
const
XMLObject
&xmlObj)
const
18
{
19
return
convertXML
(xmlObj);
20
}
21
22
XMLObject
23
FunctionObjectXMLConverter::fromFunctionObjecttoXML
(
24
const
RCP<const FunctionObject>
function)
const
25
{
26
XMLObject
toReturn(
FunctionObject::getXMLTagName
());
27
toReturn.
addAttribute
(
28
getTypeAttributeName
(), function->getTypeAttributeValue());
29
convertFunctionObject
(function, toReturn);
30
return
toReturn;
31
}
32
33
34
}
//namespace teuchos
Teuchos_FunctionObjectXMLConverter.hpp
Converts back and forth between XML and FunctionObjects.
Teuchos::FunctionObject::getXMLTagName
static const std::string & getXMLTagName()
Returns the name of the XML tag used to indicate a funciton object.
Definition
Teuchos_FunctionObject.hpp:42
Teuchos::FunctionObjectXMLConverter::convertXML
virtual RCP< FunctionObject > convertXML(const XMLObject &xmlObj) const =0
Preforms any and all special xml conversion that is specific to a particular FunctionObject.
Teuchos::FunctionObjectXMLConverter::fromFunctionObjecttoXML
XMLObject fromFunctionObjecttoXML(const RCP< const FunctionObject > function) const
Converters a given FunctionObject to XML.
Definition
Teuchos_FunctionObjectXMLConverter.cpp:23
Teuchos::FunctionObjectXMLConverter::getTypeAttributeName
static const std::string & getTypeAttributeName()
Definition
Teuchos_FunctionObjectXMLConverter.hpp:79
Teuchos::FunctionObjectXMLConverter::convertFunctionObject
virtual void convertFunctionObject(const RCP< const FunctionObject > function, XMLObject &xmlObj) const =0
Preforms any and all special FunctionObject conversion that is specific to a particlar FunctionObject...
Teuchos::FunctionObjectXMLConverter::fromXMLtoFunctionObject
RCP< FunctionObject > fromXMLtoFunctionObject(const XMLObject &xmlObj) const
Converts a given XMLObject to a FunctionObject.
Definition
Teuchos_FunctionObjectXMLConverter.cpp:16
Teuchos::RCP
Smart reference counting pointer class for automatic garbage collection.
Definition
Teuchos_RCPDecl.hpp:397
Teuchos::XMLObject
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object,...
Definition
Teuchos_XMLObject.hpp:30
Teuchos::XMLObject::addAttribute
void addAttribute(const std::string &name, T value)
Lookup whether or not Doubles are allowed.
Definition
Teuchos_XMLObject.hpp:161
Teuchos
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
Generated by
1.17.0