Antares Simulator
Power System Simulator
data.h
1 /*
2  * Copyright 2007-2025, 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 
29 namespace Antares::Window::Inspector
30 {
36 class InspectorData final
37 {
38 public:
40  using Ptr = std::shared_ptr<InspectorData>;
41 
42 public:
44 
45 
48  explicit InspectorData(Data::Study::Ptr study);
52 
53  void clear();
54 
55  void determineEmpty();
56 
60  uint totalNbOfItems() const;
61 
62 public:
64  Data::Study::Ptr study;
66  bool empty;
68  Data::Area::Set areas;
79 
80 }; // class InspectorData
81 
82 // Singleton
83 extern InspectorData::Ptr gData;
84 
85 } // namespace Antares::Window::Inspector
86 
87 #include "data.hxx"
88 
89 #endif // __ANTARES_WINDOWS_INSPECTOR_DATA_H__
std::set< std::shared_ptr< BindingConstraint >, CompareBindingConstraintName > Set
Ordered Set of binding constraints.
Definition: BindingConstraint.h:88
std::set< RenewableCluster *, CompareClusterName > Set
Set of renewable clusters.
Definition: cluster.h:53
std::set< Ptr > Set
Set of studies.
Definition: study.h:61
std::set< ThermalCluster *, CompareClusterName > Set
Set of thermal clusters.
Definition: cluster.h:81
Collection of items to view/edit from an inspector.
Definition: data.h:37
std::shared_ptr< InspectorData > Ptr
The most suitable smart pointer for the class.
Definition: data.h:40
Data::AreaLink::Set links
All selected links.
Definition: data.h:70
uint totalNbOfItems() const
Get the total number of items in this set.
Definition: data.cpp:50
Data::Area::Set areas
All selected areas.
Definition: data.h:68
Data::RenewableCluster::Set RnClusters
All selected renewable clusters.
Definition: data.h:74
Data::Study::Set studies
All studies.
Definition: data.h:78
InspectorData(Data::Study::Ptr study)
Default constructor.
Definition: data.cpp:26
Data::Study::Ptr study
Reference to the study.
Definition: data.h:64
bool empty
Flag to fastly know if the selection is empty.
Definition: data.h:66
~InspectorData()
Destructor.
Definition: data.cpp:32
Data::ThermalCluster::Set ThClusters
All selected thermal clusters.
Definition: data.h:72
Data::BindingConstraint::Set constraints
All selected binding constraints.
Definition: data.h:76