fe::CachingTextIterator Class Reference
[Ferry Core library]

Caching iterator over editor's text. More...

Inheritance diagram for fe::CachingTextIterator:

fe::ITextIterator fe::ProxyBase< T >

List of all members.

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)


Detailed Description

Caching iterator over editor's text.

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.


Constructor & Destructor Documentation

fe::CachingTextIterator::CachingTextIterator (  )  [inline]

virtual fe::CachingTextIterator::~CachingTextIterator (  )  [inline, virtual]


Member Function Documentation

void fe::CachingTextIterator::invalidate (  )  [inline]

Invalidates cached information about text position pointed by the encapsulated iterator.

Note:
after this call all fe::CachingTextIterator constant methods return data which may not correspond to the actual text position pointed by the encapsulated iterator until one of non constant fe::CachingTextIterator methods get called.

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.


The documentation for this class was generated from the following file:

Generated on Tue Nov 18 21:08:22 2008 for Ferry by doxygen 1.5.7.1
http://sourceforge.net