src/model/OutputTableSummaryReports.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_OUTPUTTABLESUMMARYREPORTS_HPP | ||
| 7 | #define MODEL_OUTPUTTABLESUMMARYREPORTS_HPP | ||
| 8 | |||
| 9 | #include <vector> | ||
| 10 | #include "ModelAPI.hpp" | ||
| 11 | #include "ModelObject.hpp" | ||
| 12 | |||
| 13 | namespace openstudio { | ||
| 14 | namespace model { | ||
| 15 | |||
| 16 | namespace detail { | ||
| 17 | |||
| 18 | class OutputTableSummaryReports_Impl; | ||
| 19 | |||
| 20 | } // namespace detail | ||
| 21 | |||
| 22 | /** OutputTableSummaryReports is a ModelObject that wraps the OpenStudio IDD object 'OS:Output:Table:SummaryReports'. */ | ||
| 23 | class MODEL_API OutputTableSummaryReports : public ModelObject | ||
| 24 | { | ||
| 25 | public: | ||
| 26 | /** @name Constructors and Destructors */ | ||
| 27 | //@{ | ||
| 28 | |||
| 29 | 1779 | virtual ~OutputTableSummaryReports() override = default; | |
| 30 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 31 | 3 | OutputTableSummaryReports(const OutputTableSummaryReports& other) = default; | |
| 32 | 9 | OutputTableSummaryReports(OutputTableSummaryReports&& other) = default; | |
| 33 | ✗ | OutputTableSummaryReports& operator=(const OutputTableSummaryReports&) = default; | |
| 34 | ✗ | OutputTableSummaryReports& operator=(OutputTableSummaryReports&&) = default; | |
| 35 | |||
| 36 | //@} | ||
| 37 | |||
| 38 | static IddObjectType iddObjectType(); | ||
| 39 | |||
| 40 | static std::vector<std::string> summaryReportValues(); | ||
| 41 | static std::vector<std::string> validSummaryReportValues(); | ||
| 42 | |||
| 43 | /** @name Getters */ | ||
| 44 | //@{ | ||
| 45 | |||
| 46 | std::vector<std::string> summaryReports() const; | ||
| 47 | |||
| 48 | unsigned int numberofSummaryReports() const; | ||
| 49 | |||
| 50 | /** If a summaryReport group is already present (cf `summaryReportIndex()`), it will Warn */ | ||
| 51 | boost::optional<unsigned> summaryReportIndex(const std::string& summaryReport) const; | ||
| 52 | |||
| 53 | boost::optional<std::string> getSummaryReport(unsigned groupIndex) const; | ||
| 54 | |||
| 55 | //@} | ||
| 56 | /** @name Setters */ | ||
| 57 | //@{ | ||
| 58 | |||
| 59 | bool addSummaryReport(const std::string& summaryReport); | ||
| 60 | |||
| 61 | bool addSummaryReports(const std::vector<std::string>& summaryReports); | ||
| 62 | |||
| 63 | bool removeSummaryReport(int groupIndex); | ||
| 64 | |||
| 65 | void removeAllSummaryReports(); | ||
| 66 | |||
| 67 | // Just a convenience function to **add** 'AllSummary' as a Report Name since it's so common | ||
| 68 | bool enableAllSummaryReport(); | ||
| 69 | |||
| 70 | //@} | ||
| 71 | /** @name Other */ | ||
| 72 | //@{ | ||
| 73 | |||
| 74 | //@} | ||
| 75 | protected: | ||
| 76 | explicit OutputTableSummaryReports(Model& model); | ||
| 77 | |||
| 78 | /// @cond | ||
| 79 | using ImplType = detail::OutputTableSummaryReports_Impl; | ||
| 80 | |||
| 81 | friend class Model; | ||
| 82 | friend class openstudio::IdfObject; | ||
| 83 | friend class detail::OutputTableSummaryReports_Impl; | ||
| 84 | |||
| 85 | explicit OutputTableSummaryReports(std::shared_ptr<detail::OutputTableSummaryReports_Impl> impl); | ||
| 86 | |||
| 87 | /// @endcond | ||
| 88 | private: | ||
| 89 | REGISTER_LOGGER("openstudio.model.OutputTableSummaryReports"); | ||
| 90 | }; | ||
| 91 | |||
| 92 | /** \relates OutputTableSummaryReports*/ | ||
| 93 | using OptionalOutputTableSummaryReports = boost::optional<OutputTableSummaryReports>; | ||
| 94 | |||
| 95 | /** \relates OutputTableSummaryReports*/ | ||
| 96 | using OutputTableSummaryReportsVector = std::vector<OutputTableSummaryReports>; | ||
| 97 | |||
| 98 | } // namespace model | ||
| 99 | } // namespace openstudio | ||
| 100 | |||
| 101 | #endif // MODEL_OUTPUTTABLESUMMARYREPORTS_HPP | ||
| 102 |