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

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

#include <ptrlist.h>

Inheritance diagram for Common::PtrList< T, Deallocator >:
Inheritance graph
[legend]
Collaboration diagram for Common::PtrList< T, Deallocator >:
Collaboration graph
[legend]

Public Member Functions

 ~PtrList ()
 
void clear ()
 
void pop_front ()
 
void pop_back ()
 
std::list< T * >::iterator erase (typename std::list< T *>::iterator position)
 
std::list< T * >::iterator erase (typename std::list< T *>::iterator first, typename std::list< T *>::iterator last)
 
void resize (typename std::list< T *>::size_type n, typename std::list< T *>::value_type val=typename std::list< T *>::value_type())
 
void remove (const typename std::list< T *>::value_type &val)
 
template<class Predicate >
void remove_if (Predicate pred)
 
template<class InputIterator >
void assign (InputIterator first, InputIterator last)
 
void assign (typename std::list< T *>::size_type n, const typename std::list< T *>::value_type &val)
 

Detailed Description

template<typename T, class Deallocator = DeallocatorDefault>
class Common::PtrList< T, Deallocator >

A list of pointer to objects, with automatic deletion.

A PtrList expects to hold sole ownership of its contents.

Definition at line 41 of file ptrlist.h.

Constructor & Destructor Documentation

◆ ~PtrList()

template<typename T, class Deallocator = DeallocatorDefault>
Common::PtrList< T, Deallocator >::~PtrList ( )
inline

Definition at line 43 of file ptrlist.h.

Member Function Documentation

◆ assign() [1/2]

template<typename T, class Deallocator = DeallocatorDefault>
template<class InputIterator >
void Common::PtrList< T, Deallocator >::assign ( InputIterator  first,
InputIterator  last 
)
inline

Definition at line 114 of file ptrlist.h.

◆ assign() [2/2]

template<typename T, class Deallocator = DeallocatorDefault>
void Common::PtrList< T, Deallocator >::assign ( typename std::list< T *>::size_type  n,
const typename std::list< T *>::value_type &  val 
)
inline

Definition at line 119 of file ptrlist.h.

◆ clear()

template<typename T, class Deallocator = DeallocatorDefault>
void Common::PtrList< T, Deallocator >::clear ( )
inline

◆ erase() [1/2]

template<typename T, class Deallocator = DeallocatorDefault>
std::list<T *>::iterator Common::PtrList< T, Deallocator >::erase ( typename std::list< T *>::iterator  position)
inline

Definition at line 64 of file ptrlist.h.

Referenced by Common::PtrList< const XMLNode >::remove(), and Common::PtrList< const XMLNode >::remove_if().

Here is the caller graph for this function:

◆ erase() [2/2]

template<typename T, class Deallocator = DeallocatorDefault>
std::list<T *>::iterator Common::PtrList< T, Deallocator >::erase ( typename std::list< T *>::iterator  first,
typename std::list< T *>::iterator  last 
)
inline

Definition at line 69 of file ptrlist.h.

◆ pop_back()

template<typename T, class Deallocator = DeallocatorDefault>
void Common::PtrList< T, Deallocator >::pop_back ( )
inline

Definition at line 59 of file ptrlist.h.

Referenced by Common::PtrList< const XMLNode >::resize().

Here is the caller graph for this function:

◆ pop_front()

template<typename T, class Deallocator = DeallocatorDefault>
void Common::PtrList< T, Deallocator >::pop_front ( )
inline

Definition at line 54 of file ptrlist.h.

◆ remove()

template<typename T, class Deallocator = DeallocatorDefault>
void Common::PtrList< T, Deallocator >::remove ( const typename std::list< T *>::value_type &  val)
inline

Definition at line 94 of file ptrlist.h.

Referenced by Common::ConfigFile::removeDomain(), and Engines::KotOR::Area::removeObject().

Here is the caller graph for this function:

◆ remove_if()

template<typename T, class Deallocator = DeallocatorDefault>
template<class Predicate >
void Common::PtrList< T, Deallocator >::remove_if ( Predicate  pred)
inline

Definition at line 104 of file ptrlist.h.

Referenced by Events::RequestManager::collectGarbage().

Here is the caller graph for this function:

◆ resize()

template<typename T, class Deallocator = DeallocatorDefault>
void Common::PtrList< T, Deallocator >::resize ( typename std::list< T *>::size_type  n,
typename std::list< T *>::value_type  val = typename std::list<T *>::value_type() 
)
inline

Definition at line 78 of file ptrlist.h.


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