src/model/ComfortViewFactorAngles.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_COMFORTVIEWFACTORANGLES_HPP | ||
| 7 | #define MODEL_COMFORTVIEWFACTORANGLES_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ModelObject.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | namespace detail { | ||
| 16 | class ComfortViewFactorAngles_Impl; | ||
| 17 | } | ||
| 18 | |||
| 19 | class MODEL_API AngleFactor | ||
| 20 | { | ||
| 21 | public: | ||
| 22 | AngleFactor(const ModelObject& surface, double angleFactor); | ||
| 23 | |||
| 24 | ModelObject surface() const; | ||
| 25 | double angleFactor() const; | ||
| 26 | |||
| 27 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
4 | bool operator==(const AngleFactor& other) const = default; |
| 28 | bool operator!=(const AngleFactor& other) const; | ||
| 29 | |||
| 30 | private: | ||
| 31 | 2 | ModelObject m_surface; | |
| 32 |
2/2✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
|
2 | double m_angleFactor; |
| 33 | − | REGISTER_LOGGER("openstudio.model.AngleFactor"); | |
| 34 | }; | ||
| 35 | |||
| 36 | /** \relates AngleFactor */ | ||
| 37 | MODEL_API std::ostream& operator<<(std::ostream& out, const openstudio::model::AngleFactor& angleFactor); | ||
| 38 | |||
| 39 | class MODEL_API ComfortViewFactorAngles : public ModelObject | ||
| 40 | { | ||
| 41 | public: | ||
| 42 | explicit ComfortViewFactorAngles(const Model& model); | ||
| 43 | |||
| 44 | 58 | virtual ~ComfortViewFactorAngles() override = default; | |
| 45 | |||
| 46 | static IddObjectType iddObjectType(); | ||
| 47 | |||
| 48 | std::vector<AngleFactor> angleFactors() const; | ||
| 49 | unsigned int numberofAngleFactors() const; | ||
| 50 | boost::optional<unsigned> angleFactorIndex(const ModelObject& surface) const; | ||
| 51 | boost::optional<AngleFactor> getAngleFactor(unsigned groupIndex) const; | ||
| 52 | |||
| 53 | bool addAngleFactor(const AngleFactor& angleFactor); | ||
| 54 | bool addAngleFactor(const ModelObject& surface, double angleFactor); | ||
| 55 | bool addAngleFactors(const std::vector<AngleFactor>& angleFactors); | ||
| 56 | void removeAngleFactor(int groupIndex); | ||
| 57 | void removeAllAngleFactors(); | ||
| 58 | |||
| 59 | protected: | ||
| 60 | using ImplType = detail::ComfortViewFactorAngles_Impl; | ||
| 61 | |||
| 62 | explicit ComfortViewFactorAngles(std::shared_ptr<detail::ComfortViewFactorAngles_Impl> impl); | ||
| 63 | |||
| 64 | friend class detail::ComfortViewFactorAngles_Impl; | ||
| 65 | friend class Model; | ||
| 66 | friend class IdfObject; | ||
| 67 | friend class openstudio::detail::IdfObject_Impl; | ||
| 68 | |||
| 69 | private: | ||
| 70 | REGISTER_LOGGER("openstudio.model.ComfortViewFactorAngles"); | ||
| 71 | }; | ||
| 72 | |||
| 73 | using OptionalComfortViewFactorAngles = boost::optional<ComfortViewFactorAngles>; | ||
| 74 | using ComfortViewFactorAnglesVector = std::vector<ComfortViewFactorAngles>; | ||
| 75 | |||
| 76 | } // namespace model | ||
| 77 | } // namespace openstudio | ||
| 78 | |||
| 79 | #endif // MODEL_COMFORTVIEWFACTORANGLES_HPP | ||
| 80 |