Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
thermal-cluster-order.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 "cluster-order.h"
25#include <map>
26#include <list>
27
28namespace Antares
29{
30namespace Component
31{
32namespace HTMLListbox
33{
34namespace Datasource
35{
36using ThermalClusterList = std::list<Data::ThermalCluster*>;
37using ThermalClusterMap = std::map<wxString, ThermalClusterList>;
38
40{
41public:
43
44
49
50private:
51 virtual void sortClustersInGroup(ThermalClusterList& clusterList) = 0;
52
53 void reorderItemsList(const wxString& search) override;
54 void rebuildItemsList(const wxString& search) override;
55
56}; // ThermalClustersByOrder
57
59{
60public:
62
63
68
69 wxString name() const override
70 {
71 return wxT("Thermal clusters in alphabetical order");
72 }
73
74 const char* icon() const override
75 {
76 return "images/16x16/sort_alphabet.png";
77 }
78
79private:
80 void sortClustersInGroup(ThermalClusterList& clusterList) override;
81
82}; // class ThermalClustersByAlphaOrder
83
85{
86public:
88
89
94
95 virtual wxString name() const
96 {
97 return wxT("Thermal clusters in reverse alphabetical order");
98 }
99
100 virtual const char* icon() const
101 {
102 return "images/16x16/sort_alphabet_descending.png";
103 }
104
105private:
106 void sortClustersInGroup(ThermalClusterList& clusterList) override;
107
108}; // class ThermalClustersByAlphaReverseOrder
109
110} // namespace Datasource
111} // namespace HTMLListbox
112} // namespace Component
113} // namespace Antares
Listbox with HTML content.
Definition component.h:50
virtual ~ThermalClustersByAlphaOrder()
Destructor.
Definition thermal-cluster-order.cpp:165
const char * icon() const override
Get the relative path to the icon file.
Definition thermal-cluster-order.h:74
wxString name() const override
Get the name of the datasource.
Definition thermal-cluster-order.h:69
ThermalClustersByAlphaOrder(HTMLListbox::Component &parent)
Default Constructor.
Definition thermal-cluster-order.cpp:160
virtual wxString name() const
Get the name of the datasource.
Definition thermal-cluster-order.h:95
virtual ~ThermalClustersByAlphaReverseOrder()
Destructor.
Definition thermal-cluster-order.cpp:183
ThermalClustersByAlphaReverseOrder(HTMLListbox::Component &parent)
Default Constructor.
Definition thermal-cluster-order.cpp:177
virtual const char * icon() const
Get the relative path to the icon file.
Definition thermal-cluster-order.h:100
virtual ~ThermalClustersByOrder()
Destructor.
Definition thermal-cluster-order.cpp:42
ThermalClustersByOrder(HTMLListbox::Component &parent)
Default Constructor.
Definition thermal-cluster-order.cpp:37