src/model/SpaceLoadDefinition_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_SPACELOADDEFINITION_IMPL_HPP | ||
| 7 | #define MODEL_SPACELOADDEFINITION_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ResourceObject_Impl.hpp" | ||
| 10 | |||
| 11 | namespace openstudio { | ||
| 12 | namespace model { | ||
| 13 | |||
| 14 | // forward declaration | ||
| 15 | class SpaceLoadInstance; | ||
| 16 | class SpaceLoadDefinition; | ||
| 17 | |||
| 18 | namespace detail { | ||
| 19 | |||
| 20 | class MODEL_API SpaceLoadDefinition_Impl : public ResourceObject_Impl | ||
| 21 | { | ||
| 22 | public: | ||
| 23 | // Construct completely new object. | ||
| 24 | SpaceLoadDefinition_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 25 | |||
| 26 | // Construct from existing workspace object (typically when Model is being constructed | ||
| 27 | // from Workspace). | ||
| 28 | SpaceLoadDefinition_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 29 | |||
| 30 | // Clone copy constructor. | ||
| 31 | SpaceLoadDefinition_Impl(const SpaceLoadDefinition_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 32 | |||
| 33 | 7527 | virtual ~SpaceLoadDefinition_Impl() override = default; | |
| 34 | |||
| 35 | /// Removes the definition and all instances. | ||
| 36 | virtual std::vector<openstudio::IdfObject> remove() override; | ||
| 37 | |||
| 38 | /// Returns all instances of this definition. | ||
| 39 | std::vector<SpaceLoadInstance> instances() const; | ||
| 40 | |||
| 41 | /** Returns the floor area associated with instances of this space load definition. | ||
| 42 | If two instances are in the same space then that floor area will be double counted. | ||
| 43 | If two instances used in the same space type then that floor area will be double counted. | ||
| 44 | Space and SpaceLoadInstance multipliers are included in the result. **/ | ||
| 45 | double floorArea() const; | ||
| 46 | |||
| 47 | /** Returns the number of instances of this space load. | ||
| 48 | Space and SpaceLoadInstance multipliers are included in the result **/ | ||
| 49 | int quantity() const; | ||
| 50 | |||
| 51 | private: | ||
| 52 | REGISTER_LOGGER("openstudio.model.SpaceLoadDefinition"); | ||
| 53 | }; | ||
| 54 | |||
| 55 | } // namespace detail | ||
| 56 | |||
| 57 | } // namespace model | ||
| 58 | } // namespace openstudio | ||
| 59 | |||
| 60 | #endif // MODEL_SPACELOADDEFINITION_IMPL_HPP | ||
| 61 |