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.
- TTextAreaIterator (const TTextArea * area)
- TTextAreaIterator ()
- TTextAreaIterator (const TTextAreaIterator & thatIter)
Interface Category:
API.
Purpose:
- Constructor to use to create an iterator for a text area.
- Default constructor.
- Copy constructor.
Calling Context:
- Called to create an iterator to iterate over the text ranges in a text area.
- The default constructor not used.
- The copy constructor is not used.
Parameters:
- const TTextArea * area -The text area to iterate over.
- Takes no parameters.
- const TTextAreaIterator & thatIter -The object to copy.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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.
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:
- TTextRange & returnRange -The range to be filled in.
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.
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:
- TTextRange & returnRange -The range to be filled in.
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.
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:
- TTextRange & returnRange -The range to be filled in.
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.
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:
- TTextRange & returnRange -The range to be filled in.
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.
TTextAreaIterator & operator =(const TTextAreaIterator & thatIter)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
- const TTextAreaIterator & thatIter -The object that this iterator is being assigned to.
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.