Optika GUI Toolik Version of the Day
Public Member Functions | Private Attributes
Optika::GenericNumberValidator< S > Class Template Reference

#include <Optika_SpecificParameterEntryValidators.hpp>

Inheritance diagram for Optika::GenericNumberValidator< S >:
Inheritance 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

Private Attributes

QString type
minVal
maxVal
step
bool containsMin
bool containsMax

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.

Definition at line 60 of file Optika_SpecificParameterEntryValidators.hpp.


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.

Definition at line 71 of file Optika_SpecificParameterEntryValidators.hpp.

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.

Definition at line 81 of file Optika_SpecificParameterEntryValidators.hpp.


Member Function Documentation

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.

Definition at line 103 of file Optika_SpecificParameterEntryValidators.hpp.

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.

Definition at line 113 of file Optika_SpecificParameterEntryValidators.hpp.

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.

Definition at line 123 of file Optika_SpecificParameterEntryValidators.hpp.

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.

Definition at line 132 of file Optika_SpecificParameterEntryValidators.hpp.

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.

Definition at line 141 of file Optika_SpecificParameterEntryValidators.hpp.

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.

Definition at line 150 of file Optika_SpecificParameterEntryValidators.hpp.

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.

Definition at line 159 of file Optika_SpecificParameterEntryValidators.hpp.

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.

Definition at line 168 of file Optika_SpecificParameterEntryValidators.hpp.

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.

Definition at line 177 of file Optika_SpecificParameterEntryValidators.hpp.

template<class S>
Teuchos::RCP< const Teuchos::Array<std::string> > Optika::GenericNumberValidator< S >::validStringValues ( ) const [inline, virtual]
template<class S>
void Optika::GenericNumberValidator< S >::validate ( Teuchos::ParameterEntry const &  entry,
std::string const &  paramName,
std::string const &  sublistName 
) const [inline, virtual]
template<class S>
void Optika::GenericNumberValidator< S >::printDoc ( std::string const &  docString,
std::ostream &  out 
) const [inline, virtual]

Member Data Documentation

template<class S>
QString Optika::GenericNumberValidator< S >::type [private]

The type of the array.

Definition at line 235 of file Optika_SpecificParameterEntryValidators.hpp.

template<class S>
S Optika::GenericNumberValidator< S >::minVal [private]

The minimum value accepted by the validator.

Definition at line 240 of file Optika_SpecificParameterEntryValidators.hpp.

template<class S>
S Optika::GenericNumberValidator< S >::maxVal [private]

The maximum value accepted by the validator.

Definition at line 245 of file Optika_SpecificParameterEntryValidators.hpp.

template<class S>
S Optika::GenericNumberValidator< S >::step [private]

The increment to use when increaseing or decreaseing the value the validator is validating.

Definition at line 250 of file Optika_SpecificParameterEntryValidators.hpp.

template<class S>
bool Optika::GenericNumberValidator< S >::containsMin [private]

Whether or not a minimum value has been specified for this validator.

Definition at line 255 of file Optika_SpecificParameterEntryValidators.hpp.

template<class S>
bool Optika::GenericNumberValidator< S >::containsMax [private]

Whetehr or not a maximum value has been specified for this validator.

Definition at line 260 of file Optika_SpecificParameterEntryValidators.hpp.


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