Teuchos - Trilinos Tools Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Related Functions | List of all members
Teuchos::BoolParameterEntryValidator Class Reference

Standard implementation of a BoolParameterEntryValidator that accepts bool values (true/false) or string values for bool ("true"/"false"). More...

#include <Teuchos_StandardParameterEntryValidators.hpp>

Inheritance diagram for Teuchos::BoolParameterEntryValidator:
Teuchos::ParameterEntryValidator Teuchos::Describable Teuchos::LabeledObject

Public Member Functions

Constructors
 BoolParameterEntryValidator ()
 
Local non-virtual validated lookup functions
bool getBool (const ParameterEntry &entry, const std::string &paramName="", const std::string &sublistName="", const bool activeQuery=true) const
 Get bool value from a parameter entry. More...
 
bool getBool (ParameterList &paramList, const std::string &paramName, const int defaultValue) const
 Lookup parameter from a parameter list and return as a bool value. More...
 
Overridden from ParameterEntryValidator
const std::string getXMLTypeName () const
 
void printDoc (std::string const &docString, std::ostream &out) const
 
ValidStringsList validStringValues () const
 
void validate (ParameterEntry const &entry, std::string const &paramName, std::string const &sublistName) const
 
void validateAndModify (std::string const &paramName, std::string const &sublistName, ParameterEntry *entry) const
 
- Public Member Functions inherited from Teuchos::ParameterEntryValidator
 ParameterEntryValidator ()
 Default Constructor. More...
 
- Public Member Functions inherited from Teuchos::Describable
virtual std::string description () const
 Return a simple one-line description of this object. More...
 
virtual void describe (FancyOStream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 Print the object with some verbosity level to a FancyOStream. More...
 
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 Version of describe() that takes an std::ostream instead of a FancyOStream. More...
 
virtual ~Describable ()
 Destructor (marked virtual for memory safety of derived classes). More...
 
- Public Member Functions inherited from Teuchos::LabeledObject
 LabeledObject ()
 Construct with an empty label. More...
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 Set the object label (see LabeledObject). More...
 
virtual std::string getObjectLabel () const
 Get the object label (see LabeledObject). More...
 

Related Functions

(Note that these are not member functions.)

TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
RCP
< BoolParameterEntryValidator
boolParameterEntryValidator ()
 Nonmember constructor BoolParameterEntryValidator. More...
 

Additional Inherited Members

- Public Types inherited from Teuchos::ParameterEntryValidator
typedef unsigned int ValidatorID
 
typedef RCP< const Array
< std::string > > 
ValidStringsList
 
- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default = VERB_DEFAULT
 Default value for the verbLevel argument of describe(). More...
 

Detailed Description

Standard implementation of a BoolParameterEntryValidator that accepts bool values (true/false) or string values for bool ("true"/"false").

Objects of this type are meant to be used as both abstract objects passed to Teuchos::ParameterList objects to be used to validate parameter types and values, and to be used by the code that reads parameter values. Having a single definition for the types of valids input and outputs for a parameter value makes it easier to write error-free validated code.

Please see AnyNumberValidatorXMLConverter for documenation regarding the XML representation of this validator.

Definition at line 603 of file Teuchos_StandardParameterEntryValidators.hpp.

Member Function Documentation

bool Teuchos::BoolParameterEntryValidator::getBool ( const ParameterEntry entry,
const std::string &  paramName = "",
const std::string &  sublistName = "",
const bool  activeQuery = true 
) const

Get bool value from a parameter entry.

Definition at line 144 of file Teuchos_StandardParameterEntryValidators.cpp.

bool Teuchos::BoolParameterEntryValidator::getBool ( ParameterList paramList,
const std::string &  paramName,
const int  defaultValue 
) const

Lookup parameter from a parameter list and return as a bool value.

Definition at line 168 of file Teuchos_StandardParameterEntryValidators.cpp.

const std::string Teuchos::BoolParameterEntryValidator::getXMLTypeName ( ) const
virtual
void Teuchos::BoolParameterEntryValidator::printDoc ( std::string const &  docString,
std::ostream &  out 
) const
virtual
ParameterEntryValidator::ValidStringsList Teuchos::BoolParameterEntryValidator::validStringValues ( ) const
virtual
void Teuchos::BoolParameterEntryValidator::validate ( ParameterEntry const &  entry,
std::string const &  paramName,
std::string const &  sublistName 
) const
virtual
void Teuchos::BoolParameterEntryValidator::validateAndModify ( std::string const &  paramName,
std::string const &  sublistName,
ParameterEntry entry 
) const
virtual

Friends And Related Function Documentation

TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< BoolParameterEntryValidator > boolParameterEntryValidator ( )
related

Nonmember constructor BoolParameterEntryValidator.


The documentation for this class was generated from the following files: