Class: TTextAreaIterator

Declaration: TextArea.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

TTextAreaIterator is a concrete class that allows for read-only sequential iteration over the text ranges that define a text area. This class iterates over the ranges in increasing order, e.g. range[n].GetEnd() < range[n+1].GetBegin(). You must supply the text area at the time of construction.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

There are no special requirements for deriving classes.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

The member functions First or Last must be called on the iterator before the member functions Next or Previous are used.

Member Function: TTextAreaIterator::TTextAreaIterator

  1. TTextAreaIterator (const TTextArea * area)
  2. TTextAreaIterator ()
  3. TTextAreaIterator (const TTextAreaIterator & thatIter)

Interface Category:

API.

Purpose:

  1. Constructor to use to create an iterator for a text area.
  2. Default constructor.
  3. Copy constructor.

Calling Context:

  1. Called to create an iterator to iterate over the text ranges in a text area.
  2. The default constructor not used.
  3. The copy constructor is not used.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextAreaIterator::~TTextAreaIterator

virtual ~ TTextAreaIterator ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextAreaIterator::First

virtual bool First (TTextRange & returnRange)

Interface Category:

API.

Purpose:

Gets the first text range in the text area.

Calling Context:

Called to get the first text range in the selection.

Parameters:

Return Value:

Returns false if there is no valid range or insertion point in the text area. If this happens, the text area has been corrupted. Returns true otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextAreaIterator::Last

virtual bool Last (TTextRange & returnRange)

Interface Category:

API.

Purpose:

Gets the last text range in the text area.

Calling Context:

Called to get the last text range in the selection.

Parameters:

Return Value:

Returns false if there is no valid range or insertion point in the text area. If this happens, the text area has been corrupted. Returns true otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextAreaIterator::Next

virtual bool Next (TTextRange & returnRange)

Interface Category:

API.

Purpose:

Gets the next text range in the text area.

Calling Context:

Called to get the next text range in the selection.

Parameters:

Return Value:

Returns false when there are no more next text ranges. Returns true otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Either the member function First or the member function Last must be called before this member function is used.

Member Function: TTextAreaIterator::Previous

virtual bool Previous (TTextRange & returnRange)

Interface Category:

API.

Purpose:

Gets the previous text range in the text area.

Calling Context:

Called to get the previous text range in the selection.

Parameters:

Return Value:

Returns false when there are no more previous text ranges. Returns true otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Either the member function First or the member function Last must be called before this member function is used.

Member Function: TTextAreaIterator::operator=

TTextAreaIterator & operator =(const TTextAreaIterator & thatIter)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.