55 return boolParameterEntryValidator();
70#ifdef HAVE_TEUCHOS_DEBUG
72BoolValidatorXMLConverter::getDummyValidator()
const{
85 xmlObj.getRequiredBool(getAllowDoubleAttributeName()));
87 xmlObj.getRequiredBool(getAllowStringAttributeName()));
88 return anyNumberParameterEntryValidator(
90 xmlObj.getRequired(getPrefferedTypeAttributeName())),
108 xmlObj.addAttribute(getPrefferedTypeAttributeName(),
113#ifdef HAVE_TEUCHOS_DEBUG
115AnyNumberValidatorXMLConverter::getDummyValidator()
const{
126 xmlObj.getWithDefault<
bool>(
127 getFileMustExistAttributeName(),
147#ifdef HAVE_TEUCHOS_DEBUG
149FileNameValidatorXMLConverter::getDummyValidator()
const{
160 if(
xmlObj.numChildren()!=0){
161 for(
int i=0;
i<
xmlObj.numChildren(); ++
i){
165 "Error converting xmlObject to StringValidator." << std::endl <<
182 if(!
is_null(validator->validStringValues())){
184 validator->validStringValues()->begin();
185 for(;
it != validator->validStringValues()->end(); ++
it){
187 stringTag.addAttribute(getStringValueAttributeName(), *
it);
194#ifdef HAVE_TEUCHOS_DEBUG
196StringValidatorXMLConverter::getDummyValidator()
const{
Reference-counted pointer class and non-member templated function implementations.
A collection of standard ValidatorXMLConverters.
Determines the types that are accepted.
static EPreferredType getPrefferedTypeStringEnum(const std::string &enumString)
Gets the preferred type enum associated with a give string.
RCP< ParameterEntryValidator > convertXML(const XMLObject &xmlObj, const IDtoValidatorMap &validatorIDsMap) const
void convertValidator(const RCP< const ParameterEntryValidator > validator, XMLObject &xmlObj, const ValidatortoIDMap &validatorIDsMap) const
std::vector< T >::const_iterator const_iterator
The type of a const forward iterator.
Thrown when xml tag is encountered that is either unrecognized or inappropriate for a given context.
void convertValidator(const RCP< const ParameterEntryValidator > validator, XMLObject &xmlObj, const ValidatortoIDMap &validatorIDsMap) const
RCP< ParameterEntryValidator > convertXML(const XMLObject &xmlObj, const IDtoValidatorMap &validatorIDsMap) const
static RCP< T > getDummyObject()
Retrieves a dummy object of type T.
RCP< ParameterEntryValidator > convertXML(const XMLObject &xmlObj, const IDtoValidatorMap &validatorIDsMap) const
void convertValidator(const RCP< const ParameterEntryValidator > validator, XMLObject &xmlObj, const ValidatortoIDMap &validatorIDsMap) const
Validate a file name entry.
static bool mustAlreadyExistDefault()
The default value of the mustAlreadyExist parameter in the constructor.
Maps Validators to integers.
Smart reference counting pointer class for automatic garbage collection.
void convertValidator(const RCP< const ParameterEntryValidator > validator, XMLObject &xmlObj, const ValidatortoIDMap &validatorIDsMap) const
RCP< ParameterEntryValidator > convertXML(const XMLObject &xmlObj, const IDtoValidatorMap &validatorIDsMap) const
A simple validator that only allows certain string values to be choosen or simply enforces that a par...
A class for mapping validators to integers.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object,...
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
bool is_null(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.