openPMD-api
|
This class wraps a Container and forwards operator[]() and at() to it. More...
#include <Container.hpp>
Public Member Functions | |
EraseStaleEntries (Container &container_in) | |
template<typename K > | |
mapped_type & | operator[] (K &&k) |
template<typename K > | |
mapped_type & | at (K &&k) |
template<typename K > | |
void | forget (K &&k) |
Remove key from the list of accessed keys. More... | |
This class wraps a Container and forwards operator[]() and at() to it.
It remembers the keys used for accessing. Upon going out of scope, all keys not yet accessed are removed from the Container. Note that the container is stored by non-owning reference, thus requiring that the original Container stay in scope while using this class.
|
inline |
Remove key from the list of accessed keys.
If the key is not accessed after this again, it will be deleted along with all other unaccessed keys upon destruction.