Public Types | Public Member Functions | Public Attributes | List of all members
Quantity Class Reference

Structure for defining. More...

#include <Quantity.h>

Inheritance diagram for Quantity:
Inheritance graph
[legend]
Collaboration diagram for Quantity:
Collaboration graph
[legend]

Public Types

typedef std::map< char, EncodingODIMmap_t
 
typedef std::list< EncodingODIMlist_t
 

Public Member Functions

 Quantity ()
 Default constructor.
 
 Quantity (const Quantity &quantity)
 Copy constructor.
 
 Quantity (const std::string &name, const drain::Range< double > &range={}, char defaultType='\0', const list_t &l={}, double undetectValue=std::numeric_limits< double >::signaling_NaN())
 Constructor for brace initializer.
 
EncodingODIMset (char typecode)
 Declare encoding (a storage type and scaling) for this quantity.
 
const EncodingODIMget (char typecode='\0') const
 Retrieve the scaling for a given storage type.
 
const EncodingODIMget (const std::string &t) const
 Retrieve the scaling for a given storage type.
 
bool hasUndetectValue () const
 True, if a value corresponding a very small (unmeasurable) value has been defined.
 
void setZero (double value)
 Set a value to be used like a real measurement, for example in interpolation. More...
 
void setZero (const std::string &value)
 Set a value to be used like a real measurement, for example in interpolation. More...
 
void unsetZero ()
 Confirm that no value should be used as a substitute of undetected value.
 
void setPhysicalRange (double min, double max=std::numeric_limits< double >::max())
 Sets absolute or typical range of this quantity. More...
 
std::ostream & toStream (std::ostream &ostr) const
 Print declared encodings (storage types and scalings)
 

Public Attributes

std::string name
 
char defaultType = '\0'
 Default storage type.
 
drain::Range< double > physicalRange
 
double undetectValue
 A physical value corresponding a very small (unmeasurable) value has been defined.
 

Detailed Description

Structure for defining.

Member Function Documentation

◆ setPhysicalRange()

void setPhysicalRange ( double  min,
double  max = std::numeric_limits<double>::max() 
)
inline

Sets absolute or typical range of this quantity.

For example, for probability the range would be [0.0, 1.0]. Setting range is useful when data are converted from some storage type to another

◆ setZero() [1/2]

void setZero ( const std::string &  value)

Set a value to be used like a real measurement, for example in interpolation.

Parameters
value- substitute for undetect marker value.

◆ setZero() [2/2]

void setZero ( double  value)
inline

Set a value to be used like a real measurement, for example in interpolation.

Parameters
value- substitute for undetect marker value, or signaling_NaN

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