okteta
#include <wordbytearrayservice.h>
Public Member Functions | |
WordByteArrayService (const AbstractByteArrayModel *byteArrayModel, const CharCodec *charCodec) | |
~WordByteArrayService () | |
Address | indexOfBeforeNextWordStart (Address index) const |
Address | indexOfLeftWordSelect (Address index) const |
Address | indexOfNextWordStart (Address index) const |
Address | indexOfPreviousWordStart (Address index) const |
Address | indexOfRightWordSelect (Address index) const |
Address | indexOfWordEnd (Address index) const |
Address | indexOfWordStart (Address index) const |
bool | isWordChar (Address index) const |
QString | text (Address index, Address lastIndex=-1) const |
AddressRange | wordSection (Address index) const |
Protected Attributes | |
const AbstractByteArrayModel *const | mByteArrayModel |
const CharCodec *const | mCharCodec |
Detailed Description
Definition at line 44 of file wordbytearrayservice.h.
Constructor & Destructor Documentation
Okteta::WordByteArrayService::WordByteArrayService | ( | const AbstractByteArrayModel * | byteArrayModel, |
const CharCodec * | charCodec | ||
) |
Definition at line 34 of file wordbytearrayservice.cpp.
Okteta::WordByteArrayService::~WordByteArrayService | ( | ) |
Definition at line 275 of file wordbytearrayservice.cpp.
Member Function Documentation
searches for the start of the next word not including the given index.
if there isn't a next word the index of the end is returned
- Parameters
-
index index to start with
- Returns
- index of the last nonword char before the next word or the last index
Definition at line 100 of file wordbytearrayservice.cpp.
Definition at line 146 of file wordbytearrayservice.cpp.
searches for the start of the next word not including the given index.
if there isn't a next word the index behind end is returned
- Parameters
-
index
- Returns
- index of the start of the next word or behind end
Definition at line 80 of file wordbytearrayservice.cpp.
searches for the first char after the end of the word including the given index.
If the byte at the given index is already a nonword char the given index is returned. if no other nonwordchar follows that of behind the last byte;
- Parameters
-
index index to start with
- Returns
- index of the first char after the current word or the given index if there is nonesearches for the first char after the end of the word including the given index. If the byte at the given index is already a nonword char the given index is returned. if no other nonwordchar follows that of behind the last byte;
- Parameters
-
index index to start with
- Returns
- index of the first char after the current word or the given index if there is nonesearches the start of the next previous word that does not include the given index, if no further word is found 0 is returned. if the index is out of range the behaviour is undefined.
- Parameters
-
index
- Returns
- index of the next previous word start or 0
Definition at line 54 of file wordbytearrayservice.cpp.
searches for the first char after the end of the word including the given index.
If the byte at the given index is already a nonword char the given index is returned. if no other nonwordchar follows that of behind the last byte;
- Parameters
-
index index to start with
- Returns
- index of the first char after the current word or the given index if there is none
Definition at line 175 of file wordbytearrayservice.cpp.
searches for the end of the word including the given index.
If the byte at the given index is already a nonword char the given index is returned. if no other nonwordchar follows, that of the last byte;
- Parameters
-
index index to start with
- Returns
- index of the last char of the current word or the given index if there is none
Definition at line 133 of file wordbytearrayservice.cpp.
searches for the start of the word including the given index.
if no other nonwordchar preceds this is 0; If the byte at the given index is already a nonword char the given index is returned.
- Parameters
-
index index to start with
- Returns
- index of the first char of the current word or the given index if there is none
Definition at line 121 of file wordbytearrayservice.cpp.
bool Okteta::WordByteArrayService::isWordChar | ( | Address | index | ) | const |
if index is out of range the behaviour is undefined
- Parameters
-
index
- Returns
true
if the byte at position i is a char of type CharType
Definition at line 47 of file wordbytearrayservice.cpp.
returns the text starting at the given index until the first non-text byte if there is no text byte at the index the result is empty.
- Parameters
-
index lastIndex if -1 lastIndex is set to the end of th byte array.
- Returns
- the text starting at the index
Definition at line 246 of file wordbytearrayservice.cpp.
AddressRange Okteta::WordByteArrayService::wordSection | ( | Address | index | ) | const |
returns the section with a word around index.
if there is no word the section is empty
- Parameters
-
index
- Returns
- the section with a word around index.
Definition at line 39 of file wordbytearrayservice.cpp.
Member Data Documentation
|
protected |
Definition at line 130 of file wordbytearrayservice.h.
|
protected |
Definition at line 131 of file wordbytearrayservice.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.