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