I have a C ++ application whose data set in memory consists of a set of objects, each of which has an attached key / value. Objects and keys refer to int id, and values are always instances of one class. Key identifiers are unique in an object; object IDs are unique in a universe.
This is almost map<pair<int, int>, value>, except that I have an additional requirement that I can list the keys attached to a specific object. And all this should be transactional, so I can undo the changes if everything goes wrong.
All this puts me as a completely standard problem for which I can get ready-made code, but I could not find anything. Can anyone:
(a) tell me that this problem is actually called, so I know what to look for;
(b) suggest any code that I should pay attention to.
Note that I want this to be only a data store in memory, so NoSQL fits like Berkeley DB, doesn't fit --- I don't want to continue reading and writing value objects (which are moderately complex).
So far, I have found either simple approaches that do not perform transactions (for example, boost_multi_index, or even nested STL cards), or complex approaches using persistent storage, but there is nothing between them. I could implement my own transactional layer on top of the underlying repository, but honestly, I would prefer not to.
What am I missing?
: , , ; . , . , , boost:: multi_index_container. , , , - , , .
. , Google , , // (EAV).