Qt 4.8
|
#include <qlist.h>
Classes | |
struct | Data |
Public Types | |
enum | { DataHeaderSize = sizeof(Data) - sizeof(void *) } |
Public Functions | |
void ** | append (int n) |
void ** | append () |
void ** | append (const QListData &l) |
void ** | append2 (const QListData &l) |
void ** | at (int i) const |
void ** | begin () const |
Data * | detach (int alloc) |
Detaches the QListData by allocating new memory for a list which possibly has a different size than the copied one. More... | |
Data * | detach () |
Data * | detach2 () |
Detaches the QListData by reallocating new memory. More... | |
Data * | detach3 () |
Detaches the QListData by reallocating new memory. More... | |
Data * | detach_grow (int *i, int n) |
Detaches the QListData by allocating new memory for a list which will be bigger than the copied one and is expected to grow further. More... | |
void ** | end () const |
void ** | erase (void **xi) |
void ** | insert (int i) |
bool | isEmpty () const |
void | move (int from, int to) |
void ** | prepend () |
void | realloc (int alloc) |
void | remove (int i) |
void | remove (int i, int n) |
int | size () const |
Public Variables | |
Data * | d |
Static Public Variables | |
static Data | shared_null = { Q_BASIC_ATOMIC_INITIALIZER(1), 0, 0, 0, true, { 0 } } |
anonymous enum |
Enumerator | |
---|---|
DataHeaderSize |
Definition at line 78 of file qlist.h.
|
inline |
Definition at line 101 of file qlist.h.
Referenced by QList< QPostEvent >::mid(), and QList< QPostEvent >::operator+=().
QListData::Data * QListData::detach | ( | int | alloc | ) |
Detaches the QListData by allocating new memory for a list which possibly has a different size than the copied one.
Returns the old (shared) data, it is up to the caller to deref() and free() For the new data node_copy needs to be called.
Definition at line 182 of file qlist.cpp.
QListData::Data * QListData::detach | ( | ) |
Definition at line 119 of file qlist.cpp.
Referenced by detach3().
QListData::Data * QListData::detach2 | ( | ) |
Detaches the QListData by reallocating new memory.
Returns the old (shared) data, it is up to the caller to deref() and free() For the new data node_copy needs to be called.
Definition at line 151 of file qlist.cpp.
QListData::Data * QListData::detach3 | ( | ) |
QListData::Data * QListData::detach_grow | ( | int * | idx, |
int | num | ||
) |
Detaches the QListData by allocating new memory for a list which will be bigger than the copied one and is expected to grow further.
*idx is the desired insertion point and is clamped to the actual size of the list. num is the number of new elements to insert at the insertion point. Returns the old (shared) data, it is up to the caller to deref() and free(). For the new data node_copy needs to be called.
Definition at line 79 of file qlist.cpp.
|
inline |
Definition at line 102 of file qlist.h.
Referenced by QList< QPostEvent >::mid(), and QList< QPostEvent >::operator==().
void QListData::realloc | ( | int | alloc | ) |
Definition at line 218 of file qlist.cpp.
Referenced by append(), insert(), and prepend().
|
inline |
Definition at line 98 of file qlist.h.
Referenced by insert(), and QList< QPostEvent >::operator==().
Data* QListData::d |
|
static |
Definition at line 86 of file qlist.h.
Referenced by QList< QPostEvent >::detachShared(), and QList< QPostEvent >::swap().