Teuchos - Trilinos Tools Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
Teuchos::EnhancedNumberValidator< T > Class Template Reference

Class uesd to validate a particular type of number. More...

#include <Teuchos_StandardParameterEntryValidators.hpp>

Inheritance diagram for Teuchos::EnhancedNumberValidator< T >:
Teuchos::ParameterEntryValidator Teuchos::Describable Teuchos::LabeledObject

Public Member Functions

Constructors/Destructor
 EnhancedNumberValidator (T min, T max, T step=EnhancedNumberTraits< T >::defaultStep(), unsigned short precision=EnhancedNumberTraits< T >::defaultPrecision())
 Constructs a EnhancedNumberValidator. More...
 
 EnhancedNumberValidator ()
 Constructs a EnhancedNumberValidator without an explicit minimum or maximum. More...
 
Setter Functions
void setMin (T min)
 Sets the minimum acceptable value for the validator. More...
 
void setMax (T max)
 Sets the maximum acceptable value for the validator. More...
 
void setStep (T step)
 Sets the step being used for the validator. More...
 
void setPrecision (unsigned short precision)
 Sets the precision specified for the validator. More...
 
Getter Functions
getMin () const
 Gets the minimum acceptable value for the validator. More...
 
getMax () const
 Gets the maximum acceptable value for the validator. More...
 
getStep () const
 Gets the step being used for the validator. More...
 
unsigned short getPrecision () const
 Gets the precision specified for the validator. More...
 
Attribute/Query Methods
bool hasMin () const
 Determines whether or not the validator has a minimum value. More...
 
bool hasMax () const
 Determines whether or not the validator has a maximum value. More...
 
Overridden from ParameterEntryValidator
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
 
Teuchos::any getNumberFromString (const ParameterEntry &entry, const bool activeQuery) const
 
const std::string getXMLTypeName () const
 
void printDoc (std::string const &docString, std::ostream &out) 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...
 

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

template<class T>
class Teuchos::EnhancedNumberValidator< T >

Class uesd to validate a particular type of number.

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

Definition at line 1353 of file Teuchos_StandardParameterEntryValidators.hpp.

Constructor & Destructor Documentation

template<class T >
Teuchos::EnhancedNumberValidator< T >::EnhancedNumberValidator ( min,
max,
step = EnhancedNumberTraits<T>::defaultStep(),
unsigned short  precision = EnhancedNumberTraits<T>::defaultPrecision() 
)
inline

Constructs a EnhancedNumberValidator.

Parameters
minThe minimum acceptable value for this validator.
maxThe maximum acceptable value for this validator.
stepThe increments at which the values being validated should be changed when incremented in a UI.
precisionThe number of decimials places to which the values validated shold be compared to the min and max and the number of decimals which are displayed in a UI. This parameter is pretty much meamingless for non-floating point types.

Definition at line 1374 of file Teuchos_StandardParameterEntryValidators.hpp.

template<class T >
Teuchos::EnhancedNumberValidator< T >::EnhancedNumberValidator ( )
inline

Constructs a EnhancedNumberValidator without an explicit minimum or maximum.

Definition at line 1386 of file Teuchos_StandardParameterEntryValidators.hpp.

Member Function Documentation

template<class T >
void Teuchos::EnhancedNumberValidator< T >::setMin ( min)
inline

Sets the minimum acceptable value for the validator.

Parameters
minThe desired minimum acceptable value for the validator.

Definition at line 1404 of file Teuchos_StandardParameterEntryValidators.hpp.

template<class T >
void Teuchos::EnhancedNumberValidator< T >::setMax ( max)
inline

Sets the maximum acceptable value for the validator.

Parameters
minThe desired maximum acceptable value for the validator.

Definition at line 1413 of file Teuchos_StandardParameterEntryValidators.hpp.

template<class T >
void Teuchos::EnhancedNumberValidator< T >::setStep ( step)
inline

Sets the step being used for the validator.

Parameters
Thestep to be used for the validator.

Definition at line 1422 of file Teuchos_StandardParameterEntryValidators.hpp.

template<class T >
void Teuchos::EnhancedNumberValidator< T >::setPrecision ( unsigned short  precision)
inline

Sets the precision specified for the validator.

Parameters
Theprecision specific for the validator.

Definition at line 1430 of file Teuchos_StandardParameterEntryValidators.hpp.

template<class T >
T Teuchos::EnhancedNumberValidator< T >::getMin ( ) const
inline

Gets the minimum acceptable value for the validator.

Returns
The minimum acceptable value for the validator.

Definition at line 1443 of file Teuchos_StandardParameterEntryValidators.hpp.

template<class T >
T Teuchos::EnhancedNumberValidator< T >::getMax ( ) const
inline

Gets the maximum acceptable value for the validator.

Returns
The maximum acceptable value for the validator.

Definition at line 1451 of file Teuchos_StandardParameterEntryValidators.hpp.

template<class T >
T Teuchos::EnhancedNumberValidator< T >::getStep ( ) const
inline

Gets the step being used for the validator.

Returns
The step being used for the validator.

Definition at line 1459 of file Teuchos_StandardParameterEntryValidators.hpp.

template<class T >
unsigned short Teuchos::EnhancedNumberValidator< T >::getPrecision ( ) const
inline

Gets the precision specified for the validator.

Returns
The precision specific for the validator.

Definition at line 1467 of file Teuchos_StandardParameterEntryValidators.hpp.

template<class T >
bool Teuchos::EnhancedNumberValidator< T >::hasMin ( ) const
inline

Determines whether or not the validator has a minimum value.

Returns
True if the validator has a minimum value, false otherwise.

Definition at line 1480 of file Teuchos_StandardParameterEntryValidators.hpp.

template<class T >
bool Teuchos::EnhancedNumberValidator< T >::hasMax ( ) const
inline

Determines whether or not the validator has a maximum value.

Returns
True if the validator has a maximum value, false otherwise.

Definition at line 1488 of file Teuchos_StandardParameterEntryValidators.hpp.

template<class T >
ValidStringsList Teuchos::EnhancedNumberValidator< T >::validStringValues ( ) const
inlinevirtual
template<class T >
void Teuchos::EnhancedNumberValidator< T >::validate ( ParameterEntry const &  entry,
std::string const &  paramName,
std::string const &  sublistName 
) const
virtual
template<class T >
void Teuchos::EnhancedNumberValidator< T >::validateAndModify ( std::string const &  paramName,
std::string const &  sublistName,
ParameterEntry entry 
) const
virtual
template<class T >
Teuchos::any Teuchos::EnhancedNumberValidator< T >::getNumberFromString ( const ParameterEntry entry,
const bool  activeQuery 
) const
template<class T >
const std::string Teuchos::EnhancedNumberValidator< T >::getXMLTypeName ( ) const
inlinevirtual
template<class T >
void Teuchos::EnhancedNumberValidator< T >::printDoc ( std::string const &  docString,
std::ostream &  out 
) const
inlinevirtual

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