54: _allowDuplicateSublists(
true)
71 "XMLParameterListReader expected tag " <<
105 "XMLParameterListReader expected tag " <<
126 for (
int i=0;
i<
xml.numChildren(); ++
i){
127 if (
xml.getChild(
i).hasAttribute(
147 std::set<const XMLObject*>::const_iterator
it =
172 "XMLParameterListReader expected tag " <<
182 for (
int i=0;
i<
xml.numChildren();
i++) {
195 "XMLParameterListReader expected tag "
215 std::ostringstream
ss;
224 "XMLParameterListReader encountered duplicate sublist \"" << name <<
"\", in violation"
225 <<
" of the policy specified by XMLParameterListReader::setAllowsDuplicateSublists()." );
233 "All child nodes of a ParameterList must have a name attribute!" <<
234 std::endl << std::endl);
244 "Could not find validator with id: "
245 <<
child.getRequired(
248 "Bad Parameter: " << name << std::endl << std::endl);
265 "Validators with duplicate ids found!" << std::endl <<
279 for(
int i = 0;
i <
xml.numChildren(); ++
i){
300 "Parameters/ParameterList with duplicate ids found!" << std::endl <<
301 "Bad ID: " <<
xmlID << std::endl << std::endl);
A database for DependencyXMLConverters.
A database for ValidatorXMLConverters.
Writes an XML object to a parameter list.
Writes a ParameterList to an XML object.
Thrown when an element inside a parameter list is bad.
Thrown when the root xml tag for a parameter list is incorrect.
static const std::string & getNameAttributeName()
When serializing to XML, this string should be used as the name of the name attribute.
static RCP< Dependency > convertXML(const XMLObject &xmlObject, const XMLParameterListReader::EntryIDsMap &entryIDsMap, const IDtoValidatorMap &validatorIDsMap)
Given an XMLObject converts the XMLObject to a Dependency.
Thrown when two parameters in an XML file have the same ID.
Optionally thrown when a sublist is set twice by either updateParametersFromXmlFile(),...
Constructs a CantFindParameterEntryConverterException.
Maps Validators to integers.
ValidatorMap::const_iterator const_iterator
std::pair< ParameterEntryValidator::ValidatorID, RCP< ParameterEntryValidator > > IDValidatorPair
Thrown when a referenced validator can't be found.
Thrown when a parameter entry tag is missing it's name attribute.
static ParameterEntry convertXML(const XMLObject &xmlObj)
Converts XML to a ParameterEntry.
static const std::string & getIdAttributeName()
static const std::string & getTagName()
Get the string that should be used as the tag name for all parameters when they are serialized to xml...
A list of parameters of arbitrary type.
Concrete serial communicator subclass.
int getTag() const
The current tag.
static RCP< ParameterEntryValidator > convertXML(const XMLObject &xmlObject, const IDtoValidatorMap &validatorIDsMap)
Given an XMLObject converts the XMLObject to a ParameterEntryValidator and inserts the validator into...
static const std::string & getIdAttributeName()
static const std::string & getPrototypeIdAttributeName()
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object,...
bool getAllowsDuplicateSublists() const
Specifies the current policy regarding duplicated sublists. See setAllowsDuplicateSublists() for more...
void setAllowsDuplicateSublists(bool policy)
Set policy regarding duplicated sublists.
void insertEntryIntoMap(const XMLObject &xmlObj, RCP< ParameterEntry > entryToInsert, EntryIDsMap &entryIDsMap) const
void convertParameterList(const XMLObject &xml, RCP< ParameterList > parentList, EntryIDsMap &entryIDsMap, const IDtoValidatorMap &validatorIDsMap) const
Write the given XML object to a parameter list along with the validators located in the given map.
void testForDuplicateValidatorIDs(ParameterEntryValidator::ValidatorID potentialNewID, const IDtoValidatorMap ¤tMap) const
Tests to see if there are duplicate validator IDs.
RCP< ParameterList > toParameterList(const XMLObject &xml, RCP< DependencySheet > depSheet) const
void convertValidators(const XMLObject &xml, IDtoValidatorMap &validatorIDsMap) const
Write the given XML object to appropriate validators.
void convertDependencies(RCP< DependencySheet > depSheet, const XMLObject &xml, const EntryIDsMap &entryIDsMap, const IDtoValidatorMap &validatorIDsMap) const
Write the given XML object to appropriate dependencies.
std::map< ParameterEntry::ParameterEntryID, RCP< ParameterEntry > > EntryIDsMap
Convenience typedef.
bool _allowDuplicateSublists
static const std::string & getDependenciesTagName()
static const std::string & getValidatorsTagName()
static const std::string & getParameterListTagName()
static const std::string & getNameAttributeName()
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.