src/utilities/units/FahrenheitUnit_Impl.hpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #ifndef UTILITIES_UNITS_FAHRENHEITUNIT_IMPL_HPP | ||
| 7 | #define UTILITIES_UNITS_FAHRENHEITUNIT_IMPL_HPP | ||
| 8 | |||
| 9 | #include "../UtilitiesAPI.hpp" | ||
| 10 | #include "TemperatureUnit_Impl.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace detail { | ||
| 14 | |||
| 15 | /** FahrenheitUnit_Impl is a TemperatureUnit_Impl that is the implementation class for | ||
| 16 | * FahrenheitUnit.*/ | ||
| 17 | class UTILITIES_API FahrenheitUnit_Impl : public TemperatureUnit_Impl | ||
| 18 | { | ||
| 19 | public: | ||
| 20 | /** @name Constructors and Destructors */ | ||
| 21 | //@{ | ||
| 22 | |||
| 23 | /** Default constructor creates an absolute temperature. | ||
| 24 | * | ||
| 25 | * \param[in] FExp exponent on baseUnit F. | ||
| 26 | * \param[in] scaleExponent exponent for scale. For instance 3 for kilo. | ||
| 27 | * \param[in] prettyString optional string to use in place of standardString. */ | ||
| 28 | FahrenheitUnit_Impl(int FExp = 0, int scaleExponent = 0, const std::string& prettyString = ""); | ||
| 29 | |||
| 30 | /** Alternate constructor creates an absolute temperature. Specify the abbreviation of the scale, | ||
| 31 | * rather than its exponent. | ||
| 32 | * | ||
| 33 | * \param[in] scaleAbbreviation is string equal to a scale abbreviation. For instance | ||
| 34 | * "k" for kilo. | ||
| 35 | * \param[in] FExp exponent on baseUnit F. | ||
| 36 | * \param[in] prettyString optional string to use in place of standardString. */ | ||
| 37 | FahrenheitUnit_Impl(const std::string& scaleAbbreviation, int FExp = 0, const std::string& prettyString = ""); | ||
| 38 | |||
| 39 | 960 | virtual ~FahrenheitUnit_Impl() override = default; | |
| 40 | |||
| 41 | /** Deep copy constructor. */ | ||
| 42 | virtual Unit clone() const override; | ||
| 43 | |||
| 44 | //@} | ||
| 45 | /** @name Base Units and Scale */ | ||
| 46 | //@{ | ||
| 47 | |||
| 48 | /** Throws if baseUnit is not a valid for FahrenheitUnit. */ | ||
| 49 | virtual void setBaseUnitExponent(const std::string& baseUnit, int exponent) override; | ||
| 50 | |||
| 51 | //@} | ||
| 52 | protected: | ||
| 53 | private: | ||
| 54 | − | REGISTER_LOGGER("openstudio.units.FahrenheitUnit"); | |
| 55 | }; | ||
| 56 | |||
| 57 | } // namespace detail | ||
| 58 | |||
| 59 | } // namespace openstudio | ||
| 60 | |||
| 61 | #endif // UTILITIES_UNITS_FAHRENHEITUNIT_IMPL_HPP | ||
| 62 |