prophet::PointerList< T > Class Template Reference

#include <PointerList.h>

List of all members.


Detailed Description

template<class T>
class prophet::PointerList< T >

Auto deletes pointers in list destructor This object assumes ownership for member pointers Creates copies of members instead of copies of pointers to members.

Definition at line 31 of file PointerList.h.


Public Types

typedef std::vector< T * > List
typedef std::vector< T * >
::iterator 
iterator
typedef std::vector< T * >
::const_iterator 
const_iterator

Public Member Functions

 PointerList ()
 Default constructor.
 PointerList (const PointerList &a)
 Copy constructor.
virtual ~PointerList ()
 Destructor.
PointerListoperator= (const PointerList &a)
 Assignment operator creates deep copy, not pointer copy.
void erase (iterator i)
 Deletes member pointed to by iterator, then removes pointer.
void clear ()
 Delete all member variables, then remove pointers from container.

Protected Member Functions

void free ()
 Free memory pointed to by member variables.
void copy_from (const PointerList &a)
 Utility function to perform deep copy from peer object.

Member Typedef Documentation

template<class T>
typedef std::vector<T*> prophet::PointerList< T >::List

Definition at line 34 of file PointerList.h.

template<class T>
typedef std::vector<T*>::iterator prophet::PointerList< T >::iterator

Definition at line 35 of file PointerList.h.

template<class T>
typedef std::vector<T*>::const_iterator prophet::PointerList< T >::const_iterator

Definition at line 36 of file PointerList.h.


Constructor & Destructor Documentation

template<class T>
prophet::PointerList< T >::PointerList (  )  [inline]

Default constructor.

Definition at line 41 of file PointerList.h.

template<class T>
prophet::PointerList< T >::PointerList ( const PointerList< T > &  a  )  [inline]

Copy constructor.

Definition at line 47 of file PointerList.h.

template<class T>
virtual prophet::PointerList< T >::~PointerList (  )  [inline, virtual]

Destructor.

Definition at line 57 of file PointerList.h.


Member Function Documentation

template<class T>
PointerList& prophet::PointerList< T >::operator= ( const PointerList< T > &  a  )  [inline]

Assignment operator creates deep copy, not pointer copy.

Definition at line 65 of file PointerList.h.

template<class T>
void prophet::PointerList< T >::erase ( iterator  i  )  [inline]

Deletes member pointed to by iterator, then removes pointer.

Definition at line 75 of file PointerList.h.

Referenced by prophet::BundleEntryList< prophet::BundleResponseEntry >::remove_entry().

template<class T>
void prophet::PointerList< T >::clear (  )  [inline]

template<class T>
void prophet::PointerList< T >::free (  )  [inline, protected]

Free memory pointed to by member variables.

Definition at line 95 of file PointerList.h.

Referenced by prophet::PointerList< prophet::BundleResponseEntry >::clear().

template<class T>
void prophet::PointerList< T >::copy_from ( const PointerList< T > &  a  )  [inline, protected]

Utility function to perform deep copy from peer object.

Definition at line 107 of file PointerList.h.

Referenced by prophet::PointerList< prophet::BundleResponseEntry >::operator=(), and prophet::PointerList< prophet::BundleResponseEntry >::PointerList().


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

Generated on Mon Jul 21 14:12:22 2008 for DTN Reference Implementation by  doxygen 1.5.6