|
Teuchos - Trilinos Tools Package
Version of the Day
|
43 #include "Teuchos_ParameterEntryXMLConverterDB.hpp"
67 buildInitialValidatorMap(p, validatorIDsMap);
70 convertParameterList(p, peIDCounter, entryIDsMap, validatorIDsMap);
75 convertDependencies(depSheet, entryIDsMap, validatorIDsMap);
81 XMLObject validators = convertValidators(p, validatorIDsMap);
87 void XMLParameterListWriter::buildInitialValidatorMap(
94 buildInitialValidatorMap(
95 getValue<ParameterList>(entry),
105 XMLObject XMLParameterListWriter::convertValidators(
106 const ParameterList& p, ValidatortoIDMap& validatorIDsMap)
const
111 it != validatorIDsMap.end();
121 XMLObject XMLParameterListWriter::convertParameterList(
122 const ParameterList& p,
124 EntryIDsMap& entryIDsMap,
125 const ValidatortoIDMap& validatorIDsMap)
const
130 RCP<const ParameterEntry> entry = p.getEntryRCP(i->first);
132 XMLObject newPL = convertParameterList(
133 getValue<ParameterList>(entry),
141 entryIDsMap.insert(EntryIDsMap::value_type(entry, idCounter));
147 entry, p.name(i), idCounter, validatorIDsMap));
148 entryIDsMap.insert(EntryIDsMap::value_type(entry, idCounter));
156 XMLParameterListWriter::convertDependencies(
157 RCP<const DependencySheet> depSheet,
158 const EntryIDsMap& entryIDsMap,
159 ValidatortoIDMap& validatorIDsMap)
const
162 toReturn.addAttribute(
168 DependencySheet::DepSet::const_iterator it = depSheet->depBegin();
169 it != depSheet->depEnd();
173 *it, entryIDsMap, validatorIDsMap));
XMLObject toXML(const ParameterList &p, RCP< const DependencySheet > depSheet=null) const
unsigned int ParameterEntryID
C++ Standard Library compatable filtered iterator.
void addAttribute(const std::string &name, T value)
Lookup whether or not Doubles are allowed.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object,...
ValidatorMap::const_iterator const_iterator
static const std::string & getValidatorsTagName()
RCP< const ParameterEntryValidator > validator() const
Return the (optional) validator object.
static const std::string & getNameAttributeName()
ConstIterator end() const
An iterator pointing beyond the last entry.
A collection of Exceptions that can be potentially thrown when converting a ParameterList to and from...
bool isList() const
Return whether or not the value itself is a list.
A database for DependencyXMLConverters.
static const std::string & getParameterListTagName()
Smart reference counting pointer class for automatic garbage collection.
A class for mapping validators to integers.
std::map< RCP< const ParameterEntry >, ParameterEntry::ParameterEntryID, RCPConstComp > EntryIDsMap
static XMLObject convertDependency(RCP< const Dependency > dependency, const XMLParameterListWriter::EntryIDsMap &entryIDsMap, ValidatortoIDMap &validatorIDsMap)
Given a dependency converts the dependency to XML.
void insert(RCP< const ParameterEntryValidator > toInsert)
inserts an IDValidatorPair into the map.
void addChild(const XMLObject &child)
Add a child node to the node.
Writes a ParameterList to an XML object.
params_t::ConstIterator ConstIterator
Parameter container const iterator typedef.
bool is_null() const
Returns true if the underlying pointer is null.
static XMLObject convertValidator(RCP< const ParameterEntryValidator > validator, const ValidatortoIDMap &validatorIDsMap, bool assignedID=true)
Given a validator converts the validator to XML.
IteratorType begin() const
static const std::string & getIdAttributeName()
static XMLObject convertEntry(RCP< const ParameterEntry > entry, const std::string &name, const ParameterEntry::ParameterEntryID &id, const ValidatortoIDMap &validatorIDsMap)
Converts the given ParameterEntry to XML.
const std::string & name() const
The name of this ParameterList.
static const std::string & getDependenciesTagName()
bool nonnull(const std::shared_ptr< T > &p)
Returns true if p.get()!=NULL.
A list of parameters of arbitrary type.
static const std::string & getNameAttributeName()
When serializing to XML, this string should be used as the name of the name attribute.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
This object is held as the "value" in the Teuchos::ParameterList std::map.
const ParameterEntry & entry(ConstIterator i) const
Access to ParameterEntry (i.e., returns i->second)
ConstIterator begin() const
An iterator pointing to the first entry.
A database for ValidatorXMLConverters.