Public Types | |
enum | { npos = (unsigned)-1 } |
Public Member Functions | |
virtual unsigned UC_DLL_CALL | getCurByteIdx () const =0 |
virtual unsigned UC_DLL_CALL | getCurLineFirstByteIdx () const =0 |
virtual unsigned UC_DLL_CALL | getCurLineIdx () const =0 |
String | getCurLineText () const |
String | gotoByte (unsigned byteIdx) |
String | gotoLine (unsigned lineIdx) |
String | nextLine () |
String | prevLine () |
Protected Member Functions | |
virtual void UC_DLL_CALL | getCurLineTextImpl (String &res) const =0 |
virtual void UC_DLL_CALL | gotoByteImpl (unsigned byteIdx, String &res)=0 |
virtual void UC_DLL_CALL | gotoLineImpl (unsigned lineIdx, String &res)=0 |
virtual void UC_DLL_CALL | nextLineImpl (String &res)=0 |
virtual void UC_DLL_CALL | prevLineImpl (String &res)=0 |
Iterator can be in two states: valid and invalid.
When iterator is in valid state it points to some existing text position otherwise it is in invalid state.
Only non constant fe::ITextIterator methods can change state of an iterator.
If iterator is in invalid state all fe::ITextIterator methods with unsigned
return type return npos and all methods with String
return type return String{ptr: 0; len: -1}
value.
virtual void UC_DLL_CALL fe::ITextIterator::getCurLineTextImpl | ( | String & | res | ) | const [protected, pure virtual] |
Implemented in fe::CachingTextIterator, and fe::TextIteratorProxy.
virtual void UC_DLL_CALL fe::ITextIterator::gotoLineImpl | ( | unsigned | lineIdx, | |
String & | res | |||
) | [protected, pure virtual] |
Implemented in fe::CachingTextIterator, and fe::TextIteratorProxy.
virtual void UC_DLL_CALL fe::ITextIterator::gotoByteImpl | ( | unsigned | byteIdx, | |
String & | res | |||
) | [protected, pure virtual] |
Implemented in fe::CachingTextIterator, and fe::TextIteratorProxy.
virtual void UC_DLL_CALL fe::ITextIterator::nextLineImpl | ( | String & | res | ) | [protected, pure virtual] |
Implemented in fe::CachingTextIterator, and fe::TextIteratorProxy.
virtual void UC_DLL_CALL fe::ITextIterator::prevLineImpl | ( | String & | res | ) | [protected, pure virtual] |
Implemented in fe::CachingTextIterator, and fe::TextIteratorProxy.
String fe::ITextIterator::getCurLineText | ( | ) | const [inline] |
Returns contents of the text line to which the text position pointed by this iterator belongs.
virtual unsigned UC_DLL_CALL fe::ITextIterator::getCurLineIdx | ( | ) | const [pure virtual] |
Returns index of a text line to which the text position pointed by this iterator belongs.
Implemented in fe::CachingTextIterator, and fe::TextIteratorProxy.
virtual unsigned UC_DLL_CALL fe::ITextIterator::getCurByteIdx | ( | ) | const [pure virtual] |
Returns text position pointed by this iterator.
Implemented in fe::CachingTextIterator, and fe::TextIteratorProxy.
virtual unsigned UC_DLL_CALL fe::ITextIterator::getCurLineFirstByteIdx | ( | ) | const [pure virtual] |
Returns position of the first byte of a text line to which the text position pointed by this iterator belongs.
Implemented in fe::CachingTextIterator, and fe::TextIteratorProxy.
String fe::ITextIterator::gotoLine | ( | unsigned | lineIdx | ) | [inline] |
Moves this iterator to the first byte of a text line with the given index.
lineIdx | index of the line which first byte should be pointed by the iterator |
String fe::ITextIterator::gotoByte | ( | unsigned | byteIdx | ) | [inline] |
Moves this iterator to the given position in the text.
byteIdx | text position this iterator should move to |
String fe::ITextIterator::nextLine | ( | ) | [inline] |
Moves this iterator to the first byte of the text line following the text line to which the text position pointed by this iterator belongs.
String fe::ITextIterator::prevLine | ( | ) | [inline] |
Moves this iterator to the first byte of the text line preceding the text line to which the text position pointed by this iterator belongs.