Optika Development
Public Member Functions
Optika::GenericNumberValidator< S > Class Template Reference

#include <Optika_SpecificParameterEntryValidators.hpp>

Inheritance diagram for Optika::GenericNumberValidator< S >:
Inheritance graph
[legend]
Collaboration diagram for Optika::GenericNumberValidator< S >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 GenericNumberValidator (QString type, S min, S max, S step)
 GenericNumberValidator (QString type, S step)
void setMin (S min)
void setMax (S max)
min () const
max () const
bool hasMin () const
bool hasMax () const
getStep () const
void setStep (S step)
virtual const QString getType () const
Teuchos::RCP< const
Teuchos::Array< std::string > > 
validStringValues () const
void validate (Teuchos::ParameterEntry const &entry, std::string const &paramName, std::string const &sublistName) const
void printDoc (std::string const &docString, std::ostream &out) const

Detailed Description

template<class S>
class Optika::GenericNumberValidator< S >

A Template base class for NumberValidators. Note that while this is not an abstract base class, you really shouldn't use it. Just use the EnhancedNumberValidator class.


Constructor & Destructor Documentation

template<class S>
Optika::GenericNumberValidator< S >::GenericNumberValidator ( QString  type,
min,
max,
step 
) [inline]

Constructs a GenericNumberValidator.

Parameters:
typeThe type of the validator.
minThe minimum acceptable value for this validator.
maxThe maximum acceptable value for this validator.
stepThe increments at which the value should be changed. This is mostly used for the QSpinBox that is used in the Optika GUI. If you're not using the GUI, you may ignore this parameter.
template<class S>
Optika::GenericNumberValidator< S >::GenericNumberValidator ( QString  type,
step 
) [inline]

Constructs a GenericNumberValidator without an explicit minimum or maximum.

Parameters:
typeThe type of the validator.
stepThe increments at which the value should be changed. This is mostly used for the QSpinBox that is used in the Optika GUI. If you're not using the GUI, you may ignore this parameter.

Member Function Documentation

template<class S>
S Optika::GenericNumberValidator< S >::getStep ( ) const [inline]

Gets the step being used for the validator.

Returns:
The step being used for the validator.
template<class S>
virtual const QString Optika::GenericNumberValidator< S >::getType ( ) const [inline, virtual]

Gets the type of number being used.

Returns:
A string containting the name of the type.
template<class S>
bool Optika::GenericNumberValidator< S >::hasMax ( ) const [inline]

Determines whether or not the validator has a maximum value.

Returns:
True if the validator has a maximum value, false otherwise.
template<class S>
bool Optika::GenericNumberValidator< S >::hasMin ( ) const [inline]

Determines whether or not the validator has a minimum value.

Returns:
True if the validator has a minimum value, false otherwise.
template<class S>
S Optika::GenericNumberValidator< S >::max ( ) const [inline]

Gets the maximum acceptable value for the validator.

Returns:
The maximum acceptable value for the validator.
template<class S>
S Optika::GenericNumberValidator< S >::min ( ) const [inline]

Gets the minimum acceptable value for the validator.

Returns:
The minimum acceptable value for the validator.
template<class S>
void Optika::GenericNumberValidator< S >::setMax ( max) [inline]

Sets the maximum acceptable value for the validator.

Parameters:
minThe desired maximum acceptable value for the validator.
template<class S>
void Optika::GenericNumberValidator< S >::setMin ( min) [inline]

Sets the minimum acceptable value for the validator.

Parameters:
minThe desired minimum acceptable value for the validator.
template<class S>
void Optika::GenericNumberValidator< S >::setStep ( step) [inline]

Sets the step being used for the validator.

Parameters:
Thestep to be used for the validator.

The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations