#include <QuantityFactory.hpp>
Public Member Functions | |
boost::optional< Quantity > | createQuantity (const std::string &quantityString) const |
Parses quantity string to separate the value from the unit. More... | |
boost::optional< Quantity > | createQuantity (const std::string &quantityString, UnitSystem system) const |
Parses quantity string to separate the value from the unit. More... | |
boost::optional< Quantity > | createQuantity (double value, const std::string &unitString) const |
Creates a quantity from value and unitString, which is passed to UnitFactory. More... | |
boost::optional< Quantity > | createQuantity (double value, const std::string &unitString, UnitSystem system) const |
Creates a quantity from value and unitString, which is passed to UnitFactory. More... | |
boost::optional<Quantity> openstudio::QuantityFactorySingleton::createQuantity | ( | const std::string & | quantityString | ) | const |
Parses quantity string to separate the value from the unit.
Then creates the quantity with the help of UnitFactory. Uses openstudio::getSystem to intuit the appropriate system, if possible.
boost::optional<Quantity> openstudio::QuantityFactorySingleton::createQuantity | ( | const std::string & | quantityString, |
UnitSystem | system | ||
) | const |
Parses quantity string to separate the value from the unit.
Then creates the quantity with the help of UnitFactory. system specifies the preferred unit system–it does not guarantee that the returned result will be in that system.
boost::optional<Quantity> openstudio::QuantityFactorySingleton::createQuantity | ( | double | value, |
const std::string & | unitString | ||
) | const |
Creates a quantity from value and unitString, which is passed to UnitFactory.
Uses openstudio::getSystem to intuit the appropriate system, if possible.
boost::optional<Quantity> openstudio::QuantityFactorySingleton::createQuantity | ( | double | value, |
const std::string & | unitString, | ||
UnitSystem | system | ||
) | const |
Creates a quantity from value and unitString, which is passed to UnitFactory.
system specifies the preferred unit system–it does not guarantee that the returned result will be in that system.