Class: MCanvasRepresentation

Declaration: GrafEdit.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

TCanvasGraphicDeque TStandardCanvasModel

Purpose:

Stores canvas graphics in a front to back ordering. The abstract storage class for canvas graphics in any GrafEdit application.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Must derive because MCanvasRepresentation is abstract.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: MCanvasRepresentation::~MCanvasRepresentation

virtual ~ MCanvasRepresentation ()

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: MCanvasRepresentation::AdoptAtFront

virtual void AdoptAtFront (MCanvasGraphic *)

Interface Category:

API.

Purpose:

Adopts a graphic at the front of the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::AdoptAtBack

virtual void AdoptAtBack (MCanvasGraphic *)

Interface Category:

API.

Purpose:

Adopts a graphic at the back of the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::AdoptAfter

virtual void AdoptAfter (const TCanvasGraphicID & existing, MCanvasGraphic * toBeAdded)

Interface Category:

API.

Purpose:

Adopts a graphic after (behind) another in the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::AdoptBefore

virtual void AdoptBefore (const TCanvasGraphicID & existing, MCanvasGraphic * toBeAdded)

Interface Category:

API.

Purpose:

Adopts a graphic before (in front of) another graphic in the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::MoveToFront

virtual void MoveToFront (const TCanvasGraphicID &)

Interface Category:

API.

Purpose:

Moves a graphic to the front of the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::MoveToBack

virtual void MoveToBack (const TCanvasGraphicID &)

Interface Category:

API.

Purpose:

Moves a graphic to the back of the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::MoveForward

virtual bool MoveForward (const TCanvasGraphicID &)

Interface Category:

API.

Purpose:

Moves a graphic one position closer to the front of the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the graphic is moved.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::MoveBackward

virtual bool MoveBackward (const TCanvasGraphicID &)

Interface Category:

API.

Purpose:

Moves a graphic one position closer to the back of the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the graphic is moved.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::Orphan

virtual MCanvasGraphic * Orphan (const TCanvasGraphicID &)

Interface Category:

API.

Purpose:

Orphans a graphic in the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

MCanvasGraphic * -The orphaned graphic.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::Swap

virtual MCanvasGraphic * Swap (const TCanvasGraphicID &, MCanvasGraphic * adopt)

Interface Category:

API.

Purpose:

Swaps a new canvas graphic with one already in the representation. The new graphic assumes the ID of the one it replaces. The replaced graphic assumes the ID of the new one (this ensures that the ID of each is still unique).

Calling Context:

Call this function directly.

Parameters:

Return Value:

MCanvasGraphic * -The replaced graphic.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::Delete

virtual void Delete (const TCanvasGraphicID &)

Interface Category:

API.

Purpose:

Removes a graphic from the representation and destructs it.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::DeleteAll

virtual void DeleteAll ()

Interface Category:

API.

Purpose:

Removes all graphics in the representation and destructs them.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::Member

virtual bool Member (const TCanvasGraphicID &) const

Interface Category:

API.

Purpose:

Determines if an identified graphic is a member of the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the identified graphic is a member of the representation.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::FrontMost

virtual TCanvasGraphicID FrontMost () const

Interface Category:

API.

Purpose:

Gets the frontmost graphic in the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

TCanvasGraphicID -The ID of the frontmost graphic in the representation.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::BackMost

virtual TCanvasGraphicID BackMost () const

Interface Category:

API.

Purpose:

Identifies the backmost graphic in the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

TCanvasGraphicID -The ID of the backmost graphic in the representation.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::After

virtual TCanvasGraphicID After (const TCanvasGraphicID &) const

Interface Category:

API.

Purpose:

Identifies the graphic that is after another identified graphic in the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

TCanvasGraphicID -The ID of the graphic after the identified graphic.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::Before

virtual TCanvasGraphicID Before (const TCanvasGraphicID &) const

Interface Category:

API.

Purpose:

Identifies the graphic that is before another identified graphic in the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

TCanvasGraphicID -The ID of the graphic before the identified graphic.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::Count

virtual long Count () const

Interface Category:

API.

Purpose:

Determines the number of graphics in the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

long -The number of graphics in the representation.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::Lookup

  1. virtual const MCanvasGraphic * Lookup (const TCanvasGraphicID &) const
  2. virtual MCanvasGraphic * Lookup (const TCanvasGraphicID &)

Interface Category:

API.

Purpose:

  1. Looks up the identified graphic and returns a const pointer to it.
  2. Looks up the identified graphic and returns a non-const pointer to it.

Calling Context:

Call this function directly.

Parameters:

Return Value:

  1. const MCanvasGraphic * -A const pointer to the graphic or NIL if not in the representation.
  2. MCanvasGraphic * -A non-const pointer to the graphic or NIL if not in the representation.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Clients with a const reference to the representation are only be able to access its graphics in a const manner (unless they cast away const).

Member Function: MCanvasRepresentation::CreateReadIterator

virtual TCanvasGraphicReadIterator * CreateReadIterator () const

Interface Category:

API.

Purpose:

Creates an iterator that permits read-only iteration over graphics in the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

TCanvasGraphicReadIterator * -A read iterator.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::CreateWriteIterator

virtual TCanvasGraphicWriteIterator * CreateWriteIterator ()

Interface Category:

API.

Purpose:

Creates an iterator that permits read/write iteration over graphics in the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

TCanvasGraphicWriteIterator * -A write iterator.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MCanvasRepresentation::MCanvasRepresentation

  1. MCanvasRepresentation ()
  2. MCanvasRepresentation (const MCanvasRepresentation &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and constructors of derived classes.
  2. Called by the copy constructor of derived classes.

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.