Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
datasource.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#ifndef __ANTARES_TOOLBOX_COMPONENT_HTMLLISTBOX_DATASOURCE_H__
22#define __ANTARES_TOOLBOX_COMPONENT_HTMLLISTBOX_DATASOURCE_H__
23
24#include <map>
25#include <wx/wx.h>
26
27namespace Antares
28{
29namespace Component
30{
31namespace HTMLListbox
32{
33// Forward declaration
34class Component;
35
36namespace Datasource
37{
45{
46public:
48 using Map = std::map<int, IDatasource*>;
49
50public:
52
53
59 virtual ~IDatasource();
61
65 virtual wxString name() const = 0;
66
70 virtual const char* icon() const = 0;
71
75 virtual void refresh(const wxString& search = wxEmptyString) = 0;
76
77protected:
80
81}; // class IDatasource
82
83} // namespace Datasource
84} // namespace HTMLListbox
85} // namespace Component
86} // namespace Antares
87
88#include "datasource.hxx"
89
90#endif // __ANTARES_TOOLBOX_COMPONENT_HTMLLISTBOX_COMPONENT_H__
Listbox with HTML content.
Definition component.h:50
Datasource for HTMLListbox::Component.
Definition datasource.h:45
virtual wxString name() const =0
Get the name of the datasource.
IDatasource(HTMLListbox::Component &parent)
Default Constructor.
Definition datasource.hxx:32
HTMLListbox::Component & pParent
The parent component.
Definition datasource.h:79
virtual ~IDatasource()
Destructor.
Definition datasource.hxx:36
virtual const char * icon() const =0
Get the relative path to the icon file.
std::map< int, IDatasource * > Map
List.
Definition datasource.h:48
virtual void refresh(const wxString &search=wxEmptyString)=0
Refresh the list.