#include <qvector.h>
Collaboration diagram for QVectorData:

Definition at line 43 of file qvector.h.
Static Public Member Functions | |
| static QVectorData * | malloc (int sizeofTypedData, int size, int sizeofT, QVectorData *init) |
| static int | grow (int sizeofTypedData, int size, int sizeofT, bool excessive) |
Public Attributes | |
| QBasicAtomic | ref |
| int | alloc |
| int | size |
| uint | sharable: 1 |
Static Public Attributes | |
| static QVectorData | shared_null |
| QVectorData * QVectorData::malloc | ( | int | sizeofTypedData, | |
| int | size, | |||
| int | sizeofT, | |||
| QVectorData * | init | |||
| ) | [static] |
Definition at line 30 of file qvector.cpp.
References init(), p, qMalloc(), and qMin().
Referenced by QVector< T >::realloc().
00031 { 00032 QVectorData* p = (QVectorData *)qMalloc(sizeofTypedData + (size - 1) * sizeofT); 00033 ::memcpy(p, init, sizeofTypedData + (qMin(size, init->alloc) - 1) * sizeofT); 00034 return p; 00035 }
Here is the call graph for this function:

| int QVectorData::grow | ( | int | sizeofTypedData, | |
| int | size, | |||
| int | sizeofT, | |||
| bool | excessive | |||
| ) | [static] |
Definition at line 37 of file qvector.cpp.
References qAllocMore().
Referenced by QVector< T >::append(), QVector< T >::insert(), and QVector< T >::resize().
00038 { 00039 if (excessive) 00040 return size + size / 2; 00041 return qAllocMore(size * sizeofT, sizeofTypedData - sizeofT) / sizeofT; 00042 }
Here is the call graph for this function:

QVectorData QVectorData::shared_null [static] |
1.5.1