21#ifndef __ANTARES_LIBS_STUDY_SCENARIO_BUILDER_UPDATER_HXX__
22#define __ANTARES_LIBS_STUDY_SCENARIO_BUILDER_UPDATER_HXX__
26#include "antares/study/study.h"
30#define SEP IO::Separator
36class ScenarioBuilderUpdater
45 if (study.scenarioRules)
47 study.scenarioRules->inUpdaterMode = true;
48 logs.debug() <<
"[scenario-builder] updater mode ON";
51 <<
"[scenario-builder] writing data to a temporary file before structure changes";
52 pTempFile << memory.cacheFolder() << SEP <<
"antares-scenbld-save-"
53 << memory.processID() <<
'-' << (size_t)(this) <<
"-scenariobuilder.tmp";
55 study.scenarioRules->saveToINIFile(pTempFile);
56 study.scenarioRules->clear();
60 ~ScenarioBuilderUpdater()
64 if (not pTempFile.empty())
68 logs.debug() <<
"[scenario-builder] reloading data from a temporary file";
72 logs.debug() <<
"[scenario-builder] updater mode OFF";
75 IO::File::Delete(pTempFile);
81 Yuni::String pTempFile;
std::unique_ptr< ScenarioBuilder::Sets > scenarioRules
Rules for building scenarios (can be null)
Definition study.h:560