src/model/BuildingUnit.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_BUILDINGUNIT_HPP | ||
| 7 | #define MODEL_BUILDINGUNIT_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ModelObject.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | namespace model { | ||
| 15 | |||
| 16 | class Space; | ||
| 17 | class RenderingColor; | ||
| 18 | |||
| 19 | namespace detail { | ||
| 20 | |||
| 21 | class BuildingUnit_Impl; | ||
| 22 | |||
| 23 | } // namespace detail | ||
| 24 | |||
| 25 | class MODEL_API BuildingUnit : public ModelObject | ||
| 26 | { | ||
| 27 | public: | ||
| 28 | /** @name Constructors and Destructors */ | ||
| 29 | //@{ | ||
| 30 | |||
| 31 | explicit BuildingUnit(const Model& model); | ||
| 32 | |||
| 33 | 1478 | virtual ~BuildingUnit() override = default; | |
| 34 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 35 | 385 | BuildingUnit(const BuildingUnit& other) = default; | |
| 36 | 673 | BuildingUnit(BuildingUnit&& other) = default; | |
| 37 | ✗ | BuildingUnit& operator=(const BuildingUnit&) = default; | |
| 38 | ✗ | BuildingUnit& operator=(BuildingUnit&&) = default; | |
| 39 | |||
| 40 | //@} | ||
| 41 | |||
| 42 | /** @name Static Methods */ | ||
| 43 | //@{ | ||
| 44 | |||
| 45 | // List the possible values for building unit type | ||
| 46 | static std::vector<std::string> buildingUnitTypeValues(); | ||
| 47 | |||
| 48 | //@} | ||
| 49 | |||
| 50 | static IddObjectType iddObjectType(); | ||
| 51 | |||
| 52 | /** @name Getters */ | ||
| 53 | //@{ | ||
| 54 | |||
| 55 | // Gets the rendering color | ||
| 56 | boost::optional<RenderingColor> renderingColor() const; | ||
| 57 | |||
| 58 | // Gets the building unit type | ||
| 59 | std::string buildingUnitType() const; | ||
| 60 | |||
| 61 | std::vector<Space> spaces() const; | ||
| 62 | |||
| 63 | /// \deprecated { This method is deprecated, use additionalProperties instead } | ||
| 64 | std::vector<std::string> featureNames() const; | ||
| 65 | |||
| 66 | /// \deprecated { This method is deprecated, use additionalProperties instead } | ||
| 67 | boost::optional<std::string> getFeatureDataType(const std::string& name) const; | ||
| 68 | |||
| 69 | /// \deprecated { This method is deprecated, use additionalProperties instead } | ||
| 70 | boost::optional<std::string> getFeatureAsString(const std::string& name) const; | ||
| 71 | |||
| 72 | /// \deprecated { This method is deprecated, use additionalProperties instead } | ||
| 73 | boost::optional<double> getFeatureAsDouble(const std::string& name) const; | ||
| 74 | |||
| 75 | /// \deprecated { This method is deprecated, use additionalProperties instead } | ||
| 76 | boost::optional<int> getFeatureAsInteger(const std::string& name) const; | ||
| 77 | |||
| 78 | /// \deprecated { This method is deprecated, use additionalProperties instead } | ||
| 79 | boost::optional<bool> getFeatureAsBoolean(const std::string& name) const; | ||
| 80 | |||
| 81 | /// \deprecated { This method is deprecated, use additionalProperties instead } | ||
| 82 | std::vector<std::string> suggestedFeatures() const; | ||
| 83 | |||
| 84 | double floorArea() const; | ||
| 85 | |||
| 86 | //@} | ||
| 87 | /** @name Setters */ | ||
| 88 | //@{ | ||
| 89 | |||
| 90 | bool setRenderingColor(const RenderingColor& renderingColor); | ||
| 91 | |||
| 92 | void resetRenderingColor(); | ||
| 93 | |||
| 94 | bool setBuildingUnitType(const std::string& buildingUnitType); | ||
| 95 | |||
| 96 | void resetBuildingUnitType(); | ||
| 97 | |||
| 98 | /// \deprecated { This method is deprecated, use additionalProperties instead } | ||
| 99 | bool setFeature(const std::string& name, const std::string& value); | ||
| 100 | |||
| 101 | /// \deprecated { This method is deprecated, use additionalProperties instead } | ||
| 102 | bool setFeature(const std::string& name, const char* value); | ||
| 103 | |||
| 104 | /// \deprecated { This method is deprecated, use additionalProperties instead } | ||
| 105 | bool setFeature(const std::string& name, double value); | ||
| 106 | |||
| 107 | /// \deprecated { This method is deprecated, use additionalProperties instead } | ||
| 108 | bool setFeature(const std::string& name, int value); | ||
| 109 | |||
| 110 | /// \deprecated { This method is deprecated, use additionalProperties instead } | ||
| 111 | bool setFeature(const std::string& name, bool value); | ||
| 112 | |||
| 113 | /// \deprecated { This method is deprecated, use additionalProperties instead } | ||
| 114 | bool resetFeature(const std::string& name); | ||
| 115 | |||
| 116 | //@} | ||
| 117 | |||
| 118 | protected: | ||
| 119 | /// @cond | ||
| 120 | |||
| 121 | using ImplType = detail::BuildingUnit_Impl; | ||
| 122 | |||
| 123 | friend class Model; | ||
| 124 | friend class openstudio::IdfObject; | ||
| 125 | |||
| 126 | explicit BuildingUnit(std::shared_ptr<detail::BuildingUnit_Impl> impl); | ||
| 127 | |||
| 128 | /// @endcond | ||
| 129 | |||
| 130 | private: | ||
| 131 | REGISTER_LOGGER("openstudio.model.BuildingUnit") | ||
| 132 | }; | ||
| 133 | |||
| 134 | } // namespace model | ||
| 135 | |||
| 136 | } // namespace openstudio | ||
| 137 | |||
| 138 | #endif //MODEL_BUILDINGUNIT_HPP | ||
| 139 |