Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

dtpf::RangeParameter Class Reference

#include <Parameter.h>

Inheritance diagram for dtpf::RangeParameter:

dtpf::SpecificParameter dtpf::Parameter dtpf::ParameterTreeVertex List of all members.

Detailed Description

RangeParameter is a SpecificParameter for numeric parameters with a value between minimum and maximum bounds with a increment step.


Public Member Functions

 RangeParameter (const muscle::String &name, const T &value, const T &default, const T &min, const T &max, const T &step)
 Construct a RangeParameter with the given name; given initial, default, minimum and maximum values; and given step between values.
virtual ~RangeParameter ()
 Destroy a RangeParameter.
virtual void SetValue (const T &value)
 Set the parameter value which must lie between the minimum and maximum, inclusive.
void SetMinimum (const T &min)
 Set the minimum allowable value.
GetMinimum () const
 Get the minimum allowable value.
void SetMaximum (const T &max)
 Set the maximum allowable value.
GetMaximum () const
 Get the maximum allowable value.
void SetStep (const T &step)
 Set the step between allowable values.
GetStep () const
 Get the step between allowable values.
virtual void SetUIType (ParameterUIType uiType)
 Set the UI type to one comaptible with a numeric range parameter.

Protected Attributes

m_min
 The minimum allowable parameter value.
m_max
 The maximum allowable parameter value.
m_step
 The step between allowable values.


Constructor & Destructor Documentation

dtpf::RangeParameter::RangeParameter const muscle::String &  name,
const T &  value,
const T &  default,
const T &  min,
const T &  max,
const T &  step
[inline]
 

Construct a RangeParameter with the given name; given initial, default, minimum and maximum values; and given step between values.

Parameters:
name The name of the parameter.
value The initial parameter value.
default The default parameter value.
min The minimum parameter value.
max The maximum parameter value.
step The step between allowable values.

virtual dtpf::RangeParameter::~RangeParameter  )  [inline, virtual]
 

Destroy a RangeParameter.


Member Function Documentation

T dtpf::RangeParameter::GetMaximum  )  const [inline]
 

Get the maximum allowable value.

Returns:
The maximum allowable value.

T dtpf::RangeParameter::GetMinimum  )  const [inline]
 

Get the minimum allowable value.

Returns:
The minimum allowable value.

T dtpf::RangeParameter::GetStep  )  const [inline]
 

Get the step between allowable values.

Returns:
The step between values.

void dtpf::RangeParameter::SetMaximum const T &  max  )  [inline]
 

Set the maximum allowable value.

The new maximum must be greater than the minimum.

Parameters:
max The maximum value.

void dtpf::RangeParameter::SetMinimum const T &  min  )  [inline]
 

Set the minimum allowable value.

The new minimum must be less than the maximum.

Parameters:
min The minimum value.

void dtpf::RangeParameter::SetStep const T &  step  )  [inline]
 

Set the step between allowable values.

The step must be positive and no larger than the difference between the minimum and maximum values.

virtual void dtpf::RangeParameter::SetUIType ParameterUIType  uiType  )  [inline, virtual]
 

Set the UI type to one comaptible with a numeric range parameter.

Parameters:
uiType The new ParameterUIType.

Implements dtpf::Parameter.

virtual void dtpf::RangeParameter::SetValue const T &  value  )  [inline, virtual]
 

Set the parameter value which must lie between the minimum and maximum, inclusive.

If the step has been set to a non-zero value, the new value must satisfy: ((value <= maximum) && (value >= minimum) && (value == minimum + k * step)) || (value == maximum).

Parameters:
value The new value to set.

Reimplemented from dtpf::SpecificParameter.


Member Data Documentation

T dtpf::RangeParameter::m_max [protected]
 

The maximum allowable parameter value.

T dtpf::RangeParameter::m_min [protected]
 

The minimum allowable parameter value.

T dtpf::RangeParameter::m_step [protected]
 

The step between allowable values.


The documentation for this class was generated from the following file:
Generated on Wed Aug 3 07:26:19 2005 for DTPF by  doxygen 1.3.9.1