ome-xml  5.6.0
Public Member Functions | List of all members
ome::xml::model::primitives::QuantityConverter< ome::xml::model::enums::UnitsPressure, Value > Struct Template Reference

Convert a quantity to a different unit. More...

#include <ome/xml/model/enums/UnitsPressureConvert.h>

Public Member Functions

Quantity< ome::xml::model::enums::UnitsPressure, Value > operator() (const Quantity< ome::xml::model::enums::UnitsPressure, Value > &quantity, typename Quantity< ome::xml::model::enums::UnitsPressure, Value >::unit_type unit) const
 Convert quantity to another unit. More...
 

Detailed Description

template<typename Value>
struct ome::xml::model::primitives::QuantityConverter< ome::xml::model::enums::UnitsPressure, Value >

Convert a quantity to a different unit.

Helper to work around the lack of partial function template specialization. You shouldn't need to use this directly; use the plain convert() function instead.

Member Function Documentation

◆ operator()()

template<typename Value >
Quantity<ome::xml::model::enums::UnitsPressure, Value> ome::xml::model::primitives::QuantityConverter< ome::xml::model::enums::UnitsPressure, Value >::operator() ( const Quantity< ome::xml::model::enums::UnitsPressure, Value > &  quantity,
typename Quantity< ome::xml::model::enums::UnitsPressure, Value >::unit_type  unit 
) const
inline

Convert quantity to another unit.

Parameters
quantitythe quantity to convert.
unitthe unit to which to convert the quantity.
Returns
the converted quantity.
Exceptions
std::logicerror if the unit systems are incompatible making conversion impossible.

References ome::xml::model::primitives::Quantity< Unit, Value >::getUnit().


The documentation for this struct was generated from the following file: