Class: TGraphicIterator

Declaration: Graphics.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

TGraphicGroupIterator

Purpose:

TGraphicIterator is an abstract base class that allows iteration of a hierarchy. TGraphicIterator's member functions are pure virtual functions. Derived classes are responsible for implementing the iterator so that it knows about the data structure that it needs to traverse, and how to traverse it. The derived class should override the TGraphicIterator member functions for hierarchy traversal. One way to implement a TGraphicIterator is by using a TDequeIterator, assuming that the data structure to be traversed is a TDeque. Concrete classes derived from TGraphicHierarchy (such as TGraphicGroup) create and use iterators that are derived from TGraphicIterator.

Instantiation:

Abstract class; do not allocate.

Deriving Classes:

Classes derived from TGraphicIterator should provide a means (such as a constructor argument) to associate the iterator with whatever hierarchy it is to traverse. They must override TGraphicIterator's pure virtual member functions, providing an implementation that lets the iterator traverse the chosen type of data structure.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TGraphicIterator::~TGraphicIterator

virtual ~ TGraphicIterator ()

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: TGraphicIterator::First

virtual MGraphic * First ()

Interface Category:

API.

Purpose:

Gets the first MGraphic in the hierarchy.

Calling Context:

Call this function only in concrete derived classes.

Parameters:

Return Value:

Returns a pointer to the first graphic in the hierarchy.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This is a pure virtual function.

Member Function: TGraphicIterator::Last

virtual MGraphic * Last ()

Interface Category:

API.

Purpose:

Gets the last MGraphic in the hierarchy.

Calling Context:

Call this function only in concrete derived classes.

Parameters:

Return Value:

Returns a pointer to the last graphic in the hierarchy.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This is a pure virtual function.

Member Function: TGraphicIterator::Next

virtual MGraphic * Next ()

Interface Category:

API.

Purpose:

Increments the iterator and returns a pointer to that MGraphic.

Calling Context:

Call this function only in concrete derived classes.

Parameters:

Return Value:

Returns a pointer to the next graphic in the hierarchy.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This is a pure virtual function.

Member Function: TGraphicIterator::Previous

virtual MGraphic * Previous ()

Interface Category:

API.

Purpose:

Decrements the iterator and returns a pointer to that MGraphic.

Calling Context:

Call this function only in concrete derived classes.

Parameters:

Return Value:

Returns a pointer to the previous graphic in the hierarchy.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This is a pure virtual function.

Member Function: TGraphicIterator::TGraphicIterator

TGraphicIterator ()

Interface Category:

API.

Purpose:

Default constructor.

Calling Context:

Called by the stream-in operators. You should not call this constructor directly because TGraphicIterator is an abstract class.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGraphicIterator::Reset

virtual void Reset ()

Interface Category:

API.

Purpose:

Resets this TGraphicIterator to the first MGraphic in the hierarchy.

Calling Context:

You should not call this constructor directly because TGraphicIterator is an abstract class.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This is a pure virtual function.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.