23 return boolParameterEntryValidator();
38#ifdef HAVE_TEUCHOS_DEBUG
40BoolValidatorXMLConverter::getDummyValidator()
const{
53 xmlObj.getRequiredBool(getAllowDoubleAttributeName()));
55 xmlObj.getRequiredBool(getAllowStringAttributeName()));
56 return anyNumberParameterEntryValidator(
58 xmlObj.getRequired(getPrefferedTypeAttributeName())),
76 xmlObj.addAttribute(getPrefferedTypeAttributeName(),
81#ifdef HAVE_TEUCHOS_DEBUG
83AnyNumberValidatorXMLConverter::getDummyValidator()
const{
94 xmlObj.getWithDefault<
bool>(
95 getFileMustExistAttributeName(),
115#ifdef HAVE_TEUCHOS_DEBUG
117FileNameValidatorXMLConverter::getDummyValidator()
const{
128 if(
xmlObj.numChildren()!=0){
129 for(
int i=0;
i<
xmlObj.numChildren(); ++
i){
133 "Error converting xmlObject to StringValidator." << std::endl <<
150 if(!
is_null(validator->validStringValues())){
152 validator->validStringValues()->begin();
153 for(;
it != validator->validStringValues()->end(); ++
it){
155 stringTag.addAttribute(getStringValueAttributeName(), *
it);
162#ifdef HAVE_TEUCHOS_DEBUG
164StringValidatorXMLConverter::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.
Validate a file name entry.
static bool mustAlreadyExistDefault()
The default value of the mustAlreadyExist parameter in the constructor.
RCP< ParameterEntryValidator > convertXML(const XMLObject &xmlObj, const IDtoValidatorMap &validatorIDsMap) const
void convertValidator(const RCP< const ParameterEntryValidator > validator, XMLObject &xmlObj, const ValidatortoIDMap &validatorIDsMap) const
Maps Validators to integers.
Smart reference counting pointer class for automatic garbage collection.
A simple validator that only allows certain string values to be choosen or simply enforces that a par...
void convertValidator(const RCP< const ParameterEntryValidator > validator, XMLObject &xmlObj, const ValidatortoIDMap &validatorIDsMap) const
RCP< ParameterEntryValidator > convertXML(const XMLObject &xmlObj, const IDtoValidatorMap &validatorIDsMap) const
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.