46 RCP<ParameterEntryValidator>
51 #ifdef HAVE_TEUCHOS_DEBUG
56 dummyValidator->getXMLTypeName(),
58 "Cannot convert xmlObject " <<
59 ". Expected a " << dummyValidator->getXMLTypeName() <<
71 bool assignedID)
const
73 #ifdef HAVE_TEUCHOS_DEBUG
76 validator->getXMLTypeName()
78 dummyValidator->getXMLTypeName(),
80 "Cannot convert Validator " <<
81 ". Expected a " << dummyValidator->getXMLTypeName() <<
82 " validator but got a " << validator->getXMLTypeName() <<
"type");
89 "Could not find an id associated with the validator in the "
90 "given validatorIDsMap to use when " <<
91 "writing it to XML!" << std::endl << std::endl);
93 validatorIDsMap.
find(validator)->second);
static const std::string & getIdAttributeName()
Maps Validators to integers.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
XMLObject fromValidatortoXML(const RCP< const ParameterEntryValidator > validator, const ValidatortoIDMap &validatorIDsMap, bool assignedID=true) const
Converters a given ParameterEntryValidator to XML.
static const std::string & getTypeAttributeName()
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
Converts back and forth between XML and ParameterEntryValidators.
virtual void convertValidator(const RCP< const ParameterEntryValidator > validator, XMLObject &xmlObj, const ValidatortoIDMap &validatorIDsMap) const =0
Preforms any and all special validator conversion that is specific to a particlar ParameterEntryValid...
const_iterator end() const
Returns a const_reference to the end of the map.
static const std::string & getValidatorTagName()
A class for mapping validators to integers.
const_iterator find(const RCP< const ParameterEntryValidator > validator) const
Returns an iterator to the validator and id specified by the validator.
Smart reference counting pointer class for automatic garbage collection.
RCP< ParameterEntryValidator > fromXMLtoValidator(const XMLObject &xmlObj, const IDtoValidatorMap &validatorIDsMap) const
Converts a given XMLObject to a ParameterEntryValidator.
virtual RCP< ParameterEntryValidator > convertXML(const XMLObject &xmlObj, const IDtoValidatorMap &validatorIDsMap) const =0
Preforms any and all special xml conversion that is specific to a particular ParameterEntryValidator...
const std::string & getRequired(const std::string &name) const
Get an attribute, throwing an std::exception if it is not found.
Thrown when a bad validator xml converter is used.
Thrown when a referenced validator can't be found.