open_iA 2025.6
Loading...
Searching...
No Matches
iAAttributeDescriptor Class Reference

Class for describing an attribute or parameter: its value type (see iAValueType), its name, its range, etc. More...

#include <iAAttributeDescriptor.h>

Public Types

enum  iAAttributeType { None = -1 , Parameter , DerivedOutput }
 Type of attribute (parameter or derived output) More...
 

Public Member Functions

 iAAttributeDescriptor (QString const &name, iAAttributeType attribType, iAValueType valueType)
 Create an attribute descriptor.
 
virtual ~iAAttributeDescriptor ()
 
void adjustMinMax (double value)
 adjust minimum/maximum so that the given value fits inside
 
iAAttributeType attribType () const
 The type of attribute (parameter or derived output, see iAAttributeType).
 
std::shared_ptr< iAAttributeDescriptorclone () const
 Deep copy the attribute descriptor.
 
bool coversWholeRange (double min, double max) const
 check whether the given interval covers the whole internal min/max range
 
QVariant defaultValue () const
 (default) value of the attribute.
 
QStringList dependencies () const
 other settings this settings depends on (=which must be enabled for this setting to be effective)
 
bool isLogScale () const
 Check whether the attribute is given in a logarithmic scale.
 
double max () const
 For discrete/continuous types, the maximum possible value.
 
double min () const
 For discrete/continuous types, the minimum possible value. For categorical values, it's 0.
 
QString const & name () const
 The name of the attribute.
 
virtual std::shared_ptr< iANameMappernameMapper () const
 
void resetMinMax ()
 reset minimum/maximum to highest/lowest values representable by double.
 
void setDefaultValue (QVariant v)
 set the (default) values of the attribute.
 
void setDependencies (QStringList const &dependencies)
 set dependencies
 
void setLogScale (bool l)
 Set whether the attribute is given in a logarithmic scale.
 
QString toString () const
 Convert the attribute descriptor to a string.
 
iAValueType valueType () const
 The type of the value of this attribute; see iAValueType.
 

Static Public Member Functions

static std::shared_ptr< iAAttributeDescriptorcreate (QString const &def)
 Create an attribute descriptor from the given string (which could e.g.
 
static std::shared_ptr< iAAttributeDescriptorcreateParam (QString const &name, iAValueType valueType, QVariant defaultValue=0.0, double min=std::numeric_limits< double >::lowest(), double max=std::numeric_limits< double >::max())
 Create an attribute descriptor with attribute type Parameter from the given values.
 

Detailed Description

Class for describing an attribute or parameter: its value type (see iAValueType), its name, its range, etc.

Member Enumeration Documentation

◆ iAAttributeType

Type of attribute (parameter or derived output)

Enumerator
None 
Parameter 
DerivedOutput 

Constructor & Destructor Documentation

◆ iAAttributeDescriptor()

iAAttributeDescriptor::iAAttributeDescriptor ( QString const & name,
iAAttributeType attribType,
iAValueType valueType )

Create an attribute descriptor.

◆ ~iAAttributeDescriptor()

iAAttributeDescriptor::~iAAttributeDescriptor ( )
virtual

Member Function Documentation

◆ adjustMinMax()

void iAAttributeDescriptor::adjustMinMax ( double value)

adjust minimum/maximum so that the given value fits inside

Parameters
valueif smaller than current minimum, it will be the new minimum; if greater than current maximum, it will be the new maximum.

◆ attribType()

iAAttributeDescriptor::iAAttributeType iAAttributeDescriptor::attribType ( ) const

The type of attribute (parameter or derived output, see iAAttributeType).

◆ clone()

std::shared_ptr< iAAttributeDescriptor > iAAttributeDescriptor::clone ( ) const

Deep copy the attribute descriptor.

◆ coversWholeRange()

bool iAAttributeDescriptor::coversWholeRange ( double min,
double max ) const

check whether the given interval covers the whole internal min/max range

Returns
true if min smaller or equal internal minimum and maximum greater or equal internal maximum

◆ create()

std::shared_ptr< iAAttributeDescriptor > iAAttributeDescriptor::create ( QString const & def)
static

Create an attribute descriptor from the given string (which could e.g.

be created by the toString method).

◆ createParam()

std::shared_ptr< iAAttributeDescriptor > iAAttributeDescriptor::createParam ( QString const & name,
iAValueType valueType,
QVariant defaultValue = 0.0,
double min = std::numeric_limits<double>::lowest(),
double max = std::numeric_limits<double>::max() )
static

Create an attribute descriptor with attribute type Parameter from the given values.

◆ defaultValue()

QVariant iAAttributeDescriptor::defaultValue ( ) const

(default) value of the attribute.

For categorical parameters, this QVariant holds a QStringList (access via QVariant::toStringList()) of all possible values.

◆ dependencies()

QStringList iAAttributeDescriptor::dependencies ( ) const

other settings this settings depends on (=which must be enabled for this setting to be effective)

◆ isLogScale()

bool iAAttributeDescriptor::isLogScale ( ) const

Check whether the attribute is given in a logarithmic scale.

◆ max()

double iAAttributeDescriptor::max ( ) const

For discrete/continuous types, the maximum possible value.

For categorical values, it's (number of of possible values) - 1.

◆ min()

double iAAttributeDescriptor::min ( ) const

For discrete/continuous types, the minimum possible value. For categorical values, it's 0.

◆ name()

QString const & iAAttributeDescriptor::name ( ) const

The name of the attribute.

◆ nameMapper()

std::shared_ptr< iANameMapper > iAAttributeDescriptor::nameMapper ( ) const
virtual

◆ resetMinMax()

void iAAttributeDescriptor::resetMinMax ( )

reset minimum/maximum to highest/lowest values representable by double.

◆ setDefaultValue()

void iAAttributeDescriptor::setDefaultValue ( QVariant v)

set the (default) values of the attribute.

For categorical parameters, this should be a QStringList of all possible values.

◆ setDependencies()

void iAAttributeDescriptor::setDependencies ( QStringList const & dependencies)

set dependencies

◆ setLogScale()

void iAAttributeDescriptor::setLogScale ( bool l)

Set whether the attribute is given in a logarithmic scale.

◆ toString()

QString iAAttributeDescriptor::toString ( ) const

Convert the attribute descriptor to a string.

◆ valueType()

iAValueType iAAttributeDescriptor::valueType ( ) const

The type of the value of this attribute; see iAValueType.


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