KCal Library
KCal::ListBase< T > Class Template Reference
#include <listbase.h>
Inherits QList.
Detailed Description
template<class T>
class KCal::ListBase< T >
This class provides a template for lists of pointers.
It extends QList<T *> with an "auto-delete" functionality.
Definition at line 44 of file listbase.h.
Public Member Functions | |
ListBase () | |
ListBase (const ListBase &other) | |
~ListBase () | |
ListBase & | operator= (const ListBase &l) |
void | setAutoDelete (bool autoDelete) |
bool | removeRef (T *t) |
Constructor & Destructor Documentation
template<class T>
KCal::ListBase< T >::ListBase | ( | ) | [inline] |
template<class T>
KCal::ListBase< T >::ListBase | ( | const ListBase< T > & | other | ) | [inline] |
Copy constructor.
- Parameters:
-
other is the ListBase to copy.
Definition at line 59 of file listbase.h.
template<class T>
KCal::ListBase< T >::~ListBase | ( | ) | [inline] |
Member Function Documentation
template<class T>
ListBase& KCal::ListBase< T >::operator= | ( | const ListBase< T > & | l | ) | [inline] |
Assigns l
to this listbase.
- Parameters:
-
l is the ListBase to copy.
Definition at line 81 of file listbase.h.
template<class T>
void KCal::ListBase< T >::setAutoDelete | ( | bool | autoDelete | ) | [inline] |
Sets this list to operate in "auto-delete" mode.
This mode deletes the memory pointed at by all members of the list in the destructor.
- Parameters:
-
autoDelete if true, puts the list into "auto-delete" mode.
Definition at line 96 of file listbase.h.
template<class T>
bool KCal::ListBase< T >::removeRef | ( | T * | t | ) | [inline] |
Removes all the members from the list with the specified address.
Memory is also freed if the list is set to "auto-delete" mode.
- Parameters:
-
t is the pointer to remove from the list.
- Returns:
- true if successful; otherwise false (no such address
t
found).
Definition at line 107 of file listbase.h.
The documentation for this class was generated from the following file: