57 getShowIfAttributeName(), VisualDependency::getShowIfDefaultValue());
88 "A Validator Dependency can only have 1 dependee!" <<
89 std::endl << std::endl);
137 "A StringVisualDependency can only have 1 dependee!" <<
138 std::endl << std::endl);
146 "StringVisualDependency!" << std::endl <<std::endl);
179 "A BoolVisualDependency can only have 1 dependee!" <<
180 std::endl << std::endl);
208 "ConditionVisualDependencies must have a Condition tag!"
228 StringValidatorDependency::ValueToValidatorMap::const_iterator
it =
234 pairTag.addAttribute(getValueAttributeName(),
it->first);
238 pairTag.addAttribute(getValidatorIdAttributeName(),
250 getDefaultValidatorIdAttributeName(),
268 "Error: All StringValidatorDependencies must have a " <<
274 std::string value =
child.getRequired(getValueAttributeName());
277 getValidatorIdAttributeName());
280 "Could not find a validator corresponding to the ID " <<
valiID <<
281 " in the given validatorIDsMap!" << std::endl << std::endl);
289 if(
xmlObj.hasAttribute(getDefaultValidatorIdAttributeName())){
292 getDefaultValidatorIdAttributeName());
296 "Could not find a validator (for the default validator) " <<
298 " in the given validatorIDsMap!" << std::endl << std::endl);
326 getTrueValidatorIdAttributeName(),
336 getFalseValidatorIdAttributeName(),
353 if(
xmlObj.hasAttribute(getTrueValidatorIdAttributeName())){
357 getTrueValidatorIdAttributeName());
364 "Could not find a Validator for the True validator " <<
366 " in the given validatorIDsMap!" << std::endl << std::endl);
373 if(
xmlObj.hasAttribute(getFalseValidatorIdAttributeName())){
376 getFalseValidatorIdAttributeName());
383 "Could not find a Validator for the False validator " <<
385 " in the given validatorIDsMap!" << std::endl << std::endl);
A database for ConditionXMLConverters.
A collection of standard DependencyXMLConverters.
std::vector< std::string >::const_iterator const_iterator
The type of a const forward iterator.
void convertSpecialValidatorAttributes(RCP< const ValidatorDependency > dependency, XMLObject &xmlObj, ValidatortoIDMap &validatorIDsMap) const
A BoolValidatorDependency says the following about the relationship between two parameters: Dependeni...
void convertSpecialVisualAttributes(RCP< const VisualDependency > dependency, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const
A bool visual dependency says the following about the relationship between two elements in a Paramete...
void convertSpecialVisualAttributes(RCP< const VisualDependency > dependency, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const
A condition visual dependency says the following about the relationship between elements in a Paramet...
static RCP< Condition > convertXML(const XMLObject &xmlObject, const XMLParameterListReader::EntryIDsMap &entryIDsMap)
Given an XMLObject and IDtoConditionMap, converts the XMLObject to a Condition.
static XMLObject convertCondition(RCP< const Condition > condition, const XMLParameterListWriter::EntryIDsMap &entryIDsMap)
Given a condition and ConditiontoIDMap, converts the condition to XML.
static const std::string & getXMLTagName()
std::set< RCP< ParameterEntry >, RCPComp > ParameterEntryList
A list of Dependees.
std::set< RCP< const ParameterEntry >, RCPConstComp > ConstParameterEntryList
A list of dependents.
Maps Validators to integers.
Thrown when no condtion tag is found when converting a ConditionVisualDependency from XML.
Thrown when converting a dependency that has validaotrs to and from XML. This excetpion indicates tha...
Thrown when converting a StrinvValidatorDependcny from XML and no valuesAndValidators tag is found.
Smart reference counting pointer class for automatic garbage collection.
static const std::string & getValuesAndValidatorsTag()
void convertSpecialValidatorAttributes(RCP< const ValidatorDependency > dependency, XMLObject &xmlObj, ValidatortoIDMap &validatorIDsMap) const
A StringValidatorDependency says the following about the relationship between two parameters: Depende...
std::pair< std::string, RCP< const ParameterEntryValidator > > ValueToValidatorPair
Conveniece typedef.
std::map< std::string, RCP< const ParameterEntryValidator > > ValueToValidatorMap
Conveniece typedef.
static const std::string & getStringValuesTagName()
Gets the StringValues Tag.
void convertSpecialVisualAttributes(RCP< const VisualDependency > dependency, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const
A string visual depdencies says the following about the relationship between two elements in a Parame...
Thrown when a Dependency has too many dependees specified in its XML.
void convertDependency(const RCP< const Dependency > dependency, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap, ValidatortoIDMap &validatorIDsMap) const
RCP< Dependency > convertXML(const XMLObject &xmlObj, const Dependency::ConstParameterEntryList dependees, const Dependency::ParameterEntryList dependets, const XMLParameterListReader::EntryIDsMap &entryIDsMap, const IDtoValidatorMap &validatorIDsMap) const
virtual void convertSpecialValidatorAttributes(RCP< const ValidatorDependency > dependency, XMLObject &xmlObj, ValidatortoIDMap &validatorIDsMap) const =0
Converts any special aspects of a specific validator dependency to xml.
A class for mapping validators to integers.
Thrown when a StringVisualDependency is being converted from XML and no Values tag is found.
void convertDependency(const RCP< const Dependency > dependency, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap, ValidatortoIDMap &validatorIDsMap) const
RCP< Dependency > convertXML(const XMLObject &xmlObj, const Dependency::ConstParameterEntryList dependees, const Dependency::ParameterEntryList dependets, const XMLParameterListReader::EntryIDsMap &entryIDsMap, const IDtoValidatorMap &validatorIDsMap) const
virtual void convertSpecialVisualAttributes(RCP< const VisualDependency > dependency, XMLObject &xmlObj, const XMLParameterListWriter::EntryIDsMap &entryIDsMap) const =0
Converts any special aspects of a specific visual dependency to xml.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object,...
std::map< ParameterEntry::ParameterEntryID, RCP< ParameterEntry > > EntryIDsMap
Convenience typedef.
std::map< RCP< const ParameterEntry >, ParameterEntry::ParameterEntryID, RCPConstComp > EntryIDsMap
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
bool nonnull(const std::shared_ptr< T > &p)
Returns true if p.get()!=NULL.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.