MythTV
master
|
General purpose reference counted list. More...
#include <referencecounterlist.h>
Public Member Functions | |
T * | takeAt (int i) |
Removes the item at index position i and returns it. More... | |
T * | takeFirst (void) |
Removes the first item in the list and returns it. More... | |
T * | takeLast (void) |
Removes the last item in the list and returns it. More... | |
RefCountHandler< T > | takeAtAndDecr (int i) |
Removes the item at index position i and returns it. More... | |
RefCountHandler< T > | takeFirstAndDecr (void) |
Removes the first item in the list and returns it. More... | |
RefCountHandler< T > | takeLastAndDecr (void) |
Removes the last item in the list and returns it. More... | |
RefCountedList< T > | mid (int pos, int length=-1) const |
RefCountedList< T > | operator+ (const RefCountedList< T > &other) const |
RefCountedList< T > & | operator+= (const RefCountedList< T > &other) |
RefCountedList< T > & | operator+= (const RefCountHandler< T > &value) |
RefCountedList< T > & | operator<< (const RefCountedList< T > &other) |
RefCountedList< T > & | operator<< (const RefCountHandler< T > &value) |
RefCountedList< T > & | operator= (const RefCountedList< T > &other) |
RefCountedList ()=default | |
RefCountedList (const RefCountedList< T > &)=default | |
General purpose reference counted list.
T typename must be a ReferenceCounter inheriting object provide the same access methods as a QList
Definition at line 55 of file referencecounterlist.h.
|
default |
|
default |
|
inline |
Removes the item at index position i and returns it.
i must be a valid index position in the list (i.e., 0 <= i < size()). takeAt takes ownership of the object from the list. (e.g if the object only exists in the list, it won't be deleted)
Definition at line 64 of file referencecounterlist.h.
Referenced by RefCountedList< MetadataLookup >::takeAt(), and RefCountedList< MetadataLookup >::takeAtAndDecr().
|
inline |
Removes the first item in the list and returns it.
This is the same as takeAt(0). This function assumes the list is not empty. To avoid failure, call isEmpty() before calling this function. takeFirst takes ownership of the object from the list. (e.g if the object only exists in the list, it won't be deleted)
Definition at line 78 of file referencecounterlist.h.
Referenced by MetadataResultsDialog::Create(), MetadataDownload::run(), RefCountedList< MetadataLookup >::takeFirst(), and RefCountedList< MetadataLookup >::takeFirstAndDecr().
|
inline |
Removes the last item in the list and returns it.
This is the same as takeAt(size() - 1). This function assumes the list is not empty. To avoid failure, call isEmpty() before calling this function. takeFirst takes ownership of the object from the list. (e.g if the object only exists in the list, it won't be deleted)
Definition at line 92 of file referencecounterlist.h.
Referenced by RefCountedList< MetadataLookup >::takeLast(), and RefCountedList< MetadataLookup >::takeLastAndDecr().
|
inline |
Removes the item at index position i and returns it.
i must be a valid index position in the list (i.e., 0 <= i < size()).
Definition at line 102 of file referencecounterlist.h.
Referenced by MetadataResultsDialog::sendResult().
|
inline |
Removes the first item in the list and returns it.
This is the same as takeAtAndDecr(0). This function assumes the list is not empty. To avoid failure, call isEmpty() before calling this function.
Definition at line 112 of file referencecounterlist.h.
Referenced by MetadataDownload::run(), and MetadataImageDownload::run().
|
inline |
Removes the last item in the list and returns it.
This is the same as takeAtAndDecr(size() - 1). This function assumes the list is not empty. To avoid failure, call isEmpty() before calling this function.
Definition at line 122 of file referencecounterlist.h.
|
inline |
Definition at line 126 of file referencecounterlist.h.
|
inline |
Definition at line 147 of file referencecounterlist.h.
|
inline |
Definition at line 153 of file referencecounterlist.h.
|
inline |
Definition at line 158 of file referencecounterlist.h.
|
inline |
Definition at line 163 of file referencecounterlist.h.
|
inline |
Definition at line 168 of file referencecounterlist.h.
|
inline |
Definition at line 179 of file referencecounterlist.h.