src/model/ClimateZones_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 MODEL_CLIMATEZONES_IMPL_HPP | ||
| 7 | #define MODEL_CLIMATEZONES_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ModelObject_Impl.hpp" | ||
| 10 | |||
| 11 | namespace openstudio { | ||
| 12 | namespace model { | ||
| 13 | |||
| 14 | class Site; | ||
| 15 | class ClimateZone; | ||
| 16 | |||
| 17 | namespace detail { | ||
| 18 | |||
| 19 | class MODEL_API ClimateZones_Impl : public ModelObject_Impl | ||
| 20 | { | ||
| 21 | public: | ||
| 22 | /** @name Constructors and Destructors */ | ||
| 23 | //@{ | ||
| 24 | |||
| 25 | ClimateZones_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 26 | |||
| 27 | // construct from workspace | ||
| 28 | ClimateZones_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 29 | |||
| 30 | // clone copy constructor | ||
| 31 | ClimateZones_Impl(const ClimateZones_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 32 | |||
| 33 | // virtual destructor | ||
| 34 | 119 | virtual ~ClimateZones_Impl() override = default; | |
| 35 | |||
| 36 | //@} | ||
| 37 | /** @name Getters */ | ||
| 38 | //@{ | ||
| 39 | |||
| 40 | /** Site parents the unique ClimateZones object. */ | ||
| 41 | boost::optional<Site> site() const; | ||
| 42 | |||
| 43 | std::vector<ClimateZone> climateZones() const; | ||
| 44 | |||
| 45 | ClimateZone getClimateZone(unsigned index) const; | ||
| 46 | |||
| 47 | ClimateZone getClimateZone(const std::string& institution, unsigned year) const; | ||
| 48 | |||
| 49 | std::vector<ClimateZone> getClimateZones(const std::string& institution) const; | ||
| 50 | |||
| 51 | // return the parent object in the hierarchy | ||
| 52 | virtual boost::optional<ParentObject> parent() const override; | ||
| 53 | |||
| 54 | // Get all output variable names that could be associated with this object. | ||
| 55 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 56 | |||
| 57 | virtual IddObjectType iddObjectType() const override; | ||
| 58 | |||
| 59 | //@} | ||
| 60 | /** @name Setters */ | ||
| 61 | //@{ | ||
| 62 | |||
| 63 | bool clear(); | ||
| 64 | |||
| 65 | ClimateZone setClimateZone(const std::string& institution, const std::string& value); | ||
| 66 | |||
| 67 | ClimateZone setClimateZone(const std::string& institution, unsigned year, const std::string& value); | ||
| 68 | |||
| 69 | ClimateZone appendClimateZone(const std::string& institution); | ||
| 70 | |||
| 71 | ClimateZone appendClimateZone(const std::string& institution, const std::string& value); | ||
| 72 | |||
| 73 | ClimateZone appendClimateZone(const std::string& institution, unsigned year, const std::string& value); | ||
| 74 | |||
| 75 | ClimateZone appendClimateZone(const std::string& institution, const std::string documentName, unsigned year, const std::string& value); | ||
| 76 | |||
| 77 | // set the parent, child may have to call methods on the parent | ||
| 78 | virtual bool setParent(ParentObject& newParent) override; | ||
| 79 | |||
| 80 | //@} | ||
| 81 | /** @name Queries */ | ||
| 82 | //@{ | ||
| 83 | |||
| 84 | unsigned numClimateZones() const; | ||
| 85 | |||
| 86 | //@} | ||
| 87 | private: | ||
| 88 | − | REGISTER_LOGGER("openstudio.model.ClimateZones"); | |
| 89 | }; | ||
| 90 | |||
| 91 | } // namespace detail | ||
| 92 | |||
| 93 | } // namespace model | ||
| 94 | } // namespace openstudio | ||
| 95 | |||
| 96 | #endif // MODEL_CLIMATEZONES_IMPL_HPP | ||
| 97 |