21#ifndef __ANTARES_LIBS_STUDY_ACTION_CONTEXT_H__
22#define __ANTARES_LIBS_STUDY_ACTION_CONTEXT_H__
25#include <antares/study/study.h>
27#include <yuni/core/string.h>
28#include <yuni/core/bind.h>
31#include <antares/study/binding_constraint/BindingConstraintsRepository.h>
40 using Ptr = std::shared_ptr<Context>;
45 using Views = std::map<Yuni::CString<50, false>,
LocalView>;
49 using PlantNameMappingForceCreate = std::map<Data::AreaName, bool>;
50 using ConstraintMappingForceCreate = std::map<Data::ConstraintName, bool>;
55 explicit Context(Data::Study::Ptr targetStudy,
const size_t layer = 0);
95 PlantNameMappingForceCreate clusterForceCreate;
96 ConstraintMappingForceCreate constraintForceCreate;
Data::AreaLink::Vector autoselectLinks
List of links to select after the paste.
Definition context.h:108
Data::AreaLink * link
The current Link.
Definition context.h:79
Data::Study::Ptr extStudy
An optional external study, which will be destroyed with this class.
Definition context.h:69
Data::Area::NameMapping areaNameMapping
Area name mapping.
Definition context.h:91
void reset()
Reset internal data.
Definition context.cpp:42
~Context()=default
Destructor.
Data::ThermalCluster * originalPlant
The original cluster name.
Definition context.h:81
Views view
Views.
Definition context.h:86
std::map< Data::AreaName, bool > AreaNameMappingForceCreate
Area name mapping.
Definition context.h:48
Yuni::Bind< void(const Yuni::String &)> updateMessageUI
Delegate to update the interface.
Definition context.h:101
std::shared_ptr< Data::BindingConstraint > constraint
The current constraint.
Definition context.h:83
std::map< Yuni::CString< 50, false >, IAction::Ptr > LocalView
Local view.
Definition context.h:44
AreaNameMappingForceCreate areaForceCreate
Area name mapping, force creation.
Definition context.h:94
Yuni::String message
Temporary string for message formatting.
Definition context.h:99
std::map< Yuni::String, Yuni::String > Properties
Map of properties.
Definition context.h:42
Data::BindingConstraintsRepository::Vector autoselectConstraints
List of binding constraints to select after the paste.
Definition context.h:110
Data::Area::Vector autoselectAreas
List of areas to select after the paste.
Definition context.h:106
Data::Study::Ptr study
The target study.
Definition context.h:67
Data::Area * area
The current Area.
Definition context.h:75
Properties property
All properties.
Definition context.h:88
Data::ThermalCluster * cluster
The current Thermal cluster.
Definition context.h:77
AncestorType::Ptr Ptr
The most suitable smart ptr for the class.
Definition action.h:43
Definition of a link between two areas (Interconnection)
Definition links.h:50
std::vector< AreaLink * > Vector
Vector of links.
Definition links.h:53
Definition for a single area.
Definition area.h:52
std::map< AreaName, AreaName > NameMapping
Name mapping -> must be replaced by AreaNameMapping.
Definition area.h:63
std::vector< std::shared_ptr< BindingConstraint > > Vector
Vector of binding constraints.
Definition BindingConstraintsRepository.h:39
A single thermal cluster.
Definition cluster.h:78