Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
renewable-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// #include "../item/renewable-cluster-item.h"
28
29namespace Antares
30{
31namespace Component
32{
33namespace HTMLListbox
34{
35namespace Datasource
36{
37using RenewableClusterList = std::list<Data::RenewableCluster*>;
38using RenewableClusterMap = std::map<wxString, RenewableClusterList>;
39
41{
42public:
44
45
50
51private:
52 virtual void sortClustersInGroup(RenewableClusterList& clusterList) = 0;
53
54 void reorderItemsList(const wxString& search) override;
55 void rebuildItemsList(const wxString& search) override;
56
57}; // RenewableClustersByOrder
58
60{
61public:
63
64
69
70 virtual wxString name() const override
71 {
72 return wxT("Renewable clusters in alphabetical order");
73 }
74
75 virtual const char* icon() const override
76 {
77 return "images/16x16/sort_alphabet.png";
78 }
79
80private:
81 void sortClustersInGroup(RenewableClusterList& clusterList) override;
82
83}; // class RenewableClustersByAlphaOrder
84
86{
87public:
89
90
95
96 virtual wxString name() const
97 {
98 return wxT("Renewable clusters in reverse alphabetical order");
99 }
100
101 virtual const char* icon() const
102 {
103 return "images/16x16/sort_alphabet_descending.png";
104 }
105
106private:
107 void sortClustersInGroup(RenewableClusterList& clusterList) override;
108
109}; // class RenewableClustersByAlphaReverseOrder
110
111} // namespace Datasource
112} // namespace HTMLListbox
113} // namespace Component
114} // namespace Antares
Listbox with HTML content.
Definition component.h:50
virtual ~RenewableClustersByAlphaOrder()
Destructor.
Definition renewable-cluster-order.cpp:166
virtual const char * icon() const override
Get the relative path to the icon file.
Definition renewable-cluster-order.h:75
virtual wxString name() const override
Get the name of the datasource.
Definition renewable-cluster-order.h:70
RenewableClustersByAlphaOrder(HTMLListbox::Component &parent)
Default Constructor.
Definition renewable-cluster-order.cpp:161
virtual const char * icon() const
Get the relative path to the icon file.
Definition renewable-cluster-order.h:101
virtual wxString name() const
Get the name of the datasource.
Definition renewable-cluster-order.h:96
virtual ~RenewableClustersByAlphaReverseOrder()
Destructor.
Definition renewable-cluster-order.cpp:184
RenewableClustersByAlphaReverseOrder(HTMLListbox::Component &parent)
Default Constructor.
Definition renewable-cluster-order.cpp:178
virtual ~RenewableClustersByOrder()
Destructor.
Definition renewable-cluster-order.cpp:42
RenewableClustersByOrder(HTMLListbox::Component &parent)
Default Constructor.
Definition renewable-cluster-order.cpp:37