Class: TGraphicIterator3D

Declaration: Graphics3D.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

Derived from MGraphic3D, TGraphicIterator3D is an abstract base class that allows iteration of a hierarchy of 3-D graphics. TGraphicIterator3D'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 TGraphicIterator3D member functions for hierarchy traversal. One way to implement a TGraphicIterator3D is by using a TDequeIterator, assuming that the data structure to be traversed is a TDeque. Concrete classes derived from TGraphicHierarchy3D (such as TGraphicGroup3D) create and use iterators that are derived from TGraphicIterator3D.

Instantiation:

Abstract class; do not allocate.

Deriving Classes:

Classes derived from TGraphicIterator3D should provide a means (such as a constructor argument) to associate the iterator with whatever hierarchy it is to traverse. They must override TGraphicIterator3D'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: TGraphicIterator3D::~TGraphicIterator3D

virtual ~ TGraphicIterator3D ()

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

virtual MGraphic3D * First ()

Interface Category:

API.

Purpose:

Gets the first MGraphic3D in the hierarchy.

Calling Context:

Call this function directly. Note that this applies only to concrete derived classes because this function is pure virtual.

Parameters:

Return Value:

Returns a pointer to the first MGraphic3D 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: TGraphicIterator3D::Next

virtual MGraphic3D * Next ()

Interface Category:

API.

Purpose:

Increments the iterator to step to the next MGraphic3D in the hierarchy.

Calling Context:

Call this function directly. Note that this applies only to concrete derived classes because this function is pure virtual.

Parameters:

Return Value:

Returns a pointer to the next MGraphic3D 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: TGraphicIterator3D::Last

virtual MGraphic3D * Last ()

Interface Category:

API.

Purpose:

Gets the last MGraphic3D in the hierarchy.

Calling Context:

Call this function directly. Note that this applies only to concrete derived classes because this function is pure virtual.

Parameters:

Return Value:

Returns a pointer to the last MGraphic3D 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: TGraphicIterator3D::Previous

virtual MGraphic3D * Previous ()

Interface Category:

API.

Purpose:

Decrements the iterator to step to the preceding MGraphic3D in the hierarchy.

Calling Context:

Call this function directly. Note that this applies only to concrete derived classes because this function is pure virtual.

Parameters:

Return Value:

Returns a pointer to the preceding MGraphic3D 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: TGraphicIterator3D::Reset

virtual void Reset ()

Interface Category:

API.

Purpose:

Repositions the iterator to the first MGraphic3D in the hierarchy.

Calling Context:

Call this function directly. Note that this applies only to concrete derived classes because this function is pure virtual.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This is a pure virtual function.

Member Function: TGraphicIterator3D::TGraphicIterator3D

TGraphicIterator3D ()

Interface Category:

API.

Purpose:

Default constructor.

Calling Context:

Called by the stream-in operators. Because this class is abstract, do not instantiate an object directly.

Parameters:

Return Value:

None.

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.