Public Member Functions | |
CachingTextIterator () | |
virtual unsigned UC_DLL_CALL | getCurByteIdx () const |
virtual unsigned UC_DLL_CALL | getCurLineFirstByteIdx () const |
virtual unsigned UC_DLL_CALL | getCurLineIdx () const |
void | invalidate () |
virtual | ~CachingTextIterator () |
Protected Member Functions | |
virtual void UC_DLL_CALL | getCurLineTextImpl (String &res) const |
virtual void UC_DLL_CALL | gotoByteImpl (unsigned byteIdx, String &res) |
virtual void UC_DLL_CALL | gotoLineImpl (unsigned lineIdx, String &res) |
virtual void UC_DLL_CALL | nextLineImpl (String &res) |
virtual void UC_DLL_CALL | prevLineImpl (String &res) |
The fe::CachingTextIterator instance encapsulates pointer to an object of fe::ITextIterator-based class providing caching of information about text position pointed by the encapsulated iterator.
Every constant fe::CachingTextIterator method overriding corresponding fe::ITextIterator method doesn't call methods on encapsulated iterator but just returns cached information about text position pointed by the encapsulated iterator.
nextLine() and prevLine() methods always call corresponding fe::ITextIterator methods on the encapsulated iterator and validate cache with information about new text position.
gotoByte() and gotoLine() methods call corresponding fe::ITextIterator methods on the encapsulated iterator and validate cache with information about new text position only if the new text position belongs to another text line.
fe::CachingTextIterator::CachingTextIterator | ( | ) | [inline] |
virtual fe::CachingTextIterator::~CachingTextIterator | ( | ) | [inline, virtual] |
void fe::CachingTextIterator::invalidate | ( | ) | [inline] |
Invalidates cached information about text position pointed by the encapsulated iterator.
virtual void UC_DLL_CALL fe::CachingTextIterator::getCurLineTextImpl | ( | String & | res | ) | const [inline, protected, virtual] |
Implements fe::ITextIterator.
virtual void UC_DLL_CALL fe::CachingTextIterator::gotoLineImpl | ( | unsigned | lineIdx, | |
String & | res | |||
) | [inline, protected, virtual] |
Implements fe::ITextIterator.
virtual void UC_DLL_CALL fe::CachingTextIterator::gotoByteImpl | ( | unsigned | byteIdx, | |
String & | res | |||
) | [inline, protected, virtual] |
Implements fe::ITextIterator.
virtual void UC_DLL_CALL fe::CachingTextIterator::nextLineImpl | ( | String & | res | ) | [inline, protected, virtual] |
Implements fe::ITextIterator.
virtual void UC_DLL_CALL fe::CachingTextIterator::prevLineImpl | ( | String & | res | ) | [inline, protected, virtual] |
Implements fe::ITextIterator.
virtual unsigned UC_DLL_CALL fe::CachingTextIterator::getCurLineIdx | ( | ) | const [inline, virtual] |
Implements fe::ITextIterator.
virtual unsigned UC_DLL_CALL fe::CachingTextIterator::getCurByteIdx | ( | ) | const [inline, virtual] |
Implements fe::ITextIterator.
virtual unsigned UC_DLL_CALL fe::CachingTextIterator::getCurLineFirstByteIdx | ( | ) | const [inline, virtual] |
Implements fe::ITextIterator.