Auto deletes pointers in list destructor This object assumes ownership for member pointers Creates copies of members instead of copies of pointers to members. More...
#include <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. | |
PointerList & | operator= (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. |
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.
typedef std::vector<T*>::const_iterator prophet::PointerList< T >::const_iterator |
Definition at line 36 of file PointerList.h.
typedef std::vector<T*>::iterator prophet::PointerList< T >::iterator |
Definition at line 35 of file PointerList.h.
typedef std::vector<T*> prophet::PointerList< T >::List |
Definition at line 34 of file PointerList.h.
prophet::PointerList< T >::PointerList | ( | ) | [inline] |
Default constructor.
Definition at line 41 of file PointerList.h.
prophet::PointerList< T >::PointerList | ( | const PointerList< T > & | a | ) | [inline] |
Copy constructor.
Definition at line 47 of file PointerList.h.
virtual prophet::PointerList< T >::~PointerList | ( | ) | [inline, virtual] |
Destructor.
Definition at line 57 of file PointerList.h.
void prophet::PointerList< T >::clear | ( | ) | [inline] |
Delete all member variables, then remove pointers from container.
Definition at line 85 of file PointerList.h.
Referenced by prophet::PointerList< RIBNode >::clear(), prophet::BundleEntryList< BundleOfferEntry >::clear(), prophet::Table::clone(), prophet::PointerList< RIBNode >::operator=(), prophet::PointerList< RIBNode >::PointerList(), prophet::BundleEntryList< BundleOfferEntry >::~BundleEntryList(), and prophet::PointerList< RIBNode >::~PointerList().
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< RIBNode >::operator=(), and prophet::PointerList< RIBNode >::PointerList().
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::PointerList< RIBNode >::erase(), and prophet::BundleEntryList< BundleOfferEntry >::remove_entry().
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< RIBNode >::clear().
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.