Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Teuchos_XMLParameterListReader.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_XMLPARAMETERLISTREADER_H
11 #define Teuchos_XMLPARAMETERLISTREADER_H
12 
18 #include "Teuchos_XMLObject.hpp"
19 #include "Teuchos_Utils.hpp"
22 
23 
24 namespace Teuchos {
25 
26 
32 
33 public:
34 
37 
39  typedef std::map<ParameterEntry::ParameterEntryID,
41 
43 
45 
46 
49 
51  RCP<ParameterList> toParameterList(
52  const XMLObject& xml, RCP<DependencySheet> depSheet) const;
53 
55  ParameterList toParameterList(const XMLObject& xml) const;
56 
71  void setAllowsDuplicateSublists(bool policy);
72 
76  bool getAllowsDuplicateSublists() const;
77 
78 private:
79 
81 
85  void convertParameterList(const XMLObject& xml,
86  RCP<ParameterList> parentList,
87  EntryIDsMap& entryIDsMap, const IDtoValidatorMap& validatorIDsMap) const;
88 
90  void convertValidators(
91  const XMLObject& xml, IDtoValidatorMap& validatorIDsMap) const;
92 
94  void convertDependencies(
95  RCP<DependencySheet> depSheet,
96  const XMLObject& xml,
97  const EntryIDsMap& entryIDsMap,
98  const IDtoValidatorMap& validatorIDsMap) const;
99 
101  void testForDuplicateValidatorIDs(
103  const IDtoValidatorMap& currentMap) const;
104 
106  void insertEntryIntoMap(
107  const XMLObject& xmlObj,
108  RCP<ParameterEntry> entryToInsert,
109  EntryIDsMap& entryIDsMap) const;
110 
111 };
112 
113 
114 
115 } // namespace Teuchos
116 
117 
118 #endif
Maps Validators to integers.
Templated Parameter List class.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
A list of parameters of arbitrary type.
#define TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
std::map< ParameterEntry::ParameterEntryID, RCP< ParameterEntry > > EntryIDsMap
Convenience typedef.
DataStructure keeping track of dependencies.
Writes an XML object to a parameter list.
Smart reference counting pointer class for automatic garbage collection.
A utilities class for Teuchos.
An object representation of a subset of XML data.