src/utilities/units/Misc1Unit_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_MISC1UNIT_IMPL_HPP | ||
| 7 | #define UTILITIES_UNITS_MISC1UNIT_IMPL_HPP | ||
| 8 | |||
| 9 | #include "../UtilitiesAPI.hpp" | ||
| 10 | #include "Unit_Impl.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace detail { | ||
| 14 | |||
| 15 | /** Misc1Unit_Impl is a Unit_Impl that is the implementation class for Misc1Unit.*/ | ||
| 16 | class UTILITIES_API Misc1Unit_Impl : public Unit_Impl | ||
| 17 | { | ||
| 18 | public: | ||
| 19 | /** @name Constructors and Destructors */ | ||
| 20 | //@{ | ||
| 21 | |||
| 22 | /** Default constructor. | ||
| 23 | * | ||
| 24 | * \param[in] exponents holds the exponents for each base unit. | ||
| 25 | * \param[in] scaleExponent exponent for scale. For instance 3 for kilo. | ||
| 26 | * \param[in] prettyString optional string to use in place of standardString. */ | ||
| 27 | Misc1Unit_Impl(const Misc1Expnt& exponents = Misc1Expnt(), int scaleExponent = 0, const std::string& prettyString = ""); | ||
| 28 | |||
| 29 | /** Alternate constructor. Specify the abbreviation of the scale, rather than its | ||
| 30 | * exponent. | ||
| 31 | * | ||
| 32 | * \param[in] scaleAbbreviation is string equal to a scale abbreviation. For instance | ||
| 33 | * "k" for kilo. | ||
| 34 | * \param[in] exponents holds the exponents for each base unit. | ||
| 35 | * \param[in] prettyString optional string to use in place of standardString. */ | ||
| 36 | Misc1Unit_Impl(const std::string& scaleAbbreviation, const Misc1Expnt& exponents = Misc1Expnt(), const std::string& prettyString = ""); | ||
| 37 | |||
| 38 | 3188 | virtual ~Misc1Unit_Impl() override = default; | |
| 39 | |||
| 40 | /** Deep copy constructor. */ | ||
| 41 | virtual Unit clone() const override; | ||
| 42 | |||
| 43 | //@} | ||
| 44 | /** @name Base Units and Scale */ | ||
| 45 | //@{ | ||
| 46 | |||
| 47 | /** Throws if baseUnit is not a valid for Misc1Unit. */ | ||
| 48 | virtual void setBaseUnitExponent(const std::string& baseUnit, int exponent) override; | ||
| 49 | |||
| 50 | //@} | ||
| 51 | private: | ||
| 52 | − | REGISTER_LOGGER("openstudio.units.Misc1Unit"); | |
| 53 | }; | ||
| 54 | |||
| 55 | } // namespace detail | ||
| 56 | |||
| 57 | } // namespace openstudio | ||
| 58 | |||
| 59 | #endif // UTILITIES_UNITS_MISC1UNIT_IMPL_HPP | ||
| 60 |