21#ifndef __LIBS_STUDY_SCENARIO_BUILDER_SETS_H__
22#define __LIBS_STUDY_SCENARIO_BUILDER_SETS_H__
32namespace ScenarioBuilder
37class Sets final:
private Yuni::NonCopyable<Sets>
63 void setStudy(
Study& study);
80 template<
class StringT>
85 template<
class StringT>
103 bool exists(
const RulesScenarioName& lname)
const;
115 Rules::Ptr rename(
const RulesScenarioName& lname,
const RulesScenarioName& newname);
122 bool remove(
const RulesScenarioName& lname);
143 bool internalLoadFromINIFile(
const AnyString& filename);
145 bool internalSaveToIniFile(
const AnyString& filename)
const;
std::map< RulesScenarioName, Ptr > Map
Map.
Definition rules.h:57
std::shared_ptr< Rules > Ptr
Smart pointer.
Definition rules.h:55
Sets for TS numbers, for all years and a single timeseries.
Definition sets.h:38
Rules::Ptr rename(const RulesScenarioName &lname, const RulesScenarioName &newname)
Rename a given ruleset.
Definition sets.cpp:103
Rules::Ptr createNew(const RulesScenarioName &name)
Create a new set.
Definition sets.cpp:83
Sets()
Default constructor.
Definition sets.cpp:31
bool empty() const
Get if empty.
Definition sets.hxx:35
bool saveToINIFile(const StringT &filename)
Save all rulesets into a mere INI file.
Definition sets.hxx:77
bool remove(const RulesScenarioName &lname)
Delete a ruleset.
Definition sets.cpp:129
bool loadFromINIFile(const StringT &filename)
Load all rulesets from an INI file.
Definition sets.hxx:84
void clear()
Clear all data.
Definition sets.cpp:47
bool inUpdaterMode
Definition sets.h:48
Rules::Map::iterator iterator
Iterator.
Definition sets.h:41
bool loadFromStudy(Study &study)
Load data from the study.
Definition sets.cpp:53
Rules::Ptr find(const RulesScenarioName &lname) const
Find a rule set.
Definition sets.hxx:65
bool exists(const RulesScenarioName &lname) const
Test if a rules set exist.
Definition sets.hxx:60
~Sets()
Destructor.
Definition sets.cpp:37
Rules::Map::const_iterator const_iterator
Const iterator.
Definition sets.h:43
uint size() const
Get the number of available sets.
Definition sets.hxx:30