Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Teuchos_XMLParameterListWriter.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_XMLPARAMETERLISTWRITER_H
11 #define Teuchos_XMLPARAMETERLISTWRITER_H
12 
13 
20 #include "Teuchos_XMLObject.hpp"
21 #include "Teuchos_Utils.hpp"
24 
25 
26 namespace Teuchos {
27 
28 
33 
34 public:
35 
38 
40  typedef std::map<RCP<const ParameterEntry>,
42 
44 
46 
47 
50 
52  XMLObject toXML(
53  const ParameterList& p,
54  RCP<const DependencySheet> depSheet = null) const;
55 
57  static const std::string& getParameterListTagName(){
58  static const std::string parameterListTagName = "ParameterList";
59  return parameterListTagName;
60  }
61 
63  static const std::string& getNameAttributeName(){
64  static const std::string nameAttributeName = "name";
65  return nameAttributeName;
66  }
67 
69  static const std::string& getValidatorsTagName(){
70  static const std::string validatorsTagName = "Validators";
71  return validatorsTagName;
72  }
73 
75  static const std::string& getDependenciesTagName(){
76  static const std::string dependenciesTagName = "Dependencies";
77  return dependenciesTagName;
78  }
79 
80 private:
81 
83  XMLObject convertParameterList(
84  const ParameterList& p,
86  EntryIDsMap& entryIDsMap,
87  const ValidatortoIDMap& validatorIDsMap) const;
88 
90  XMLObject convertValidators(
91  const ParameterList& p,
92  ValidatortoIDMap& validatorIDsMap) const;
93 
95  XMLObject convertDependencies(
97  const EntryIDsMap& entryIDsMap,
98  ValidatortoIDMap& validatorIDsMap) const;
99 
101  void buildInitialValidatorMap(
102  const ParameterList& p,
103  ValidatortoIDMap& validatorIDsMap) const;
104 };
105 
106 
107 } // namespace teuchos
108 
109 
110 #endif
static const std::string & getValidatorsTagName()
Struct for comparing two RCPs. Simply compares the raw pointers contained within the RCPs...
Templated Parameter List class.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
static const std::string & getDependenciesTagName()
std::map< RCP< const ParameterEntry >, ParameterEntry::ParameterEntryID, RCPConstComp > EntryIDsMap
A class for mapping validators to integers.
A list of parameters of arbitrary type.
#define TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
DataStructure keeping track of dependencies.
Smart reference counting pointer class for automatic garbage collection.
static const std::string & getParameterListTagName()
static const std::string & getNameAttributeName()
A utilities class for Teuchos.
Writes a ParameterList to an XML object.
An object representation of a subset of XML data.