27#ifndef STAGE_CTRL_STATE_MAP_GROUPING_STORAGE_H
28#define STAGE_CTRL_STATE_MAP_GROUPING_STORAGE_H
37#include <unordered_map>
48 using ::util::unConst;
68 using StateData = std::set<GenNode, GenNode::IDComparator>;
69 using Storage = std::unordered_map<BareEntryID, StateData, BareEntryID::UseEmbeddedHash>;
88 siz += entry.second.size();
110 return getState (*entry, propertyKey);
121 auto res =
elmTable_[elementID].emplace (stateMark);
123 unConst(*res.first) = stateMark;
133 StateData const& stateSet = entry->second;
134 auto propertyRecord =
findProperty(stateSet, propertyKey);
136 if (propertyRecord != stateSet.end())
137 unConst(stateSet).erase (propertyRecord);
192 StateData const& stateSet = entry.second;
193 StateData::const_iterator propertyRecord =
findProperty (stateSet, propertyKey);
195 if (propertyRecord == stateSet.end())
198 return *propertyRecord;
202 static StateData::const_iterator
205 return std::find_if (stateSet.begin()
209 return propertyKey == stateMark.idi.getSym();
type erased baseclass for building a combined hash and symbolic ID.
Map storage for captured presentation state information.
void clearState(BareEntryID const &elementID)
clear any previously recorded state for a given element
std::unordered_map< BareEntryID, StateData, BareEntryID::UseEmbeddedHash > Storage
Storage::const_iterator iterator
std::set< GenNode, GenNode::IDComparator > StateData
Storage::value_type Record
static StateData const & getState(Record const &entry)
void clearProperty(BareEntryID const &elementID, string propertyKey)
clear previously recorded state for a given element and specific property
static BareEntryID const & getID(Record const &entry)
static StateData::const_iterator findProperty(StateData const &stateSet, string propertyKey)
static GenNode const & getState(Record const &entry, string propertyKey)
Access the recorded state mark, if any.
void record(BareEntryID const &elementID, GenNode const &stateMark)
remember the state mark for the denoted element
GenNode const & retrieve(BareEntryID const &elementID, string propertyKey) const
retrieve captured state
iterator find(BareEntryID const &elementID) const
Any copy and copy construction prohibited.
Bare symbolic and hash ID used for accounting of asset like entries.
Lumiera error handling (C++ interface).
Generic building block for tree shaped (meta)data structures.
Lumiera GTK UI implementation root.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
generic data element node within a tree
Constructor for a specially crafted 'ref GenNode'.
static const Ref NO
symbolic ID ref "_NO_"
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...