21#ifndef __ANTARES_APPLICATION_STUDY_H__
22#define __ANTARES_APPLICATION_STUDY_H__
25#include "../toolbox/wx-wrapper.h"
26#include <antares/study/study.h>
27#include <antares/study/output.h>
28#include <yuni/core/event.h>
30#include <antares/locator/locator.h>
32#include "ui/simulator/toolbox/components/map/settings.h"
47extern wxString gLastOpenedStudyFolder;
59void OpenStudyFromFolder(wxString folder);
64SaveResult SaveStudy();
69SaveResult SaveStudyAs(
const Yuni::String& path,
bool copyoutput,
bool copyuserdata,
bool copylogs);
74void SetCurrentStudy(std::shared_ptr<Data::Study> study);
79std::shared_ptr<Data::Study> GetCurrentStudy();
84bool CurrentStudyIsValid();
90SaveResult ExportMap(
const Yuni::String& path,
91 bool transparentBackground,
92 const wxColour& backgroundColor,
93 const std::list<uint16_t>& layers,
95 Antares::Map::mapImageFormat format);
102bool CloseTheStudy(
bool updateGUI =
true);
107bool CheckIfInsideAStudyFolder(
const AnyString& path,
bool quiet =
false);
118void RunSimulationOnTheStudy(Data::Study::Ptr study,
119 const YString& simuName,
120 const YString& simuComments,
122 Solver::Feature features = Solver::standard,
123 bool preproOnly =
false,
124 const std::string& solverName =
"sirius");
129void UpdateGUIFromStudyState();
139void MarkTheStudyAsModified();
144void MarkTheStudyAsModified(
const Data::Study::Ptr& study);
146void ResetTheModifierState(
bool v);
154bool StudyHasBeenModified();
163uint64_t StudyInMemoryRevisionID();
168void RefreshListOfOutputsForTheCurrentStudy();
170void StudyRefreshCalendar();
179extern Yuni::Event<void()> OnStudyLoaded;
186extern Yuni::Event<void()> OnStudyClosed;
191extern Yuni::Event<void()> OnStudySaved;
196extern Yuni::Event<void()> OnStudySavedAs;
202extern Yuni::Event<void(
Data::Study&)> OnStudyChanged;
207extern Yuni::Event<void()> OnStudyAreasChanged;
209extern Yuni::Event<void()> OnStudySettingsChanged;
215 OnStudyUpdateOutputInfo;
220extern Yuni::Event<void(
Data::Area*)> OnStudyAreaRename;
225extern Yuni::Event<void(
Data::Area*)> OnStudyAreaAdded;
230extern Yuni::Event<void(
Data::Area*)> OnStudyAreaDelete;
238extern Yuni::Event<void(
Data::Area*)> OnStudyAreaColorChanged;
275extern Yuni::Event<void()> OnStudyNodalOptimizationChanged;
280extern Yuni::Event<void()> OnStudySimulationSettingsChanged;
285extern Yuni::Event<void()> OnStudyUpdatePlaylist;
290extern Yuni::Event<void()> OnStudyReloadAllComponentsWithJITData;
297extern Yuni::Event<void()> OnStudyThermalClusterCommonSettingsChanged;
300extern Yuni::Event<void(
Data::Area*)> OnStudyThermalClusterGroupChanged;
307extern Yuni::Event<void()> OnStudyRenewableClusterCommonSettingsChanged;
310extern Yuni::Event<void(
Data::Area*)> OnStudyRenewableClusterGroupChanged;
317extern Yuni::Event<void()> OnStudyScenarioBuilderDataAreLoaded;
326extern Yuni::Event<void()> OnStudyBeginUpdate;
332extern Yuni::Event<void()> OnStudyEndUpdate;
335extern Yuni::Event<void(
const void*)> OnInspectorRefresh;
338extern Yuni::Event<void()> OnMainNotebookChanged;
342extern Yuni::Event<void()> OnLayerNodeUIChanged;
346extern Yuni::Event<void(
const wxString*)> OnMapLayerChanged;
349extern Yuni::Event<void(
const wxString*)> OnMapLayerAdded;
350extern Yuni::Event<void(
const wxString*)> OnMapLayerRemoved;
351extern Yuni::Event<void(
const wxString*)> OnMapLayerRenamed;
358void MemoryFlushBeginUpdate();
360void MemoryFlushEndUpdate();
362bool CanPerformMemoryFlush();
365extern bool SystemParameterHaveChanged;
370extern bool GUIFlagInvalidateAreas;
378extern Yuni::String LastPathForOpeningAFile;
389 OnStudyBeginUpdate();
405 MemoryFlushBeginUpdate();
409 MemoryFlushEndUpdate();
Definition of a link between two areas (Interconnection)
Definition links.h:50
Definition for a single area.
Definition area.h:52
Definition BindingConstraint.h:49
std::list< Ptr > List
List.
Definition output.h:45
std::shared_ptr< Output > Ptr
Smartptr.
Definition output.h:43
A single thermal cluster.
Definition cluster.h:78
Avoid the execution of a memory flush.
Definition study.h:401
Avoid the use of the data related to a study for the lifetime of the object (RAII)
Definition study.h:385