factory and storage for a set of objects More...
#include <object_set.hpp>
Classes | |
class | Iterator |
translates internal map's iterator to return Object* instead of pair More... | |
Public Types | |
typedef Iterator< typename MapType::iterator > | iterator |
typedef Iterator< typename MapType::const_iterator > | const_iterator |
Public Member Functions | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
std::pair< iterator, bool > | insert (const Key &key) |
iterator | find (const Key &key) |
const_iterator | find (const Key &key) const |
void | erase (const Key &key) |
size_t | size () const |
factory and storage for a set of objects
A set that allocates and deletes the objects it contains, storing them as pointers and providing access to them via a Key type. The Object class must have a constructor that takes Key as the argument.
ObjectSet is intended for when you have a collection of objects that you want ti to store and lookup using a key and you want to avoid copying the objects.