itom
Loading...
Searching...
No Matches
ito::DoubleMeta Class Reference

Meta-information for ito::Param of type Double. More...

#include <paramMeta.h>

Inheritance diagram for ito::DoubleMeta:
ito::ParamMeta ito::DoubleArrayMeta ito::DoubleIntervalMeta

Public Types

enum  tDisplayNotation { Automatic , Fixed , Scientific }
 Display notation style if the related parameters is displayed in any widget. More...
 
- Public Types inherited from ito::ParamMeta
enum  MetaRtti {
  rttiUnknown = 0 , rttiCharMeta = 1 , rttiIntMeta = 2 , rttiDoubleMeta = 3 ,
  rttiStringMeta = 4 , rttiHWMeta = 5 , rttiDObjMeta = 6 , rttiIntArrayMeta = 7 ,
  rttiDoubleArrayMeta = 8 , rttiCharArrayMeta = 9 , rttiIntervalMeta = 10 , rttiDoubleIntervalMeta = 11 ,
  rttiRangeMeta = 12 , rttiRectMeta = 13 , rttiStringListMeta = 14
}
 Runtime type information. More...
 
enum  tRepresentation {
  Linear = 0x0001 , Logarithmic = 0x0002 , Boolean = 0x0004 , PureNumber = 0x0008 ,
  HexNumber = 0x0010 , IPV4Address = 0x0020 , MACAddress = 0x0040 , UnknownRepresentation = 0x0080
}
 The representation of number types indicates the type of widget that is suited best to display and change the value. More...
 

Public Member Functions

 DoubleMeta (float64 minVal, float64 maxVal, float64 stepSize=0.0, ito::ByteArray category=ito::ByteArray())
 constructor with minimum and maximum value
 
 DoubleMeta (const DoubleMeta &copy)
 
DoubleMetaoperator= (const DoubleMeta &rhs)
 
virtual bool operator== (const ParamMeta &other) const
 
float64 getMin () const
 returns maximum value
 
float64 getMax () const
 returns step size
 
float64 getStepSize () const
 returns unit
 
ito::ByteArray getUnit () const
 sets unit string of this parameter
 
void setUnit (const ito::ByteArray &unit)
 returns display precision
 
int getDisplayPrecision () const
 sets display precision
 
void setDisplayPrecision (int displayPrecision)
 returns display notation
 
DoubleMeta::tDisplayNotation getDisplayNotation () const
 sets display notation
 
void setDisplayNotation (DoubleMeta::tDisplayNotation displayNotation)
 returns display representation
 
ParamMeta::tRepresentation getRepresentation () const
 sets display representation
 
void setRepresentation (ParamMeta::tRepresentation representation)
 
void setMin (float64 val)
 sets the minimum value
 
void setMax (float64 val)
 sets the maximum value
 
void setStepSize (float64 val)
 sets the step size
 
- Public Member Functions inherited from ito::ParamMeta
 ParamMeta (ito::ByteArray category=ito::ByteArray())
 constructor used by derived classes to indicate their real type
 
 ParamMeta (MetaRtti type, ito::ByteArray category=ito::ByteArray())
 
 ParamMeta (const ParamMeta &copy)
 
ParamMetaoperator= (const ParamMeta &rhs)
 destructor
 
virtual ~ParamMeta ()
 returns runtime type information value
 
MetaRtti getType () const
 returns category name of this parameter (default: empty ByteArray)
 
ito::ByteArray getCategory () const
 
void setCategory (const ito::ByteArray &category)
 
bool operator!= (const ParamMeta &other) const
 

Static Public Member Functions

static DoubleMetaall (ito::ByteArray category=ito::ByteArray())
 returns minimum value
 

Private Attributes

float64 m_minVal
 
float64 m_maxVal
 
float64 m_stepSize
 
ito::ByteArray m_unit
 unit of value, e.g. 'mm', ...
 
int m_displayPrecision
 
tDisplayNotation m_displayNotation
 indicates how this double number should be rendered (e.g. in GUI widgets)
 
ParamMeta::tRepresentation m_representation
 hint for display representation in GUI widget
 

Additional Inherited Members

- Protected Attributes inherited from ito::ParamMeta
MetaRtti m_type
 
ito::ByteArray m_category
 optional category name of this parameter
 

Detailed Description

Meta-information for ito::Param of type Double.

An object of this class can be used to parametrize a parameter whose type is ito::ParamBase::Double. If set, the given double number can be limited with respect to given minimum and maximum values as well as an optional step size (default: 0.0 -> no step size).

See also
ito::Param, ito::ParamMeta

Member Enumeration Documentation

◆ tDisplayNotation

Display notation style if the related parameters is displayed in any widget.

Enumerator
Automatic 

double number is automatically rendered in any GUI element (default)

Fixed 

if possible, the double number should be shown as fixed number, e.g. 1000.00

Scientific 

if possible, the double number should be rendered in a scientific notation, e.g. 1.0E3

Member Function Documentation

◆ operator==()

bool ito::DoubleMeta::operator== ( const ParamMeta & other) const
virtual

returns a new instance of DoubleMeta, where the min and max are set to the full range available for double. The caller has to take care of memory.

Reimplemented from ito::ParamMeta.

Reimplemented in ito::DoubleArrayMeta, and ito::DoubleIntervalMeta.

◆ setDisplayNotation()

void ito::DoubleMeta::setDisplayNotation ( DoubleMeta::tDisplayNotation displayNotation)

returns display representation

< sets display notation

◆ setDisplayPrecision()

void ito::DoubleMeta::setDisplayPrecision ( int displayPrecision)

returns display notation

< sets display precision

◆ setMax()

void ito::DoubleMeta::setMax ( float64 val)

sets the maximum value

Parameters
valis the new maximum value, if this is smaller than the current minimum value, the minimum value is changed to val, too

◆ setMin()

void ito::DoubleMeta::setMin ( float64 val)

sets the minimum value

Parameters
valis the new minimum value, if this is bigger than the current maximum value, the maximum value is changed to val, too

◆ setStepSize()

void ito::DoubleMeta::setStepSize ( float64 val)

sets the step size

Parameters
valis the new step size, hence only discrete values [minVal, minVal+stepSize, minVal+2*stepSize...,maxVal] are allowed

◆ setUnit()

void ito::DoubleMeta::setUnit ( const ito::ByteArray & unit)

returns display precision

< sets unit string of this parameter

Member Data Documentation

◆ m_displayPrecision

int ito::DoubleMeta::m_displayPrecision
private

hint for the number of decimal digits that should be shown in any GUI widget, default: 3


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