DParameterRange.h

Classes

DParameterRange -- A helper class to deal with data ranges to support options (full description)

template <class T> class DParameterRange : public DisplayParameter

Interface

Public Members
DParameterRange(const String name, const String description, const String help, const T minimum, const T maximum, const T resolution, const T defaultvalue, const T value, const String context = "", const Bool editable = True, const Bool provideentry = False)
DParameterRange()
DParameterRange(const DParameterRange<T> &other)
virtual ~DParameterRange()
DParameterRange<T> &operator=(const DParameterRange<T> &other)
virtual Bool fromRecord(const RecordInterface &record)
virtual void toRecord(RecordInterface &record, const Bool fullrecord = True, const Bool overwrite = False)
T minimum()
T maximum()
T resolution()
T defaultValue()
T value()
Bool provideEntry()
void setMinimum(const T minimum)
void setMaximum(const T maximum)
void setResolution(const T resolution)
void setDefaultValue(const T defaultValue)
void setValue(const T value)
const T& operator=(const T &value)
void setProvideEntry(const Bool provideentry)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Making things easier

To Do

Member Description

DParameterRange(const String name, const String description, const String help, const T minimum, const T maximum, const T resolution, const T defaultvalue, const T value, const String context = "", const Bool editable = True, const Bool provideentry = False)

Constructor taking the name of the parameter, a short description, some help text, a minimum value, a maximum value, a default value, a current value, and flags indicating whether the parameter is editable.

DParameterRange()

(Required) default constructor.

DParameterRange(const DParameterRange<T> &other)

(Required) copy constructor.

virtual ~DParameterRange()

Destructor.

DParameterRange<T> &operator=(const DParameterRange<T> &other)

(Required) copy assignment.

virtual Bool fromRecord(const RecordInterface &record)

Parse record, and update this parameter if a field exists whose name matches that of this parameter. Return True if the parameter is changed, otherwise return False.

virtual void toRecord(RecordInterface &record, const Bool fullrecord = True, const Bool overwrite = False)

Place a record describing this parameter in a sub-field of record with name matching that of this parameter. If overwrite is True, then any existing field with matching name will be overwritten. If fullrecord is True, then a complete description of the parameter is given, otherwise just its current value is stored in record. Presently fullrecord is ignored.

T minimum()

Return the minimum for this parameter.

T maximum()

Return the maximum for this parameter.

T resolution()

Return the resolution of this parameter.

T defaultValue()

Return the default for this parameter.

T value()

Return the current value of this parameter.

Bool provideEntry()

Return whether there should be a text box beside the slider. See 'intrange' in the autogui tool documentation for more information.

void setMinimum(const T minimum)

Set or change the minimum for this parameter.

void setMaximum(const T maximum)

Set or change the maximum for this parameter.

void setResolution(const T resolution)

Set or change the resolution for this parameter.

void setDefaultValue(const T defaultValue)

Set or change the default for this parameter.

void setValue(const T value)

Set or change the current value for this parameter.

const T& operator=(const T &value)

Convenient syntax to set (only) the value.

void setProvideEntry(const Bool provideentry)

Set or change the provideentry state for this parameter.