Netwhere
 All Classes Pages
Classes | Public Types | Public Member Functions | List of all members
ObjectSet< Key, Object > Class Template Reference

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
 

Detailed Description

template<typename Key, typename Object>
class ObjectSet< Key, Object >

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.


The documentation for this class was generated from the following file: