Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Teuchos_ConditionXMLConverter.cpp
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 
11 
12 
13 namespace Teuchos{
14 
15 
16 RCP<Condition>
18  const XMLParameterListReader::EntryIDsMap& entryIDsMap) const
19 {
20  return convertXML(xmlObj, entryIDsMap);
21 }
22 
25  const RCP<const Condition> condition,
26  const XMLParameterListWriter::EntryIDsMap& entryIDsMap) const
27 {
29  toReturn.addAttribute(
30  getTypeAttributeName(), condition->getTypeAttributeValue());
31  convertCondition(condition, toReturn, entryIDsMap);
32  return toReturn;
33 }
34 
35 
36 } // namespace Teuchos
37 
static const std::string & getXMLTagName()
virtual RCP< Condition > convertXML(const XMLObject &xmlObj, const XMLParameterListReader::EntryIDsMap &entryIDsMap) const =0
Preforms any and all special xml conversion that is specific to a particular Condition.
RCP< Condition > fromXMLtoCondition(const XMLObject &xmlObj, const XMLParameterListReader::EntryIDsMap &entryIDsMap) const
Converts a given XMLObject to a Condition.
Converts back and forth between XML and Dependencies.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
std::map< RCP< const ParameterEntry >, ParameterEntry::ParameterEntryID, RCPConstComp > EntryIDsMap
void addAttribute(const std::string &name, T value)
Lookup whether or not Doubles are allowed.
virtual void convertCondition(const RCP< const Condition > condition, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const =0
Preforms any and all special condition conversion that is specific to a particlar Condition...
std::map< ParameterEntry::ParameterEntryID, RCP< ParameterEntry > > EntryIDsMap
Convenience typedef.
XMLObject fromConditiontoXML(const RCP< const Condition > condition, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const
Converters a given ParameterEntryValidator to XML.
Smart reference counting pointer class for automatic garbage collection.
static const std::string & getTypeAttributeName()
Returns the string to be used for the type attribute.