|
| QCharGapVector (int size=16) |
|
| QCharGapVector (const QString &data, int gapSize) |
| initializes the vector with a given string
|
|
void | init (const QString &data, int gapSize) |
| Initializes the gapvector.
|
|
void | replaceString (int offset, int length, const QString &data) |
| a convenient string replace function
|
|
QString | mid (int offset, int length) const |
| a convenient method to retrieve a QString part
|
|
| GapVector (int capacity=16) |
|
| ~GapVector () |
|
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 QChar *data, int newLength) |
| this method replaces the given items
|
|
void | fill (int offset, int length, const QChar &data, int newLength) |
| this method replaces the given items with a single data item
|
|
void | append (QChar t) |
| convenient append method
|
|
void | append (const QChar *t, int length) |
| another append method
|
|
QChar | at (int offset) const |
| This method returns the item at the given index.
|
|
void | set (int offset, const QChar &value) |
| This method sets an item at the given index.
|
|
QChar & | operator[] (int offset) |
| This method return an index.
|
|
QChar & | rawAt (int index) |
| This method returns the 'raw' element at the given location This method does NOT take in account the gap.
|
|
void | copyRange (QChar *data, int offset, int length) const |
| This method copies the given range to the data pointer.
|
|
QChar * | data () |
| 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.
|
|
void | moveGapTo (int offset) |
|
void | ensureGapSize (int requiredSize) |
| this method makes sure there's enough room for the insertation
|
|
void | resize (int newSize) |
| resizes the array of data
|
|
void | setGrowSize (int size) |
| sets the growsize. The growsize if the amount to reserve extra
|
|
int | growSize () |
| returns the growsize
|
|
QString | getUnitTestString (QChar gapChar='_') const |
| Converts the 'gap-buffer' to a unit-test debugging string.
|
|
QString | getUnitTestString2 () const |
| Converts the 'gap-buffer' to a unit-test debugging string.
|
|