src/model/ScheduleFile_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_SCHEDULEFILE_IMPL_HPP | ||
| 7 | #define MODEL_SCHEDULEFILE_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ScheduleInterval_Impl.hpp" | ||
| 11 | #include "../utilities/filetypes/CSVFile.hpp" | ||
| 12 | |||
| 13 | namespace openstudio { | ||
| 14 | |||
| 15 | namespace model { | ||
| 16 | |||
| 17 | class ScheduleTypeLimits; | ||
| 18 | class ExternalFile; | ||
| 19 | |||
| 20 | namespace detail { | ||
| 21 | |||
| 22 | /** ScheduleFile_Impl is a ScheduleBase_Impl that is the implementation class for ScheduleFile.*/ | ||
| 23 | class MODEL_API ScheduleFile_Impl : public ScheduleInterval_Impl | ||
| 24 | { | ||
| 25 | public: | ||
| 26 | /** @name Constructors and Destructors */ | ||
| 27 | //@{ | ||
| 28 | |||
| 29 | ScheduleFile_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 30 | |||
| 31 | ScheduleFile_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 32 | |||
| 33 | ScheduleFile_Impl(const ScheduleFile_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 34 | |||
| 35 | 14 | virtual ~ScheduleFile_Impl() override = default; | |
| 36 | |||
| 37 | //@} | ||
| 38 | /** @name Virtual Methods */ | ||
| 39 | //@{ | ||
| 40 | |||
| 41 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 42 | |||
| 43 | virtual IddObjectType iddObjectType() const override; | ||
| 44 | |||
| 45 | virtual std::vector<ResourceObject> resources() const override; | ||
| 46 | |||
| 47 | // These are pure virtual methods that were defined in ScheduleBase_Impl | ||
| 48 | |||
| 49 | virtual boost::optional<ScheduleTypeLimits> scheduleTypeLimits() const override; | ||
| 50 | virtual bool setScheduleTypeLimits(const ScheduleTypeLimits& scheduleTypeLimits) override; | ||
| 51 | virtual bool resetScheduleTypeLimits() override; | ||
| 52 | |||
| 53 | //@} | ||
| 54 | /** @name Getters */ | ||
| 55 | //@{ | ||
| 56 | |||
| 57 | ExternalFile externalFile() const; | ||
| 58 | |||
| 59 | int columnNumber() const; | ||
| 60 | |||
| 61 | int rowstoSkipatTop() const; | ||
| 62 | |||
| 63 | int numberofHoursofData() const; | ||
| 64 | |||
| 65 | bool isNumberofHoursofDataDefaulted() const; | ||
| 66 | |||
| 67 | std::string columnSeparator() const; | ||
| 68 | |||
| 69 | char columnSeparatorChar() const; | ||
| 70 | |||
| 71 | bool isColumnSeparatorDefaulted() const; | ||
| 72 | |||
| 73 | bool interpolatetoTimestep() const; | ||
| 74 | |||
| 75 | bool isInterpolatetoTimestepDefaulted() const; | ||
| 76 | |||
| 77 | int minutesperItem() const; | ||
| 78 | |||
| 79 | bool isMinutesperItemDefaulted() const; | ||
| 80 | |||
| 81 | bool adjustScheduleforDaylightSavings() const; | ||
| 82 | |||
| 83 | bool isAdjustScheduleforDaylightSavingsDefaulted() const; | ||
| 84 | |||
| 85 | virtual openstudio::TimeSeries timeSeries() const override; | ||
| 86 | |||
| 87 | /* FIXME! openstudio::TimeSeries timeSeries(unsigned columnIndex) const; */ | ||
| 88 | |||
| 89 | boost::optional<CSVFile> csvFile() const; | ||
| 90 | |||
| 91 | bool translateFileWithRelativePath() const; | ||
| 92 | |||
| 93 | bool isTranslateFileWithRelativePathDefaulted() const; | ||
| 94 | |||
| 95 | //@} | ||
| 96 | /** @name Setters */ | ||
| 97 | //@{ | ||
| 98 | |||
| 99 | bool setColumnNumber(int columnNumber); | ||
| 100 | |||
| 101 | bool setRowstoSkipatTop(int rowstoSkipatTop); | ||
| 102 | |||
| 103 | bool setNumberofHoursofData(int numberofHours); | ||
| 104 | |||
| 105 | bool setColumnSeparator(const std::string& columnSeparator); | ||
| 106 | |||
| 107 | void resetColumnSeparator(); | ||
| 108 | |||
| 109 | bool setInterpolatetoTimestep(bool interpolatetoTimestep); | ||
| 110 | |||
| 111 | void resetInterpolatetoTimestep(); | ||
| 112 | |||
| 113 | bool setMinutesperItem(int minutesperItem); | ||
| 114 | |||
| 115 | void resetMinutesperItem(); | ||
| 116 | |||
| 117 | bool setAdjustScheduleforDaylightSavings(bool adjustScheduleforDaylightSavings); | ||
| 118 | |||
| 119 | void resetAdjustScheduleforDaylightSavings(); | ||
| 120 | |||
| 121 | virtual bool setTimeSeries(const openstudio::TimeSeries& timeSeries) override; | ||
| 122 | |||
| 123 | /* FIXME! unsigned addTimeSeries(const openstudio::TimeSeries& timeSeries); */ | ||
| 124 | |||
| 125 | // ensure that this object does not contain the date 2/29 | ||
| 126 | virtual void ensureNoLeapDays() override; | ||
| 127 | |||
| 128 | bool setTranslateFileWithRelativePath(bool translateFileWithRelativePath); | ||
| 129 | |||
| 130 | void resetTranslateFileWithRelativePath(); | ||
| 131 | |||
| 132 | //@} | ||
| 133 | /** @name Other */ | ||
| 134 | //@{ | ||
| 135 | |||
| 136 | openstudio::path translatedFilePath() const; | ||
| 137 | |||
| 138 | //@} | ||
| 139 | protected: | ||
| 140 | private: | ||
| 141 | − | REGISTER_LOGGER("openstudio.model.ScheduleFile"); | |
| 142 | }; | ||
| 143 | |||
| 144 | } // namespace detail | ||
| 145 | |||
| 146 | } // namespace model | ||
| 147 | } // namespace openstudio | ||
| 148 | |||
| 149 | #endif // MODEL_SCHEDULEFILE_IMPL_HPP | ||
| 150 |