Antares Simulator
Power System Simulator
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages Concepts
data.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_WINDOWS_INSPECTOR_DATA_H__
22#define __ANTARES_WINDOWS_INSPECTOR_DATA_H__
23
24#include <yuni/yuni.h>
25#include <memory>
26#include "antares/study/binding_constraint/BindingConstraintsRepository.h"
27#include <antares/study/study.h>
28
29namespace Antares
30{
31namespace Window
32{
33namespace Inspector
34{
40class InspectorData final
41{
42public:
44 using Ptr = std::shared_ptr<InspectorData>;
45
46public:
48
49
52 explicit InspectorData(Data::Study::Ptr study);
56
57 void clear();
58
59 void determineEmpty();
60
64 uint totalNbOfItems() const;
65
66public:
68 Data::Study::Ptr study;
70 bool empty;
72 Data::Area::Set areas;
83
84}; // class InspectorData
85
86// Singleton
87extern InspectorData::Ptr gData;
88
89} // namespace Inspector
90} // namespace Window
91} // namespace Antares
92
93#include "data.hxx"
94
95#endif // __ANTARES_WINDOWS_INSPECTOR_DATA_H__
std::set< std::shared_ptr< BindingConstraint >, CompareBindingConstraintName > Set
Ordered Set of binding constraints.
Definition BindingConstraintsRepository.h:41
std::set< RenewableCluster *, CompareClusterName > Set
Set of renewable clusters.
Definition cluster.h:80
std::set< Ptr > Set
Set of studies.
Definition study.h:65
std::set< ThermalCluster *, CompareClusterName > Set
Set of thermal clusters.
Definition cluster.h:110
Collection of items to view/edit from an inspector.
Definition data.h:41
std::shared_ptr< InspectorData > Ptr
The most suitable smart pointer for the class.
Definition data.h:44
Data::AreaLink::Set links
All selected links.
Definition data.h:74
Data::BindingConstraintsRepository::Set constraints
All selected binding constraints.
Definition data.h:80
uint totalNbOfItems() const
Get the total number of items in this set.
Definition data.cpp:52
Data::Area::Set areas
All selected areas.
Definition data.h:72
Data::RenewableCluster::Set RnClusters
All selected renewable clusters.
Definition data.h:78
Data::Study::Set studies
All studies.
Definition data.h:82
InspectorData(Data::Study::Ptr study)
Default constructor.
Definition data.cpp:30
Data::Study::Ptr study
Reference to the study.
Definition data.h:68
bool empty
Flag to fastly know if the selection is empty.
Definition data.h:70
~InspectorData()
Destructor.
Definition data.cpp:34
Data::ThermalCluster::Set ThClusters
All selected thermal clusters.
Definition data.h:76