GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 1 / 1 / 2
Functions: 100.0% 1 / 1 / 2
Branches: -% 0 / 1 / 1

src/utilities/units/CelsiusUnit_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_CELSIUSUNIT_IMPL_HPP
7 #define UTILITIES_UNITS_CELSIUSUNIT_IMPL_HPP
8
9 #include "../UtilitiesAPI.hpp"
10 #include "TemperatureUnit_Impl.hpp"
11
12 namespace openstudio {
13 namespace detail {
14
15 /** CelsiusUnit_Impl is a TemperatureUnit_Impl that is the implementation class for CelsiusUnit.*/
16 class UTILITIES_API CelsiusUnit_Impl : public TemperatureUnit_Impl
17 {
18 public:
19 /** @name Constructors and Destructors */
20 //@{
21
22 /** Default constructor creates an absolute temperature.
23 *
24 * \param[in] CExp exponent on baseUnit C.
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 CelsiusUnit_Impl(int CExp = 0, int scaleExponent = 0, const std::string& prettyString = "");
28
29 /** Alternate constructor creates an absolute temperature. Specify the abbreviation of the scale,
30 * rather than its exponent.
31 *
32 * \param[in] scaleAbbreviation is string equal to a scale abbreviation. For instance
33 * "k" for kilo.
34 * \param[in] CExp exponent on baseUnit C.
35 * \param[in] prettyString optional string to use in place of standardString. */
36 CelsiusUnit_Impl(const std::string& scaleAbbreviation, int CExp = 0, const std::string& prettyString = "");
37
38 6672 virtual ~CelsiusUnit_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 CelsiusUnit. */
48 virtual void setBaseUnitExponent(const std::string& baseUnit, int exponent) override;
49
50 //@}
51 protected:
52 private:
53 − REGISTER_LOGGER("openstudio.units.CelsiusUnit");
54 };
55
56 } // namespace detail
57
58 } // namespace openstudio
59
60 #endif // UTILITIES_UNITS_CELSIUSUNIT_IMPL_HPP
61