A special GapVector class that isn't a gapvector. It forwards it's request to a normal vector class (for debugging purposes) that isn't a gapv This class is only used for debugging issuess with the gapvector. More...
#include <gapvector.h>
Public Member Functions | |
NoGapVector (int capacity=16) | |
~NoGapVector () | |
int | length () const |
returns the used length of the data | |
int | gapSize () const |
int | gapBegin () const |
int | gapEnd () const |
int | capacity () const |
void | clear () |
clears the data | |
void | replace (int offset, int length, const T *data, int newLength) |
this method replaces the given items | |
void | fill (int offset, int length, const T &data, int newLength) |
this method replaces the given items with a single data item | |
void | append (T t) |
convenient append method | |
void | append (const T *t, int length) |
another append method | |
T | at (int offset) const |
This method returns the item at the given index. | |
void | set (int offset, const T &value) |
This method sets an item at the given index. | |
T & | operator[] (int offset) |
This method return an index. | |
Protected Attributes | |
QVector< T > | items_ |
This method returns a direct pointer to the 0-terminated buffer This pointer is only valid as long as the buffer doesn't change WARNING, this method MOVES the gap! Which means this method should NOT be used for a lot of operations. | |
A special GapVector class that isn't a gapvector. It forwards it's request to a normal vector class (for debugging purposes) that isn't a gapv This class is only used for debugging issuess with the gapvector.
|
inline |
|
inline |
|
inline |
another append method
|
inline |
convenient append method
|
inline |
This method returns the item at the given index.
|
inline |
|
inline |
clears the data
|
inline |
this method replaces the given items with a single data item
offset | the offset of the items to replace |
lenth | the number of items to replace |
newLength | the number of times to repeat data |
|
inline |
|
inline |
|
inline |
|
inline |
returns the used length of the data
|
inline |
This method return an index.
|
inline |
this method replaces the given items
offset | the offset of the items to replace |
lenth | the number of items to replace |
data | an array with new items |
newLength | the number of items in the new array |
|
inline |
This method sets an item at the given index.
|
protected |
This method returns a direct pointer to the 0-terminated buffer This pointer is only valid as long as the buffer doesn't change WARNING, this method MOVES the gap! Which means this method should NOT be used for a lot of operations.