Class: TViewChildIterator

Declaration: View.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

Provides an iterator that iterates over all the direct children of a view.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TViewChildIterator::TViewChildIterator

TViewChildIterator (const TView & view)

Interface Category:

API.

Purpose:

Constructs the iterator over the specified view.

Calling Context:

Called by clients and by the View system before the iteration commences.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TViewChildIterator::~TViewChildIterator

virtual ~ TViewChildIterator ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object. The iterator can be destroyed at any time; the end of the list need not have been reached.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TViewChildIterator::First

TView * First ()

Interface Category:

API.

Purpose:

Returns the first child of the view. The first child is the bottom-most in the top-to-bottom sibling stacking order. The view can be deleted after it is returned, so use caution if you keep the returned view to ensure that it won't be deleted without your knowledge.

Calling Context:

Called by clients once the iterator is constructed, but can be called at any time during the lifetime of the iterator.

Parameters:

Return Value:

Returns the first (bottom-most) child of the view the iterator is iterating over, or NIL if the view has no children.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TViewChildIterator::Next

TView * Next ()

Interface Category:

API.

Purpose:

Retrieves the next child of the view after the current one. The next child is higher in the top-to-bottom view sibling order and occludes the current view if their intersection is non-empty. The view can be deleted after it is returned, so use caution if you keep the returned view to ensure that it won't be deleted without your knowledge.

Calling Context:

Called by clients anytime once the iterator is constructed. Can be called at any time during the lifetime of the iterator (after calling First).

Parameters:

Return Value:

Returns the next child of the view, or NIL if there are no more children above the current one.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TViewChildIterator::Last

TView * Last ()

Interface Category:

API.

Purpose:

Returns the top-most (in sibling stacking order) child of the view. The view can be deleted after it is returned, so use caution if you keep the returned view to ensure that it won't be deleted without your knowledge.

Calling Context:

Called by clients any time during the lifetime of the iterator.

Parameters:

Return Value:

Returns a pointer to the top-most child view, or NIL if the view has no children.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TViewChildIterator::Previous

TView * Previous ()

Interface Category:

API.

Purpose:

Returns the view that comes before the current view. This view is lower in the top-to-bottom sibling stacking order than the current view. The view can be deleted after it is returned, so use caution if you keep the returned view to ensure that it won't be deleted without your knowledge.

Calling Context:

Called by clients any time once the iterator is constructed. Should be called after Last has been called.

Parameters:

Return Value:

Returns a pointer to the next lower child view, or NIL if there are no more below the current one.

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.