OpenStudio:utilities
 AllClasses Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages

#include "CelsiusUnit.hpp"

Inheritance diagram for openstudio::CelsiusUnit:

Public Member Functions

 CelsiusUnit (int CExp=0, int scaleExponent=0, const std::string &prettyString="")
 CelsiusUnit (const std::string &scaleAbbreviation, int CExp=0, const std::string &prettyString="")
virtual ~CelsiusUnit ()

Related Functions

typedef std::vector< CelsiusUnitCelsiusUnitVector
typedef boost::optional
< CelsiusUnit
OptionalCelsiusUnit
CelsiusUnit createCelsiusTemperature ()

Detailed Description

CelsiusUnit is a TemperatureUnit that supports absolute temperatures in degrees Celsius.

Kelvin and Celsius are the same in situations of relative temperature, that is, when it is the difference in temperatures that matter, rather than the absolute value. This is normally the case when the temperature base unit shows up in combination with other units, and that is not the situation being addressed here. This class is for reporting actual temperatures in degrees Celsius. Printing out K's as C's in the former situation is a feature that may be added to this library at a later date.

Constructor & Destructor Documentation

openstudio::CelsiusUnit::CelsiusUnit ( int  CExp = 0,
int  scaleExponent = 0,
const std::string &  prettyString = "" 
)

Default constructor creates an absolute temperature.

Parameters
[in]CExpexponent on baseUnit C.
[in]scaleExponentexponent for scale. For instance 3 for kilo.
[in]prettyStringoptional string to use in place of standardString.
openstudio::CelsiusUnit::CelsiusUnit ( const std::string &  scaleAbbreviation,
int  CExp = 0,
const std::string &  prettyString = "" 
)

Alternate constructor creates an absolute temperature.

Specify the abbreviation of the scale, rather than its exponent.

Parameters
[in]scaleAbbreviationis string equal to a scale abbreviation. For instance "k" for kilo.
[in]CExpexponent on baseUnit C.
[in]prettyStringoptional string to use in place of standardString.
virtual openstudio::CelsiusUnit::~CelsiusUnit ( )
inlinevirtual

Friends And Related Function Documentation

typedef std::vector<CelsiusUnit> CelsiusUnitVector
related
CelsiusUnit createCelsiusTemperature ( )
related
typedef boost::optional<CelsiusUnit> OptionalCelsiusUnit
related