OpenStudio:utilities
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Related Functions | List of all members
openstudio::QuantityConverterSingleton Class Reference

#include <QuantityConverter.hpp>

Public Member Functions

boost::optional< Quantityconvert (const Quantity &q, UnitSystem sys) const
 
boost::optional< Quantityconvert (const Quantity &original, const Unit &targetUnits) const
 

Related Functions

(Note that these are not member functions.)

boost::optional< double > convert (double original, const std::string &originalUnits, const std::string &finalUnits)
 Non-member function to simplify interface for users. More...
 
boost::optional< Quantityconvert (const Quantity &original, UnitSystem sys)
 Non-member function to simplify interface for users. More...
 
boost::optional< Quantityconvert (const Quantity &original, const Unit &targetUnits)
 Non-member function to simplify interface for users. More...
 
using QuantityConverter = openstudio::Singleton< QuantityConverterSingleton >
 

Detailed Description

Singleton for converting quantities to different unit systems or to targeted units .

Member Function Documentation

boost::optional<Quantity> openstudio::QuantityConverterSingleton::convert ( const Quantity q,
UnitSystem  sys 
) const
boost::optional<Quantity> openstudio::QuantityConverterSingleton::convert ( const Quantity original,
const Unit targetUnits 
) const

Friends And Related Function Documentation

boost::optional< double > convert ( double  original,
const std::string &  originalUnits,
const std::string &  finalUnits 
)
related

Non-member function to simplify interface for users.

boost::optional< Quantity > convert ( const Quantity original,
UnitSystem  sys 
)
related

Non-member function to simplify interface for users.

boost::optional< Quantity > convert ( const Quantity original,
const Unit targetUnits 
)
related

Non-member function to simplify interface for users.