Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
cell.h
1
/*
2
** Copyright 2007-2024, RTE (https://www.rte-france.com)
3
** See AUTHORS.txt
4
** SPDX-License-Identifier: MPL-2.0
5
** This file is part of Antares-Simulator,
6
** Adequacy and Performance assessment for interconnected energy networks.
7
**
8
** Antares_Simulator is free software: you can redistribute it and/or modify
9
** it under the terms of the Mozilla Public Licence 2.0 as published by
10
** the Mozilla Foundation, either version 2 of the License, or
11
** (at your option) any later version.
12
**
13
** Antares_Simulator is distributed in the hope that it will be useful,
14
** but WITHOUT ANY WARRANTY; without even the implied warranty of
15
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
** Mozilla Public Licence 2.0 for more details.
17
**
18
** You should have received a copy of the Mozilla Public Licence 2.0
19
** along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>.
20
*/
21
22
#pragma once
23
24
#include <wx/string.h>
25
#include "../renderer.h"
26
#include <map>
27
28
using namespace
Yuni;
29
30
namespace
Antares
31
{
32
namespace
Component
33
{
34
namespace
Datagrid
35
{
36
namespace
Renderer
37
{
38
using namespace
Antares::Data;
39
40
class
Cell
:
public
Yuni::IEventObserver<Cell>
41
{
42
public
:
43
Cell
(TimeSeriesType ts);
44
~Cell
();
45
virtual
wxString cellValue()
const
= 0;
46
virtual
double
cellNumericValue()
const
= 0;
47
virtual
bool
setCellValue(
const
String& value) = 0;
48
virtual
IRenderer::CellStyle cellStyle()
const
= 0;
49
50
protected
:
51
void
onStudyLoaded();
52
virtual
bool
isTSgeneratorOn()
const
;
53
54
protected
:
55
Data::Study::Ptr study_;
56
TimeSeriesType tsKind_;
57
};
58
59
class
blankCell
:
public
Cell
60
{
61
public
:
62
blankCell
();
63
~blankCell
() =
default
;
64
wxString cellValue()
const override
;
65
double
cellNumericValue()
const override
;
66
bool
setCellValue(
const
String& value)
override
;
67
IRenderer::CellStyle cellStyle()
const override
;
68
};
69
70
class
inactiveCell
:
public
Cell
71
{
72
public
:
73
inactiveCell
(wxString toPrintInCell);
74
~inactiveCell
() =
default
;
75
wxString cellValue()
const override
;
76
double
cellNumericValue()
const override
;
77
bool
setCellValue(
const
String& value)
override
;
78
IRenderer::CellStyle cellStyle()
const override
;
79
80
private
:
81
wxString toBePrintedInCell_;
82
};
83
84
class
readyMadeTSstatus
:
public
Cell
85
{
86
public
:
87
readyMadeTSstatus
(TimeSeriesType ts);
88
~readyMadeTSstatus
() =
default
;
89
wxString cellValue()
const override
;
90
double
cellNumericValue()
const override
;
91
bool
setCellValue(
const
String& value)
override
;
92
IRenderer::CellStyle cellStyle()
const override
;
93
};
94
95
class
generatedTSstatus
:
public
Cell
96
{
97
public
:
98
generatedTSstatus
(TimeSeriesType ts);
99
~generatedTSstatus
() =
default
;
100
wxString cellValue()
const override
;
101
double
cellNumericValue()
const override
;
102
bool
setCellValue(
const
String& value)
override
;
103
IRenderer::CellStyle cellStyle()
const override
;
104
};
105
106
class
NumberTsCell
:
public
Cell
107
{
108
public
:
109
NumberTsCell
(TimeSeriesType ts);
110
~NumberTsCell
() =
default
;
111
wxString cellValue()
const override
;
112
double
cellNumericValue()
const override
;
113
bool
setCellValue(
const
String& value)
override
;
114
IRenderer::CellStyle cellStyle()
const override
;
115
116
private
:
117
void
onStudyLoaded();
118
119
private
:
120
std::map<TimeSeriesType, uint*> tsToNumberTs_;
121
};
122
123
class
NumberTsCellThermal
:
public
NumberTsCell
124
{
125
public
:
126
NumberTsCellThermal
();
127
IRenderer::CellStyle cellStyle()
const override
;
128
};
129
130
class
RefreshTsCell
:
public
Cell
131
{
132
public
:
133
RefreshTsCell
(TimeSeriesType ts);
134
~RefreshTsCell
() =
default
;
135
wxString cellValue()
const override
;
136
double
cellNumericValue()
const override
;
137
bool
setCellValue(
const
String& value)
override
;
138
IRenderer::CellStyle cellStyle()
const override
;
139
};
140
141
class
RefreshTsCellThermal
:
public
RefreshTsCell
142
{
143
public
:
144
RefreshTsCellThermal
();
145
IRenderer::CellStyle cellStyle()
const override
;
146
};
147
148
class
RefreshSpanCell
:
public
Cell
149
{
150
public
:
151
RefreshSpanCell
(TimeSeriesType ts);
152
~RefreshSpanCell
() =
default
;
153
wxString cellValue()
const override
;
154
double
cellNumericValue()
const override
;
155
bool
setCellValue(
const
String& value)
override
;
156
IRenderer::CellStyle cellStyle()
const override
;
157
158
private
:
159
void
onStudyLoaded();
160
161
private
:
162
std::map<TimeSeriesType, uint*> tsToRefreshSpan_;
163
};
164
165
class
RefreshSpanCellThermal
:
public
RefreshSpanCell
166
{
167
public
:
168
RefreshSpanCellThermal
();
169
IRenderer::CellStyle cellStyle()
const override
;
170
};
171
172
class
SeasonalCorrelationCell
:
public
Cell
173
{
174
public
:
175
SeasonalCorrelationCell
(TimeSeriesType ts);
176
~SeasonalCorrelationCell
() =
default
;
177
virtual
wxString cellValue()
const override
;
178
double
cellNumericValue()
const override
;
179
bool
setCellValue(
const
String& value)
override
;
180
IRenderer::CellStyle cellStyle()
const override
;
181
182
private
:
183
void
onStudyLoaded();
184
185
private
:
186
std::map<TimeSeriesType, Correlation*> tsToCorrelation_;
187
};
188
189
class
SeasonalCorrelationCellThermal
:
public
SeasonalCorrelationCell
190
{
191
public
:
192
SeasonalCorrelationCellThermal
();
193
wxString cellValue()
const override
;
194
IRenderer::CellStyle cellStyle()
const override
;
195
};
196
197
class
storeToInputCell
:
public
Cell
198
{
199
public
:
200
storeToInputCell
(TimeSeriesType ts);
201
~storeToInputCell
() =
default
;
202
wxString cellValue()
const override
;
203
double
cellNumericValue()
const override
;
204
bool
setCellValue(
const
String& value)
override
;
205
IRenderer::CellStyle cellStyle()
const override
;
206
};
207
208
class
storeToOutputCell
:
public
Cell
209
{
210
public
:
211
storeToOutputCell
(TimeSeriesType ts);
212
~storeToOutputCell
() =
default
;
213
wxString cellValue()
const override
;
214
double
cellNumericValue()
const override
;
215
bool
setCellValue(
const
String& value)
override
;
216
IRenderer::CellStyle cellStyle()
const override
;
217
};
218
219
class
intraModalCell
:
public
Cell
220
{
221
public
:
222
intraModalCell
(TimeSeriesType ts);
223
~intraModalCell
() =
default
;
224
wxString cellValue()
const override
;
225
double
cellNumericValue()
const override
;
226
bool
setCellValue(
const
String& value)
override
;
227
IRenderer::CellStyle cellStyle()
const override
;
228
};
229
230
class
interModalCell
:
public
Cell
231
{
232
public
:
233
interModalCell
(TimeSeriesType ts);
234
~interModalCell
() =
default
;
235
wxString cellValue()
const override
;
236
double
cellNumericValue()
const override
;
237
bool
setCellValue(
const
String& value)
override
;
238
IRenderer::CellStyle cellStyle()
const override
;
239
};
240
241
}
// namespace Renderer
242
}
// namespace Datagrid
243
}
// namespace Component
244
}
// namespace Antares
Antares::Component::Datagrid::Renderer::Cell
Definition
cell.h:41
Antares::Component::Datagrid::Renderer::NumberTsCellThermal
Definition
cell.h:124
Antares::Component::Datagrid::Renderer::NumberTsCell
Definition
cell.h:107
Antares::Component::Datagrid::Renderer::RefreshSpanCellThermal
Definition
cell.h:166
Antares::Component::Datagrid::Renderer::RefreshSpanCell
Definition
cell.h:149
Antares::Component::Datagrid::Renderer::RefreshTsCellThermal
Definition
cell.h:142
Antares::Component::Datagrid::Renderer::RefreshTsCell
Definition
cell.h:131
Antares::Component::Datagrid::Renderer::SeasonalCorrelationCellThermal
Definition
cell.h:190
Antares::Component::Datagrid::Renderer::SeasonalCorrelationCell
Definition
cell.h:173
Antares::Component::Datagrid::Renderer::blankCell
Definition
cell.h:60
Antares::Component::Datagrid::Renderer::generatedTSstatus
Definition
cell.h:96
Antares::Component::Datagrid::Renderer::inactiveCell
Definition
cell.h:71
Antares::Component::Datagrid::Renderer::interModalCell
Definition
cell.h:231
Antares::Component::Datagrid::Renderer::intraModalCell
Definition
cell.h:220
Antares::Component::Datagrid::Renderer::readyMadeTSstatus
Definition
cell.h:85
Antares::Component::Datagrid::Renderer::storeToInputCell
Definition
cell.h:198
Antares::Component::Datagrid::Renderer::storeToOutputCell
Definition
cell.h:209
src
ui
simulator
toolbox
components
datagrid
renderer
cell.h
Generated by
1.12.0