diff --git a/src/libs/antares/study/CMakeLists.txt b/src/libs/antares/study/CMakeLists.txt index e9a05827ac..bc06a77089 100644 --- a/src/libs/antares/study/CMakeLists.txt +++ b/src/libs/antares/study/CMakeLists.txt @@ -249,7 +249,7 @@ set(SRC_STUDY # Sets include/antares/study/sets.h - include/antares/study/sets.hxx + area/sets.cpp # variable selection include/antares/study/variable-print-info.h diff --git a/src/libs/antares/study/include/antares/study/sets.hxx b/src/libs/antares/study/area/sets.cpp similarity index 58% rename from src/libs/antares/study/include/antares/study/sets.hxx rename to src/libs/antares/study/area/sets.cpp index 2a1b777995..f853c21c0c 100644 --- a/src/libs/antares/study/include/antares/study/sets.hxx +++ b/src/libs/antares/study/area/sets.cpp @@ -18,57 +18,41 @@ ** You should have received a copy of the Mozilla Public Licence 2.0 ** along with Antares_Simulator. If not, see . */ -#ifndef __ANTARES_LIBS_STUDY_SETS_HXX__ -#define __ANTARES_LIBS_STUDY_SETS_HXX__ +#include "antares/study/sets.h" -namespace Antares +namespace Antares::Data { -namespace Data -{ -template -inline Sets::Sets(): - pModified(false) -{ -} - -template -inline Sets::Sets(const Sets& rhs): +Sets::Sets(const Sets& rhs): pMap(rhs.pMap), - pOptions(rhs.pOptions), - pModified(false) + pOptions(rhs.pOptions) { - if (rhs.pByIndex) + if (rhs.pByIndex.size()) { rebuildIndexes(); } } -template -typename Sets::iterator Sets::begin() +Sets::iterator Sets::begin() { return pMap.begin(); } -template -typename Sets::const_iterator Sets::begin() const +Sets::const_iterator Sets::begin() const { return pMap.begin(); } -template -typename Sets::iterator Sets::end() +Sets::iterator Sets::end() { return pMap.end(); } -template -typename Sets::const_iterator Sets::end() const +Sets::const_iterator Sets::end() const { return pMap.end(); } -template -void Sets::clear() +void Sets::clear() { pByIndex.clear(); pNameByIndex.clear(); @@ -76,36 +60,30 @@ void Sets::clear() pOptions.clear(); } -template -inline T& Sets::operator[](uint i) +Sets::SetAreasType& Sets::operator[](uint i) { assert(i < pMap.size() && "Sets: operator[] index out of bounds"); return *(pByIndex[i]); } -template -inline const T& Sets::operator[](uint i) const +const Sets::SetAreasType& Sets::operator[](uint i) const { assert(i < pMap.size() && "Sets: operator[] index out of bounds"); return *(pByIndex[i]); } -template -template -void Sets::dumpToLogs(L& log) const +void Sets::dumpToLogs() const { using namespace Yuni; - const typename MapType::const_iterator end = pMap.end(); - for (typename MapType::const_iterator i = pMap.begin(); i != end; ++i) + for (const auto& [setId, set]: pMap) { - log.info() << " found `" << i->first << "` (" << (uint)i->second->size() << ' ' - << (i->second->size() < 2 ? "item" : "items") - << ((!hasOutput(i->first)) ? ", no output" : "") << ')'; + logs.info() << " found `" << setId << "` (" << set->size() << ' ' + << (set->size() < 2 ? "item" : "items") + << ((!hasOutput(setId)) ? ", no output" : "") << ')'; } } -template -void Sets::defaultForAreas() +void Sets::defaultForAreas() { using namespace Yuni; clear(); @@ -113,23 +91,21 @@ void Sets::defaultForAreas() opts.caption = "All areas"; opts.comments = "Spatial aggregates on all areas"; opts.output = false; - opts.rules.push_back(Rule(ruleFilter, new String("add-all"))); - auto item = std::make_shared(); - add("all areas", item, opts); + opts.rules.emplace_back(ruleFilter, "add-all"); + auto district = std::make_shared(); + add("all areas", district, opts); } -template -YString Sets::toString() +YString Sets::toString() { using namespace Yuni; using namespace Antares; static const char* cmds[ruleMax] = {"none", "+", "-", "apply-filter"}; - const auto end = pOptions.cend(); YString ret = ""; - for (auto i = pOptions.cbegin(); i != end; ++i) + for (const auto& [setId, options]: pOptions) { - const Options& opts = i->second; - ret << '[' << i->first << "]\n"; + const Options& opts = options; + ret << '[' << setId << "]\n"; ret << "caption = " << opts.caption << '\n'; if (not opts.comments.empty()) { @@ -150,13 +126,8 @@ YString Sets::toString() return ret; } -template -template -bool Sets::saveToFile(const StringT& filename) const +bool Sets::saveToFile(const Yuni::String& filename) const { - using namespace Yuni; - using namespace Antares; - Yuni::IO::File::Stream file; if (!file.open(filename, Yuni::IO::OpenMode::write | Yuni::IO::OpenMode::truncate)) { @@ -190,8 +161,7 @@ bool Sets::saveToFile(const StringT& filename) const return true; } -template -bool Sets::loadFromFile(const std::filesystem::path& filename) +bool Sets::loadFromFile(const std::filesystem::path& filename) { using namespace Yuni; using namespace Antares; @@ -221,7 +191,7 @@ bool Sets::loadFromFile(const std::filesystem::path& filename) } // Creating a new section - auto item = std::make_shared(); + auto district = std::make_shared(); Options opts; opts.caption = section->name; @@ -239,17 +209,17 @@ bool Sets::loadFromFile(const std::filesystem::path& filename) if (p->key == "+") { - opts.rules.push_back(Rule(ruleAdd, new String(value))); + opts.rules.emplace_back(ruleAdd, value.to()); continue; } if (p->key == "-") { - opts.rules.push_back(Rule(ruleRemove, new String(value))); + opts.rules.emplace_back(ruleRemove, value.to()); continue; } if (p->key == "apply-filter") { - opts.rules.push_back(Rule(ruleFilter, new String(value))); + opts.rules.emplace_back(ruleFilter, value.to()); continue; } if (p->key == "output") @@ -276,7 +246,7 @@ bool Sets::loadFromFile(const std::filesystem::path& filename) // Add the new group IDType newid = section->name; newid.toLower(); - add(newid, item, opts); + add(newid, district, opts); } // Not modified anymore @@ -288,31 +258,28 @@ bool Sets::loadFromFile(const std::filesystem::path& filename) return false; } -template -template -inline void Sets::rebuildAllFromRules(HandlerT& handler) +void Sets::rebuildAllFromRules(SetHandlerAreas& handler) { - for (uint i = 0; i != pMap.size(); ++i) + for (const auto& setId: pNameByIndex) { - rebuildFromRules(pNameByIndex[i], handler); + rebuildFromRules(setId, handler); } } -template -template -void Sets::rebuildFromRules(const IDType& id, HandlerT& handler) +void Sets::rebuildFromRules(const IDType& id, SetHandlerAreas& handler) { using namespace Yuni; using namespace Antares; - typename MapOptions::iterator i = pOptions.find(id); - if (i == pOptions.end()) + const auto pair = pOptions.find(id); + if (pair == pOptions.end()) { return; } + // Options - Options& opts = i->second; - Type& set = *(pMap[id]); + Options& opts = pair->second; + auto& set = *(pMap[id]); // Clear the result first handler.clear(set); @@ -320,23 +287,20 @@ void Sets::rebuildFromRules(const IDType& id, HandlerT& handler) for (uint i = 0; i != opts.rules.size(); ++i) { const Rule& rule = opts.rules[i]; - const Yuni::String& arg = *(rule.second); + const std::string name = rule.second; switch (rule.first) // type { case ruleAdd: { // Trying to add a single item - if (!handler.add(set, arg)) + if (!handler.add(set, name)) { // Failed. Maybe the argument references another group - const IDType other = arg; - typename MapType::iterator i = pMap.find(other); + const IDType other = name; + MapType::iterator i = pMap.find(other); if (i != pMap.end()) { - if (handler.add(set, *(i->second))) - { - break; - } + handler.add(set, *(i->second)); } } break; @@ -344,24 +308,21 @@ void Sets::rebuildFromRules(const IDType& id, HandlerT& handler) case ruleRemove: { // Trying to remove a single item - if (!handler.remove(set, arg)) + if (!handler.remove(set, name)) { // Failed. Maybe the argument references another group - const IDType other = arg; - typename MapType::iterator i = pMap.find(other); + const IDType other = name; + MapType::iterator i = pMap.find(other); if (i != pMap.end()) { - if (handler.remove(set, *(i->second))) - { - break; - } + handler.remove(set, *(i->second)); } } break; } case ruleFilter: { - handler.applyFilter(set, arg); + handler.applyFilter(set, name); break; } case ruleNone: @@ -379,85 +340,125 @@ void Sets::rebuildFromRules(const IDType& id, HandlerT& handler) << " rules, got " << opts.resultSize << " items"; } -template -void Sets::rebuildIndexes() +void Sets::rebuildIndexes() { pNameByIndex.clear(); + pNameByIndex.resize(pMap.size()); + pByIndex.clear(); + pByIndex.resize(pMap.size()); - if (!pMap.empty()) + uint index = 0; + for (const auto& [setId, set]: pMap) { - pByIndex.resize(pMap.size()); - pNameByIndex.resize(pMap.size()); - const typename MapType::iterator end = pMap.end(); - uint index = 0; - for (typename MapType::iterator i = pMap.begin(); i != end; ++i) - { - pByIndex[index] = i->second; - pNameByIndex[index] = i->first; - ++index; - } + pByIndex[index] = set; + pNameByIndex[index] = setId; + ++index; } } -template -template -inline bool Sets::hasOutput(const StringT& s) const +bool Sets::hasOutput(const Yuni::ShortString128& s) const { - // Assert, if a C* container can not be found at compile time - static_assert(Yuni::Traits::CString::valid); - - typename MapOptions::const_iterator i = pOptions.find(s); - return (i != pOptions.end()) ? i->second.output : false; + const auto pair = pOptions.find(s); + return (pair != pOptions.end()) ? pair->second.output : false; } -template -inline bool Sets::hasOutput(const uint index) const +bool Sets::hasOutput(const uint index) const { return hasOutput(IDType(pNameByIndex[index])); } -template -template -inline uint Sets::resultSize(const StringT& s) const +uint Sets::resultSize(const Yuni::ShortString128& s) const { - // Assert, if a C* container can not be found at compile time - static_assert(Yuni::Traits::CString::valid); - - typename MapOptions::const_iterator i = pOptions.find(s); - return (i != pOptions.end()) ? i->second.resultSize : 0; + const auto pair = pOptions.find(s); + return (pair != pOptions.end()) ? pair->second.resultSize : 0; } -template -template -inline typename Sets::IDType Sets::caption(const StringT& s) const +Sets::IDType Sets::caption(const Yuni::ShortString128& s) const { - // Assert, if a C* container can not be found at compile time - static_assert(Yuni::Traits::CString::valid); - - typename MapOptions::const_iterator i = pOptions.find(s); - return (i != pOptions.end()) ? i->second.caption : IDType(); + const auto pair = pOptions.find(s); + return (pair != pOptions.end()) ? pair->second.caption : IDType(); } -template -inline typename Sets::IDType Sets::caption(const uint i) const +Sets::IDType Sets::caption(const uint i) const { return caption(IDType(pNameByIndex[i])); } -template -inline uint Sets::resultSize(const uint index) const +uint Sets::resultSize(const uint index) const { return resultSize(IDType(pNameByIndex[index])); } -template -inline uint Sets::size() const +uint Sets::size() const { return (uint)pMap.size(); } -} // namespace Data -} // namespace Antares +SetHandlerAreas::SetHandlerAreas(AreaList& areas): + areas_(areas) +{ +} + +void SetHandlerAreas::clear(Sets::SetAreasType& set) +{ + set.clear(); +} + +uint SetHandlerAreas::size(Sets::SetAreasType& set) +{ + return (uint)set.size(); +} + +bool SetHandlerAreas::add(Sets::SetAreasType& set, const std::string& value) +{ + Area* area = AreaListLFind(&areas_, value.c_str()); + if (area) + { + set.insert(area); + return true; + } + return false; +} + +void SetHandlerAreas::add(Sets::SetAreasType& set, const Sets::SetAreasType& otherSet) +{ + set.insert(otherSet.begin(), otherSet.end()); +} + +bool SetHandlerAreas::remove(Sets::SetAreasType& set, const std::string& value) +{ + Area* area = AreaListLFind(&areas_, value.c_str()); + if (area) + { + set.erase(area); + return true; + } + return false; +} + +void SetHandlerAreas::remove(Sets::SetAreasType& set, const Sets::SetAreasType& otherSet) +{ + std::ranges::for_each(otherSet, [&set](auto* area) { set.erase(area); }); +} + +bool SetHandlerAreas::applyFilter(Sets::SetAreasType& set, const std::string& value) +{ + if (value == "add-all") + { + for (const auto& [areaName, area]: areas_) + { + set.insert(area); + } + return true; + } + + if (value == "remove-all") + { + set.clear(); + return true; + } + return false; +} -#endif // __ANTARES_LIBS_STUDY_SETS_HXX__ +} // namespace Antares::Data diff --git a/src/libs/antares/study/include/antares/study/sets.h b/src/libs/antares/study/include/antares/study/sets.h index 414847af2f..3932c99372 100644 --- a/src/libs/antares/study/include/antares/study/sets.h +++ b/src/libs/antares/study/include/antares/study/sets.h @@ -18,8 +18,7 @@ ** You should have received a copy of the Mozilla Public Licence 2.0 ** along with Antares_Simulator. If not, see . */ -#ifndef __ANTARES_LIBS_STUDY_SETS_H__ -#define __ANTARES_LIBS_STUDY_SETS_H__ +#pragma once #include #include @@ -31,29 +30,32 @@ #include #include +#include "antares/study/area/area.h" -namespace Antares +namespace Antares::Data { -namespace Data -{ -template +class SetHandlerAreas; + class Sets final { public: - //! Type - using Type = T; - // - using IDType = Yuni::CString<128, false>; + using IDType = Yuni::ShortString128; + + //! A single set of areas + // CompareAreaName : to control the order of areas in a set of areas. This order can have an + // effect, even if tiny, on the results of aggregations. + using SetAreasType = std::set; + //! Value - using TypePtr = std::shared_ptr; + using TypePtr = std::shared_ptr; //! Map of Item using MapType = std::map; //! Standard iterators from the STL - using iterator = typename MapType::iterator; + using iterator = MapType::iterator; //! Standard iterators from the STL (const) - using const_iterator = typename MapType::const_iterator; + using const_iterator = MapType::const_iterator; enum RuleType { @@ -65,7 +67,7 @@ class Sets final }; //! Definition of a single rule - using Rule = std::pair; + using Rule = std::pair; //! Rule Set using RuleSet = std::vector; @@ -128,7 +130,7 @@ class Sets final /*! ** \brief Default constructor */ - Sets(); + Sets() = default; /*! ** \brief Copy constructor */ @@ -150,37 +152,6 @@ class Sets final */ void clear(); - /*! - ** - */ - TypePtr add(const IDType& name) - { - TypePtr p = std::make_shared(); - pMap[name] = p; - pOptions[name].reset(name); - return p; - } - - /*! - ** - */ - TypePtr add(const IDType& name, const TypePtr& data) - { - pMap[name] = data; - pOptions[name].reset(name); - return data; - } - - /*! - ** - */ - TypePtr add(const IDType& name, const TypePtr& data, Options& opts) - { - pMap[name] = data; - pOptions[name] = opts; - return data; - } - bool forceReload(bool /*reload*/) const { pModified = true; @@ -194,13 +165,10 @@ class Sets final uint size() const; - void rebuildIndexes(); - /*! ** \brief Get if the results for a given group should be written to the output */ - template - bool hasOutput(const StringT& s) const; + bool hasOutput(const Yuni::ShortString128& s) const; /*! ** \brief Get if the results for a given group should be written to the output @@ -210,24 +178,21 @@ class Sets final /*! ** \brief Get the size of a result set */ - template - uint resultSize(const StringT& s) const; + uint resultSize(const Yuni::ShortString128& s) const; /*! ** \brief Get the size of a result set */ uint resultSize(const uint index) const; - template - void dumpToLogs(L& log) const; + void dumpToLogs() const; /*! ** \brief Load a rule set from an INI File */ bool loadFromFile(const std::filesystem::path& filename); - template - bool saveToFile(const StringT& filename) const; + bool saveToFile(const Yuni::String& filename) const; /*! ** \brief format the string to match the options */ @@ -238,17 +203,10 @@ class Sets final */ void defaultForAreas(); - /*! - ** \brief Rebuild the lists of a group from the rules - */ - template - void rebuildFromRules(const IDType& id, HandlerT& handler); - /*! ** \brief Rebuild the lists of all group from the rules */ - template - void rebuildAllFromRules(HandlerT& handler); + void rebuildAllFromRules(SetHandlerAreas& handler); const IDType& nameByIndex(const uint i) const { @@ -256,28 +214,65 @@ class Sets final return pNameByIndex[i]; } - template - IDType caption(const StringT& s) const; - + IDType caption(const Yuni::ShortString128& s) const; IDType caption(const uint i) const; - T& operator[](uint i); - const T& operator[](uint i) const; + SetAreasType& operator[](uint i); + const SetAreasType& operator[](uint i) const; private: + TypePtr add(const IDType& name) + { + TypePtr p = std::make_shared(); + pMap[name] = p; + pOptions[name].reset(name); + return p; + } + + TypePtr add(const IDType& name, const TypePtr& data) + { + pMap[name] = data; + pOptions[name].reset(name); + return data; + } + + TypePtr add(const IDType& name, const TypePtr& data, Options& opts) + { + pMap[name] = data; + pOptions[name] = opts; + return data; + } + + /*! + ** \brief Rebuild the lists of a group from the rules + */ + void rebuildFromRules(const IDType& id, SetHandlerAreas& handler); + void rebuildIndexes(); + //! All groups MapType pMap; MapOptions pOptions; //! std::vector pByIndex; std::vector pNameByIndex; - mutable bool pModified; - + mutable bool pModified = false; }; // class Sets -} // namespace Data -} // namespace Antares +class SetHandlerAreas +{ +public: + explicit SetHandlerAreas(AreaList& areas); + void clear(Sets::SetAreasType& set); + uint size(Sets::SetAreasType& set); -#include "sets.hxx" + bool add(Sets::SetAreasType& set, const std::string& value); + void add(Sets::SetAreasType& set, const Sets::SetAreasType& otherSet); + bool remove(Sets::SetAreasType& set, const std::string& value); + void remove(Sets::SetAreasType& set, const Sets::SetAreasType& otherSet); + bool applyFilter(Sets::SetAreasType& set, const std::string& value); + +private: + AreaList& areas_; +}; // class SetHandlerAreas -#endif // __ANTARES_LIBS_STUDY_SETS_H__ +} // namespace Antares::Data diff --git a/src/libs/antares/study/include/antares/study/study.h b/src/libs/antares/study/include/antares/study/study.h index d558a89213..0a7dd0eb31 100644 --- a/src/libs/antares/study/include/antares/study/study.h +++ b/src/libs/antares/study/include/antares/study/study.h @@ -66,25 +66,8 @@ class Study: public Yuni::NonCopyable, public LayerData //! List of studies using List = std::list; - //! A single set of areas - // CompareAreaName : to control the order of areas in a set of areas. This order can have an - // effect, even if tiny, on the results of aggregations. - using SingleSetOfAreas = std::set; - //! Multiple sets of areas - using SetsOfAreas = Antares::Data::Sets; - - //! A single set of links - using SingleSetOfLinks = std::set; - //! Multiple sets of links - using SetsOfLinks = Antares::Data::Sets; - - //! List of disabled areas - using DisabledAreaList = std::set; - //! List of disabled links - using DisabledAreaLinkList = std::set; - //! List of disabled thermal clusters - using DisabledThermalClusterList = std::set; + using SetsOfAreas = Antares::Data::Sets; //! Extension filename using FileExtension = std::string; @@ -573,8 +556,6 @@ class Study: public Yuni::NonCopyable, public LayerData //@{ //! Sets of areas SetsOfAreas setsOfAreas; - //! Sets of links - SetsOfLinks setsOfLinks; //@} //! \name Scenario Builder diff --git a/src/libs/antares/study/load.cpp b/src/libs/antares/study/load.cpp index 749d0d81ff..626cb3564d 100644 --- a/src/libs/antares/study/load.cpp +++ b/src/libs/antares/study/load.cpp @@ -289,97 +289,6 @@ bool Study::internalLoadBindingConstraints(const StudyLoadOptions& options) return (!r && options.loadOnlyNeeded) ? false : r; } -class SetHandlerAreas -{ -public: - explicit SetHandlerAreas(Study& study): - pStudy(study) - { - } - - void clear(Study::SingleSetOfAreas& set) - { - set.clear(); - } - - uint size(Study::SingleSetOfAreas& set) - { - return (uint)set.size(); - } - - bool add(Study::SingleSetOfAreas& set, const String& value) - { - Area* area = AreaListLFind(&pStudy.areas, value.c_str()); - if (area) - { - set.insert(area); - return true; - } - return false; - } - - bool add(Study::SingleSetOfAreas& set, const Study::SingleSetOfAreas& otherSet) - { - if (!otherSet.empty()) - { - auto end = otherSet.end(); - for (auto i = otherSet.begin(); i != end; ++i) - { - set.insert(*i); - } - } - return true; - } - - bool remove(Study::SingleSetOfAreas& set, const String& value) - { - Area* area = AreaListLFind(&pStudy.areas, value.c_str()); - if (area) - { - set.erase(area); - return true; - } - return false; - } - - bool remove(Study::SingleSetOfAreas& set, const Study::SingleSetOfAreas& otherSet) - { - if (!otherSet.empty()) - { - auto end = otherSet.end(); - for (auto i = otherSet.begin(); i != end; ++i) - { - set.erase(*i); - } - } - return true; - } - - bool applyFilter(Study::SingleSetOfAreas& set, const String& value) - { - if (value == "add-all") - { - auto end = pStudy.areas.end(); - for (auto i = pStudy.areas.begin(); i != end; ++i) - { - set.insert(i->second); - } - return true; - } - - if (value == "remove-all") - { - set.clear(); - return true; - } - return false; - } - -private: - Study& pStudy; - -}; // class SetHandlerAreas - bool Study::internalLoadSets() { const fs::path path = fs::path(folderInput.c_str()) / "areas" / "sets.ini"; @@ -394,10 +303,10 @@ bool Study::internalLoadSets() if (setsOfAreas.loadFromFile(path)) { // Apply the rules - SetHandlerAreas handler(*this); + SetHandlerAreas handler(areas); setsOfAreas.rebuildAllFromRules(handler); // Write the results into the logs - setsOfAreas.dumpToLogs(logs); + setsOfAreas.dumpToLogs(); return true; } @@ -417,7 +326,7 @@ bool Study::reloadXCastData() // if changes are required, please update AreaListLoadFromFolderSingleArea() bool ret = true; areas.each( - [this, &ret](Data::Area& area) + [this, &ret](Area& area) { assert(area.load.prepro); assert(area.solar.prepro); diff --git a/src/libs/antares/study/study.cpp b/src/libs/antares/study/study.cpp index 111330e07b..67206dad70 100644 --- a/src/libs/antares/study/study.cpp +++ b/src/libs/antares/study/study.cpp @@ -110,7 +110,6 @@ void Study::clear() // areas setsOfAreas.clear(); - setsOfLinks.clear(); preproLoadCorrelation.clear(); preproSolarCorrelation.clear(); @@ -150,9 +149,7 @@ void Study::createAsNew() // Sets setsOfAreas.defaultForAreas(); - setsOfLinks.clear(); setsOfAreas.markAsModified(); - setsOfLinks.markAsModified(); // Binding constraints bindingConstraints.clear(); @@ -1171,7 +1168,6 @@ bool Study::forceReload(bool reload) const ret = preproHydroCorrelation.forceReload(reload) and ret; ret = setsOfAreas.forceReload(reload) and ret; - ret = setsOfLinks.forceReload(reload) and ret; return ret; } @@ -1187,7 +1183,6 @@ void Study::markAsModified() const bindingConstraints.markAsModified(); setsOfAreas.markAsModified(); - setsOfLinks.markAsModified(); } void Study::relocate(const std::string& newFolder) diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.h b/src/solver/variable/include/antares/solver/variable/setofareas.h index d2444df247..1263b986f3 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.h +++ b/src/solver/variable/include/antares/solver/variable/setofareas.h @@ -204,7 +204,7 @@ class SetsOfAreas //! Area list SetOfAreasVector pSetsOfAreas; //! Reference to the origina set - std::vector pOriginalSets; + std::vector pOriginalSets; //! An iterator for the begining of the list typename SetOfAreasVector::iterator pBegin; //! An iterator to the end of the list