src/model/ParentObject_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_PARENTOBJECT_IMPL_HPP | ||
| 7 | #define MODEL_PARENTOBJECT_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ModelObject_Impl.hpp" | ||
| 10 | |||
| 11 | namespace openstudio { | ||
| 12 | namespace model { | ||
| 13 | |||
| 14 | namespace detail { | ||
| 15 | |||
| 16 | class MODEL_API ParentObject_Impl : public ModelObject_Impl | ||
| 17 | { | ||
| 18 | public: | ||
| 19 | // constructor | ||
| 20 | ParentObject_Impl(IddObjectType type, Model_Impl* model); | ||
| 21 | |||
| 22 | // constructor | ||
| 23 | ParentObject_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 24 | |||
| 25 | // construct from workspace | ||
| 26 | ParentObject_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 27 | |||
| 28 | // clone copy constructor | ||
| 29 | ParentObject_Impl(const ParentObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 30 | |||
| 31 | 280239 | virtual ~ParentObject_Impl() override = default; | |
| 32 | |||
| 33 | /// return direct child objects in the hierarchy | ||
| 34 | virtual std::vector<ModelObject> children() const; | ||
| 35 | |||
| 36 | /// remove the object from the model's workspace, as well as recursive children (unless they are ResourceObjects and are used somewhere else) | ||
| 37 | /// return a new workspace containing any removed object(s) | ||
| 38 | virtual std::vector<openstudio::IdfObject> remove() override; | ||
| 39 | |||
| 40 | /// get a vector of allowable children types | ||
| 41 | virtual std::vector<IddObjectType> allowableChildTypes() const; | ||
| 42 | |||
| 43 | virtual ModelObject clone(Model model) const override; | ||
| 44 | |||
| 45 | private: | ||
| 46 | REGISTER_LOGGER("openstudio.model.ParentObject"); | ||
| 47 | }; | ||
| 48 | |||
| 49 | } // namespace detail | ||
| 50 | |||
| 51 | } // namespace model | ||
| 52 | } // namespace openstudio | ||
| 53 | |||
| 54 | #endif // MODEL_PARENTOBJECT_IMPL_HPP | ||
| 55 |