Public Types | Public Member Functions | List of all members
QuantityMap Class Reference
Inheritance diagram for QuantityMap:
Inheritance graph
[legend]
Collaboration diagram for QuantityMap:
Collaboration graph
[legend]

Public Types

typedef std::map< std::string, Quantitymap_t
 

Public Member Functions

 QuantityMap (const QuantityMap &m)
 
 QuantityMap (const map_t &m)
 
void initialize ()
 
Quantityadd (const std::string &key)
 Sets quantity encoding. If gain=0.0, default values for the given type will be set as defined in drain::Type. More...
 
EncodingODIMset (const std::string &key, char typecode)
 
Quantitycopy (const std::string &key, const Quantity &dst)
 
bool hasQuantity (const std::string &key) const
 
const Quantityget (const std::string &key) const
 
Quantityget (const std::string &key)
 
bool setQuantityDefaults (EncodingODIM &dst, const std::string &quantity, const std::string &values="") const
 Sets default values of given quantity - but not the quantity itself. Optionally overrides with user values. More...
 
bool setQuantityDefaults (ODIM &dst) const
 
template<class D >
bool setQuantityDefaults (PlainData< D > &dstData, const std::string &quantity="", const std::string &values="") const
 
template<class M >
bool isNormalized (const M odim) const
 Checks if data.
 
std::ostream & toOstr (std::ostream &ostr) const
 

Member Function Documentation

◆ add()

Quantity& add ( const std::string &  key)
inline

Sets quantity encoding. If gain=0.0, default values for the given type will be set as defined in drain::Type.

Sets quantity encoding for a non-negative quantity.

◆ setQuantityDefaults() [1/2]

bool setQuantityDefaults ( EncodingODIM dst,
const std::string &  quantity,
const std::string &  values = "" 
) const

Sets default values of given quantity - but not the quantity itself. Optionally overrides with user values.

Parameters
quantity- the quantity according to which the encoding will be set.
values- str values, comma-separated
Returns
- true, if type could be set / derived

Use user-defined type. If not supplied, use default type.

find type conf for this Quantity and basetype

◆ setQuantityDefaults() [2/2]

bool setQuantityDefaults ( PlainData< D > &  dstData,
const std::string &  quantity = "",
const std::string &  values = "" 
) const
inline
Template Parameters
D- data source type (PolarSrc, CartesianDst, ...)
Parameters
quantity- the quantity according to which the encoding will be set; if empty, current quantity will be used
values- comma-separated settings to override default values
Returns
- true, if type could be set / derived

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