src/model/OutputMeter_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_OUTPUTMETER_IMPL_HPP | ||
| 7 | #define MODEL_OUTPUTMETER_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ModelObject_Impl.hpp" | ||
| 11 | #include "OutputMeter.hpp" | ||
| 12 | |||
| 13 | namespace openstudio { | ||
| 14 | |||
| 15 | class EndUseType; | ||
| 16 | class FuelType; | ||
| 17 | class InstallLocationType; | ||
| 18 | class TimeSeries; | ||
| 19 | |||
| 20 | namespace model { | ||
| 21 | |||
| 22 | class OutputMeter; | ||
| 23 | |||
| 24 | namespace detail { | ||
| 25 | |||
| 26 | /** OutputMeter_Impl is a ModelObject_Impl that is the implementation class for OutputMeter.*/ | ||
| 27 | class MODEL_API OutputMeter_Impl : public ModelObject_Impl | ||
| 28 | { | ||
| 29 | |||
| 30 | public: | ||
| 31 | /** @name Constructors and Destructors */ | ||
| 32 | //@{ | ||
| 33 | |||
| 34 | OutputMeter_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 35 | |||
| 36 | OutputMeter_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 37 | |||
| 38 | OutputMeter_Impl(const OutputMeter_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 39 | |||
| 40 | 3875 | virtual ~OutputMeter_Impl() override = default; | |
| 41 | |||
| 42 | //@} | ||
| 43 | |||
| 44 | virtual boost::optional<ParentObject> parent() const override; | ||
| 45 | |||
| 46 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 47 | |||
| 48 | virtual IddObjectType iddObjectType() const override; | ||
| 49 | |||
| 50 | virtual std::vector<openstudio::IdfObject> remove() override; | ||
| 51 | |||
| 52 | /** @name Getters */ | ||
| 53 | //@{ | ||
| 54 | |||
| 55 | std::string name() const; | ||
| 56 | |||
| 57 | std::string reportingFrequency() const; | ||
| 58 | |||
| 59 | bool isReportingFrequencyDefaulted() const; | ||
| 60 | |||
| 61 | bool meterFileOnly() const; | ||
| 62 | |||
| 63 | bool isMeterFileOnlyDefaulted() const; | ||
| 64 | |||
| 65 | bool cumulative() const; | ||
| 66 | |||
| 67 | bool isCumulativeDefaulted() const; | ||
| 68 | |||
| 69 | /// get user provided specific end use category to meter | ||
| 70 | boost::optional<std::string> specificEndUse() const; | ||
| 71 | |||
| 72 | /// get end use type | ||
| 73 | boost::optional<EndUseType> endUseType() const; | ||
| 74 | |||
| 75 | /// get fuel type | ||
| 76 | boost::optional<FuelType> fuelType() const; | ||
| 77 | |||
| 78 | /// get the location type the meter is installed at | ||
| 79 | boost::optional<InstallLocationType> installLocationType() const; | ||
| 80 | |||
| 81 | /// get the specific location the meter is installed at | ||
| 82 | boost::optional<std::string> specificInstallLocation() const; | ||
| 83 | |||
| 84 | //@} | ||
| 85 | /** @name Setters */ | ||
| 86 | //@{ | ||
| 87 | |||
| 88 | bool setReportingFrequency(const std::string& reportingFrequency); | ||
| 89 | |||
| 90 | void resetReportingFrequency(); | ||
| 91 | |||
| 92 | bool setMeterFileOnly(bool meterFileOnly); | ||
| 93 | |||
| 94 | void resetMeterFileOnly(); | ||
| 95 | |||
| 96 | bool setCumulative(bool cumulative); | ||
| 97 | |||
| 98 | void resetCumulative(); | ||
| 99 | |||
| 100 | /// set user provided specific end use category to meter, empty string will unset the value | ||
| 101 | bool setSpecificEndUse(const std::string& endUse); | ||
| 102 | bool resetSpecificEndUse(); | ||
| 103 | |||
| 104 | /// set end use type | ||
| 105 | bool setEndUseType(EndUseType type); | ||
| 106 | bool resetEndUseType(); | ||
| 107 | |||
| 108 | /// set fuel type | ||
| 109 | bool setFuelType(FuelType type); | ||
| 110 | bool resetFuelType(); | ||
| 111 | |||
| 112 | /// set the location type the meter is installed at | ||
| 113 | bool setInstallLocationType(InstallLocationType type); | ||
| 114 | bool resetInstallLocationType(); | ||
| 115 | |||
| 116 | /// set the specific location the meter is installed at, empty string will unset the value | ||
| 117 | bool setSpecificInstallLocation(const std::string& locationName); | ||
| 118 | bool resetSpecificInstallLocation(); | ||
| 119 | |||
| 120 | //@} | ||
| 121 | |||
| 122 | /// get data for the meter | ||
| 123 | boost::optional<openstudio::TimeSeries> getData(const std::string& envPeriod) const; | ||
| 124 | |||
| 125 | /// get data for the meter, using given specificInstallLocation instead of this->specificInstallLocation (e.g. '*') | ||
| 126 | boost::optional<openstudio::TimeSeries> getData(const std::string& envPeriod, | ||
| 127 | const boost::optional<std::string>& specificInstallLocation) const; | ||
| 128 | |||
| 129 | protected: | ||
| 130 | private: | ||
| 131 | − | REGISTER_LOGGER("openstudio.model.OutputMeter"); | |
| 132 | }; | ||
| 133 | |||
| 134 | } // namespace detail | ||
| 135 | |||
| 136 | } // namespace model | ||
| 137 | } // namespace openstudio | ||
| 138 | |||
| 139 | #endif // MODEL_OUTPUTMETER_IMPL_HPP | ||
| 140 |