9#ifndef MYTHTV_REFERENCECOUNTERLIST_H
10#define MYTHTV_REFERENCECOUNTERLIST_H
39 operator T *()
const {
return r; }
104 return QList<RefCountHandler<T> >
::takeAt(i);
124 return QList<RefCountHandler<T> >
::takeLast();
128 if (length < 0 || pos + length > this->size())
130 length = this->size() - pos;
132 if (pos == 0 && length == this->size())
141 for (
int i = pos; i < length; i++)
143 cpy.append(this->at(pos));
155 QList<RefCountHandler<T> >::operator+=(other);
160 QList<RefCountHandler<T> >::operator+=(value);
165 QList<RefCountHandler<T> >::operator<<(other);
170 QList<RefCountHandler<T> >::operator<<(value);
183 QList<RefCountHandler<T> >::operator=(other);
const T * operator*() const
const T * operator->() const
RefCountHandler & operator=(const RefCountHandler &other)
RefCountHandler(const RefCountHandler &other)
General purpose reference counted list.
RefCountHandler< T > takeFirstAndDecr(void)
Removes the first item in the list and returns it.
RefCountedList< T > operator+(const RefCountedList< T > &other) const
RefCountHandler< T > takeLastAndDecr(void)
Removes the last item in the list and returns it.
RefCountedList< T > & operator=(const RefCountedList< T > &other)
RefCountedList< T > mid(int pos, int length=-1) const
RefCountedList< T > & operator+=(const RefCountedList< T > &other)
RefCountedList< T > & operator+=(const RefCountHandler< T > &value)
RefCountHandler< T > takeAtAndDecr(int i)
Removes the item at index position i and returns it.
T * takeAt(int i)
Removes the item at index position i and returns it.
RefCountedList< T > & operator<<(const RefCountedList< T > &other)
T * takeFirst(void)
Removes the first item in the list and returns it.
RefCountedList(const RefCountedList &)=default
T * takeLast(void)
Removes the last item in the list and returns it.