casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
casa::DParameterRange< T > Class Template Reference

A helper class to deal with data ranges to support options. More...

#include <DSMarker.h>

Inheritance diagram for casa::DParameterRange< T >:
casa::DisplayParameter

Public Member Functions

 DParameterRange (const casacore::String name, const casacore::String description, const casacore::String help, const T minimum, const T maximum, const T resolution, const T defaultvalue, const T value, const casacore::String context="", const casacore::Bool editable=true, const casacore::Bool provideentry=false, const casacore::Bool onrelease=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. More...
 
 DParameterRange ()
 (Required) default constructor. More...
 
 DParameterRange (const DParameterRange< T > &other)
 (Required) copy constructor. More...
 
virtual ~DParameterRange ()
 Destructor. More...
 
DParameterRange< T > & operator= (const DParameterRange< T > &other)
 (Required) copy assignment. More...
 
virtual casacore::Bool fromRecord (const casacore::RecordInterface &record)
 Parse record, and update this parameter if a field exists whose name matches that of this parameter. More...
 
virtual void toRecord (casacore::RecordInterface &record, const casacore::Bool fullrecord=true, const casacore::Bool overwrite=false)
 Place a record describing this parameter in a sub-field of record with name matching that of this parameter. More...
 
minimum ()
 Return the minimum for this parameter. More...
 
maximum ()
 Return the maximum for this parameter. More...
 
resolution ()
 Return the resolution of this parameter. More...
 
defaultValue ()
 Return the default for this parameter. More...
 
value ()
 Return the current value of this parameter. More...
 
casacore::Bool provideEntry ()
 Return whether there should be a text box beside the slider. More...
 
casacore::Bool onRelease ()
 Return whether the slider event should occur when the user releases the slider, i.e. More...
 
void setMinimum (const T minimum)
 Set or change the minimum for this parameter. More...
 
void setMaximum (const T maximum)
 Set or change the maximum for this parameter. More...
 
void setResolution (const T resolution)
 Set or change the resolution for this parameter. More...
 
void setDefaultValue (const T defaultValue)
 Set or change the default for this parameter. More...
 
void setValue (const T value)
 Set or change the current value for this parameter. More...
 
const T & operator= (const T &value)
 Convenient syntax to set (only) the value. More...
 
void setProvideEntry (const casacore::Bool provideentry)
 Set or change the provideentry state for this parameter. More...
 
void setOnRelease (const casacore::Bool onrelease)
 Set or change the onrelease state for this parameter. More...
 
- Public Member Functions inherited from casa::DisplayParameter
virtual ~DisplayParameter ()
 Destructor. More...
 
casacore::String name () const
 Return the name of this parameter. More...
 
casacore::String description () const
 Return the description of this parameter. More...
 
casacore::String help () const
 Return the help for this parameter. More...
 
casacore::String context () const
 Return the context of this parameter. More...
 
casacore::Bool allowUnset () const
 Return whether this parameter can be unset. More...
 
casacore::Bool editable () const
 Return whether this parameter is editable. More...
 
void setName (const casacore::String name)
 Set or change the name of this parameter to that specified. More...
 
void setDescription (const casacore::String description)
 Set or change the description of this parameter to what is specified. More...
 
void setHelp (const casacore::String help)
 Set or change the help for this parameter to what is specified. More...
 
void setContext (const casacore::String context)
 Set or change the context of this parameter to what is specified. More...
 
void setAllowUnset (const casacore::Bool allowunset)
 Set or change whether this parameter may be unset, according to the function argument value. More...
 
void setEditable (const casacore::Bool editable)
 Set or change whether this parameter is editable according to the function argument. More...
 

Private Attributes

itsMinimum
 Store for the minimum of this parameter. More...
 
itsMaximum
 Store for the maximum of this parameter. More...
 
itsResolution
 Store for the resolution of this parameter. More...
 
itsDefault
 Store for the default of this parameter. More...
 
itsValue
 Store for the value of this parameter. More...
 
casacore::Bool itsProvideEntry
 Store for the 'provideentry' state of this parameter. More...
 
casacore::Bool itsOnRelease
 Store for the 'onrelease' state of this parameter. More...
 

Additional Inherited Members

- Protected Member Functions inherited from casa::DisplayParameter
 DisplayParameter (const casacore::String name, const casacore::String description, const casacore::String help, const casacore::String context="", const casacore::Bool allowunset=false, const casacore::Bool editable=true)
 Constructor taking the name of the parameter, a short description, some help text, and flags indicating whether the parameter can be unset and is editable. More...
 
 DisplayParameter (const DisplayParameter &other)
 Copy constructor using copy semantics. More...
 
 DisplayParameter ()
 Default constructor yielding a useless DisplayParameter. More...
 
DisplayParameteroperator= (const DisplayParameter &other)
 Copy assignment. More...
 
casacore::Record baseDescription ()
 Return a basic description of this parameter; used by virtual implementations of toRecord method to fill out a casacore::Record describing this DisplayParameter. More...
 
const DisplayOptionsdisplayOptions () const
 Return the DisplayOptions to use for parsing Records. More...
 

Detailed Description

template<class T>
class casa::DParameterRange< T >

A helper class to deal with data ranges to support options.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Making things easier

Definition at line 45 of file DSMarker.h.

Constructor & Destructor Documentation

template<class T>
casa::DParameterRange< T >::DParameterRange ( const casacore::String  name,
const casacore::String  description,
const casacore::String  help,
const T  minimum,
const T  maximum,
const T  resolution,
const T  defaultvalue,
const T  value,
const casacore::String  context = "",
const casacore::Bool  editable = true,
const casacore::Bool  provideentry = false,
const casacore::Bool  onrelease = 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.

template<class T>
casa::DParameterRange< T >::DParameterRange ( )

(Required) default constructor.

template<class T>
casa::DParameterRange< T >::DParameterRange ( const DParameterRange< T > &  other)

(Required) copy constructor.

template<class T>
virtual casa::DParameterRange< T >::~DParameterRange ( )
virtual

Destructor.

Member Function Documentation

template<class T>
T casa::DParameterRange< T >::defaultValue ( )
inline

Return the default for this parameter.

Definition at line 124 of file DParameterRange.h.

Referenced by casa::DParameterRange< casacore::Int >::setDefaultValue().

template<class T>
virtual casacore::Bool casa::DParameterRange< T >::fromRecord ( const casacore::RecordInterface record)
virtual

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.

Implements casa::DisplayParameter.

template<class T>
T casa::DParameterRange< T >::maximum ( )
inline

Return the maximum for this parameter.

Definition at line 114 of file DParameterRange.h.

Referenced by casa::QtDisplayData::colorBarSizeAdj(), and casa::DParameterRange< casacore::Int >::setMaximum().

template<class T>
T casa::DParameterRange< T >::minimum ( )
inline

Return the minimum for this parameter.

Definition at line 109 of file DParameterRange.h.

Referenced by casa::QtDisplayData::colorBarSizeAdj(), and casa::DParameterRange< casacore::Int >::setMinimum().

template<class T>
casacore::Bool casa::DParameterRange< T >::onRelease ( )
inline

Return whether the slider event should occur when the user releases the slider, i.e.

at the end of setting the value, rather than in real time as the user moves the slider (good for operations which take a long time)

Definition at line 142 of file DParameterRange.h.

template<class T>
DParameterRange<T>& casa::DParameterRange< T >::operator= ( const DParameterRange< T > &  other)

(Required) copy assignment.

template<class T>
const T& casa::DParameterRange< T >::operator= ( const T &  value)
inline

Convenient syntax to set (only) the value.

Definition at line 173 of file DParameterRange.h.

template<class T>
casacore::Bool casa::DParameterRange< T >::provideEntry ( )
inline

Return whether there should be a text box beside the slider.

See 'intrange' in the autogui tool documentation for more information.

Definition at line 135 of file DParameterRange.h.

template<class T>
T casa::DParameterRange< T >::resolution ( )
inline

Return the resolution of this parameter.

Definition at line 119 of file DParameterRange.h.

Referenced by casa::DParameterRange< casacore::Int >::setResolution().

template<class T>
void casa::DParameterRange< T >::setDefaultValue ( const T  defaultValue)
inline

Set or change the default for this parameter.

Definition at line 163 of file DParameterRange.h.

template<class T>
void casa::DParameterRange< T >::setMaximum ( const T  maximum)
inline

Set or change the maximum for this parameter.

Definition at line 153 of file DParameterRange.h.

template<class T>
void casa::DParameterRange< T >::setMinimum ( const T  minimum)
inline

Set or change the minimum for this parameter.

Definition at line 148 of file DParameterRange.h.

template<class T>
void casa::DParameterRange< T >::setOnRelease ( const casacore::Bool  onrelease)
inline

Set or change the onrelease state for this parameter.

Definition at line 184 of file DParameterRange.h.

template<class T>
void casa::DParameterRange< T >::setProvideEntry ( const casacore::Bool  provideentry)
inline

Set or change the provideentry state for this parameter.

Definition at line 179 of file DParameterRange.h.

template<class T>
void casa::DParameterRange< T >::setResolution ( const T  resolution)
inline

Set or change the resolution for this parameter.

Definition at line 158 of file DParameterRange.h.

template<class T>
void casa::DParameterRange< T >::setValue ( const T  value)
inline

Set or change the current value for this parameter.

Definition at line 168 of file DParameterRange.h.

template<class T>
virtual void casa::DParameterRange< T >::toRecord ( casacore::RecordInterface record,
const casacore::Bool  fullrecord = true,
const casacore::Bool  overwrite = false 
)
virtual

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.

Implements casa::DisplayParameter.

template<class T>
T casa::DParameterRange< T >::value ( void  )
inline

Member Data Documentation

template<class T>
T casa::DParameterRange< T >::itsDefault
private

Store for the default of this parameter.

Definition at line 200 of file DParameterRange.h.

Referenced by casa::DParameterRange< casacore::Int >::defaultValue(), and casa::DParameterRange< casacore::Int >::setDefaultValue().

template<class T>
T casa::DParameterRange< T >::itsMaximum
private

Store for the maximum of this parameter.

Definition at line 194 of file DParameterRange.h.

Referenced by casa::DParameterRange< casacore::Int >::maximum(), and casa::DParameterRange< casacore::Int >::setMaximum().

template<class T>
T casa::DParameterRange< T >::itsMinimum
private

Store for the minimum of this parameter.

Definition at line 191 of file DParameterRange.h.

Referenced by casa::DParameterRange< casacore::Int >::minimum(), and casa::DParameterRange< casacore::Int >::setMinimum().

template<class T>
casacore::Bool casa::DParameterRange< T >::itsOnRelease
private

Store for the 'onrelease' state of this parameter.

Definition at line 209 of file DParameterRange.h.

Referenced by casa::DParameterRange< casacore::Int >::onRelease(), and casa::DParameterRange< casacore::Int >::setOnRelease().

template<class T>
casacore::Bool casa::DParameterRange< T >::itsProvideEntry
private

Store for the 'provideentry' state of this parameter.

Definition at line 206 of file DParameterRange.h.

Referenced by casa::DParameterRange< casacore::Int >::provideEntry(), and casa::DParameterRange< casacore::Int >::setProvideEntry().

template<class T>
T casa::DParameterRange< T >::itsResolution
private

Store for the resolution of this parameter.

Definition at line 197 of file DParameterRange.h.

Referenced by casa::DParameterRange< casacore::Int >::resolution(), and casa::DParameterRange< casacore::Int >::setResolution().

template<class T>
T casa::DParameterRange< T >::itsValue
private

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