QContiguousCache< T > Class Template Reference
#include <qcontiguouscache.h>
template<typename T>
class QContiguousCache< T >
Definition at line 90 of file qcontiguouscache.h.
bool isDetached |
( |
| ) |
const |
|
inline |
void setSharable |
( |
bool |
sharable | ) |
|
|
inline |
Definition at line 117 of file qcontiguouscache.h.
Q_INLINE_TEMPLATE void qSwap(QScopedPointer< T, Cleanup > &p1, QScopedPointer< T, Cleanup > &p2)
Definition at line 259 of file qcontiguouscache.h.
262 if (QTypeInfo<T>::isComplex) {
279 x.d->count =
x.d->start =
x.d->offset = 0;
280 x.d->sharable =
true;
QContiguousCacheTypedData< T > * p
Definition at line 219 of file qcontiguouscache.h.
227 x.d->count = qMin(
d->
count, asize);
230 x.d->start =
x.d->offset %
x.d->alloc;
234 int oldcount =
x.d->count;
237 T *dest =
x.p->array + (
x.d->start +
x.d->count-1) %
x.d->alloc;
240 if (QTypeInfo<T>::isComplex) {
245 if (dest ==
x.p->array)
246 dest =
x.p->array +
x.d->alloc;
QContiguousCacheTypedData< T > * p
const T & at |
( |
int |
pos | ) |
const |
|
inline |
Definition at line 432 of file qcontiguouscache.h.
437 return p->array[pos %
d->
alloc];
void insert(int pos, const T &value)
bool containsIndex(int pos) const
const T & operator[] |
( |
int |
i | ) |
const |
|
inline |
void append |
( |
const T & |
value | ) |
|
Definition at line 347 of file qcontiguouscache.h.
352 if (QTypeInfo<T>::isComplex) {
GLsizei const GLfloat * value
void prepend |
( |
const T & |
value | ) |
|
Definition at line 370 of file qcontiguouscache.h.
387 if (QTypeInfo<T>::isComplex)
GLsizei const GLfloat * value
void insert |
( |
int |
pos, |
|
|
const T & |
value |
|
) |
| |
Definition at line 394 of file qcontiguouscache.h.
396 Q_ASSERT_X(pos >= 0 && pos < INT_MAX,
"QContiguousCache<T>::insert",
"index out of range");
401 if (QTypeInfo<T>::isComplex) {
402 (
p->array + pos %
d->
alloc)->~T();
417 if (QTypeInfo<T>::isComplex)
void append(const T &value)
GLsizei const GLfloat * value
void prepend(const T &value)
bool containsIndex(int pos) const
bool containsIndex |
( |
int |
pos | ) |
const |
|
inline |
bool areIndexesValid |
( |
| ) |
const |
|
inline |
void normalizeIndexes |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: