xoreos  0.0.5
Public Member Functions | List of all members
Common::PtrMap< Key, T, Compare, Deallocator > Class Template Reference

A map of pointer to objects, with automatic deletion. More...

#include <ptrmap.h>

Inheritance diagram for Common::PtrMap< Key, T, Compare, Deallocator >:
Inheritance graph
[legend]
Collaboration diagram for Common::PtrMap< Key, T, Compare, Deallocator >:
Collaboration graph
[legend]

Public Member Functions

 ~PtrMap ()
 
void clear ()
 
void erase (typename std::map< Key, T *, Compare >::iterator position)
 
std::map< Key, T *, Compare >::size_type erase (const typename std::map< Key, T *, Compare >::key_type &k)
 
void erase (typename std::map< Key, T *, Compare >::iterator first, typename std::map< Key, T *, Compare >::iterator last)
 

Detailed Description

template<typename Key, typename T, class Compare = std::less<Key>, class Deallocator = DeallocatorDefault>
class Common::PtrMap< Key, T, Compare, Deallocator >

A map of pointer to objects, with automatic deletion.

A PtrMap expects to hold sole ownership of its contents.

Definition at line 42 of file ptrmap.h.

Constructor & Destructor Documentation

◆ ~PtrMap()

template<typename Key, typename T, class Compare = std::less<Key>, class Deallocator = DeallocatorDefault>
Common::PtrMap< Key, T, Compare, Deallocator >::~PtrMap ( )
inline

Definition at line 44 of file ptrmap.h.

Member Function Documentation

◆ clear()

template<typename Key, typename T, class Compare = std::less<Key>, class Deallocator = DeallocatorDefault>
void Common::PtrMap< Key, T, Compare, Deallocator >::clear ( )
inline

◆ erase() [1/3]

template<typename Key, typename T, class Compare = std::less<Key>, class Deallocator = DeallocatorDefault>
void Common::PtrMap< Key, T, Compare, Deallocator >::erase ( typename std::map< Key, T *, Compare >::iterator  position)
inline

◆ erase() [2/3]

template<typename Key, typename T, class Compare = std::less<Key>, class Deallocator = DeallocatorDefault>
std::map<Key, T *, Compare>::size_type Common::PtrMap< Key, T, Compare, Deallocator >::erase ( const typename std::map< Key, T *, Compare >::key_type &  k)
inline

Definition at line 62 of file ptrmap.h.

◆ erase() [3/3]

template<typename Key, typename T, class Compare = std::less<Key>, class Deallocator = DeallocatorDefault>
void Common::PtrMap< Key, T, Compare, Deallocator >::erase ( typename std::map< Key, T *, Compare >::iterator  first,
typename std::map< Key, T *, Compare >::iterator  last 
)
inline

Definition at line 72 of file ptrmap.h.


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