GCC Code Coverage Report


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

src/model/LifeCycleCostUsePriceEscalation.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 MODEL_LIFECYCLECOSTUSEPRICEESCALATION_HPP
7 #define MODEL_LIFECYCLECOSTUSEPRICEESCALATION_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ParentObject.hpp"
11 #include "../utilities/core/Optional.hpp"
12
13 namespace openstudio {
14 namespace model {
15
16 namespace detail {
17 class LifeCycleCostUsePriceEscalation_Impl;
18 }
19
20 /** LifeCycleCostUsePriceEscalation derives from ParentObject and is an interface to the OpenStudio IDD object named "OS:LifeCycleCost:UsePriceEscalation".
21 *
22 * LifeCycleCostUsePriceEscalation specifies escalation about energy and water costs separately from general inflation assumptions.
23 */
24 class MODEL_API LifeCycleCostUsePriceEscalation : public ParentObject
25 {
26
27 public:
28 /** @name Constructors and Destructors */
29 //@{
30 1 virtual ~LifeCycleCostUsePriceEscalation() override = default;
31 // Default the copy and move operators because the virtual dtor is explicit
32 LifeCycleCostUsePriceEscalation(const LifeCycleCostUsePriceEscalation& other) = default;
33 LifeCycleCostUsePriceEscalation(LifeCycleCostUsePriceEscalation&& other) = default;
34 LifeCycleCostUsePriceEscalation& operator=(const LifeCycleCostUsePriceEscalation&) = default;
35 LifeCycleCostUsePriceEscalation& operator=(LifeCycleCostUsePriceEscalation&&) = default;
36
37 /// Constructs a new LifeCycleCostUsePriceEscalation object in the model.
38 explicit LifeCycleCostUsePriceEscalation(const Model& model);
39
40 //@}
41 /** @name Getters */
42 //@{
43
44 boost::optional<std::string> resource() const;
45
46 boost::optional<std::string> escalationStartMonth() const;
47
48 boost::optional<int> escalationStartYear() const;
49
50 /** Get the escalation for the year at index. Indexing starts at 0. */
51 boost::optional<double> yearEscalation(unsigned index) const;
52
53 //@}
54 /** @name Setters */
55 //@{
56
57 bool setResource(const std::string& str);
58
59 bool setEscalationStartMonth(const std::string& str);
60
61 /** Set the escalation for the year at index. Indexing starts at 0. */
62 bool setEscalationStartYear(int num);
63
64 bool setYearEscalation(unsigned index, double num);
65
66 //@}
67
68 /// Returns the IddObjectType.
69 static IddObjectType iddObjectType();
70
71 /// Returns the number of years for which escalation data is specified, e.g. the number of extensible fields.
72 unsigned numYears() const;
73
74 protected:
75 /// @cond
76
77 using ImplType = detail::LifeCycleCostUsePriceEscalation_Impl;
78
79 friend class Model;
80 friend class IdfObject;
81
82 // constructor
83 explicit LifeCycleCostUsePriceEscalation(std::shared_ptr<detail::LifeCycleCostUsePriceEscalation_Impl> impl);
84
85 private:
86 REGISTER_LOGGER("openstudio.model.LifeCycleCostUsePriceEscalation");
87
88 /// @endcond
89 };
90
91 /** \relates LifeCycleCostUsePriceEscalation */
92 using OptionalLifeCycleCostUsePriceEscalation = boost::optional<LifeCycleCostUsePriceEscalation>;
93
94 /** \relates LifeCycleCostUsePriceEscalation */
95 using LifeCycleCostUsePriceEscalationVector = std::vector<LifeCycleCostUsePriceEscalation>;
96
97 } // namespace model
98 } // namespace openstudio
99
100 #endif // MODEL_LIFECYCLECOSTUSEPRICEESCALATION_HPP
101