Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | 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 ()
 Default constructor.
 
 QuantityMap (const QuantityMap &m)
 Copy constructor.
 
 QuantityMap (const std::initializer_list< std::pair< std::string, Quantity > > &inits)
 Constructor for ... ?
 
QuantityMapoperator= (const std::initializer_list< std::pair< std::string, Quantity > > &inits)
 
void assign (const std::initializer_list< std::pair< std::string, Quantity > > &inits)
 
bool hasKey (const std::string &key) const
 Checks if an exact match, without checking variants, is found.
 
bool hasQuantity (const std::string &key) const
 Checks if an exact match or a variant, is found.
 
iterator retrieve (const std::string &key)
 Tries to find a quantity, first by exact match, or then among variants.
 
const_iterator retrieve (const std::string &key) const
 Tries to find a quantity, first by exact match, or then among variants.
 
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 without assigning the quantity. Optionally overrides with user values.
 
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 & toStream (std::ostream &ostr) const
 Output.
 

Public Attributes

const QuantityDBZ
 
const QuantityVRAD
 
const QuantityZDR
 
const QuantityRHOHV
 
const QuantityKDP
 
const QuantityQIND
 
const QuantityPROB
 

Constructor & Destructor Documentation

◆ QuantityMap()

QuantityMap ( const std::initializer_list< std::pair< std::string, Quantity > > &  inits)

Constructor for ... ?

Constructor for init lists.

Member Function Documentation

◆ hasKey()

bool hasKey ( const std::string &  key) const
inline

Checks if an exact match, without checking variants, is found.

See also
hasQuantity()

◆ hasQuantity()

bool hasQuantity ( const std::string &  key) const
inline

Checks if an exact match or a variant, is found.

See also
hasKey()

◆ retrieve() [1/2]

QuantityMap::iterator retrieve ( const std::string &  key)

Tries to find a quantity, first by exact match, or then among variants.

First, uses map_t::find(). If a match is found, iterator pointing to it is returned. If not, the map is revisited and all the variants are tested as well.

Returns
- a valid iterator or map_t::end()

◆ retrieve() [2/2]

QuantityMap::const_iterator retrieve ( const std::string &  key) const

Tries to find a quantity, first by exact match, or then among variants.

First, uses map_t::find(). If a match is found, iterator pointing to it is returned. If not, the map is revisited and all the variants are tested as well.

Returns
- a valid iterator or map_t::end()

◆ setQuantityDefaults() [1/2]

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

Sets default values of given quantity without assigning the quantity. 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]

template<class D >
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: