21 #ifndef __ANTARES_LIBS_STUDY_ACTION_CONTEXT_H__
22 #define __ANTARES_LIBS_STUDY_ACTION_CONTEXT_H__
24 #include <yuni/yuni.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>
33 namespace Antares::Action
38 using Ptr = std::shared_ptr<Context>;
43 using Views = std::map<Yuni::CString<50, false>,
LocalView>;
47 using PlantNameMappingForceCreate = std::map<Data::AreaName, bool>;
48 using ConstraintMappingForceCreate = std::map<Data::ConstraintName, bool>;
53 explicit Context(Data::Study::Ptr targetStudy,
const size_t layer = 0);
93 PlantNameMappingForceCreate clusterForceCreate;
94 ConstraintMappingForceCreate constraintForceCreate;
Data::AreaLink::Vector autoselectLinks
List of links to select after the paste.
Definition: context.h:106
Data::AreaLink * link
The current Link.
Definition: context.h:77
Data::Study::Ptr extStudy
An optional external study, which will be destroyed with this class.
Definition: context.h:67
Data::Area::NameMapping areaNameMapping
Area name mapping.
Definition: context.h:89
void reset()
Reset internal data.
Definition: context.cpp:40
~Context()=default
Destructor.
Data::ThermalCluster * originalPlant
The original cluster name.
Definition: context.h:79
Views view
Views.
Definition: context.h:84
std::map< Data::AreaName, bool > AreaNameMappingForceCreate
Area name mapping.
Definition: context.h:46
Yuni::Bind< void(const Yuni::String &)> updateMessageUI
Delegate to update the interface.
Definition: context.h:99
std::shared_ptr< Data::BindingConstraint > constraint
The current constraint.
Definition: context.h:81
std::map< Yuni::CString< 50, false >, IAction::Ptr > LocalView
Local view.
Definition: context.h:42
AreaNameMappingForceCreate areaForceCreate
Area name mapping, force creation.
Definition: context.h:92
Yuni::String message
Temporary string for message formatting.
Definition: context.h:97
std::map< Yuni::String, Yuni::String > Properties
Map of properties.
Definition: context.h:40
Data::BindingConstraintsRepository::Vector autoselectConstraints
List of binding constraints to select after the paste.
Definition: context.h:108
Data::Area::Vector autoselectAreas
List of areas to select after the paste.
Definition: context.h:104
Data::Study::Ptr study
The target study.
Definition: context.h:65
Data::Area * area
The current Area.
Definition: context.h:73
Properties property
All properties.
Definition: context.h:86
Data::ThermalCluster * cluster
The current Thermal cluster.
Definition: context.h:75
AncestorType::Ptr Ptr
The most suitable smart ptr for the class.
Definition: action.h:41
Definition of a link between two areas (Interconnection)
Definition: links.h:58
std::vector< AreaLink * > Vector
Vector of links.
Definition: links.h:61
Definition for a single area.
Definition: area.h:51
std::map< AreaName, AreaName > NameMapping
Name mapping -> must be replaced by AreaNameMapping.
Definition: area.h:62
std::vector< std::shared_ptr< BindingConstraint > > Vector
Vector of binding constraints.
Definition: BindingConstraintsRepository.h:39
A single thermal cluster.
Definition: cluster.h:76