Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MCollectible, MCanvasRepresentation
Inherited By:
None.
Purpose:
Storage for a collection of canvas graphics that are drawn in a canvas view. Maintains semantic order from front (drawn on top) to back (drawn below). Provides members to adopt and orphan graphics and to manipulate graphic order. Contained graphics are referenced by their unique IDs and IDs can be cross-referenced to the actual pointers.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Intended to be used as is but can also be derived.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TCanvasGraphicDeque ()
- TCanvasGraphicDeque (const TCanvasGraphicDeque &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and to create a new object.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TCanvasGraphicDeque ()
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 long Hash () const
Interface Category:
API.
Purpose:
Returns a unique value that can assist in identifying the object or comparing it to other objects.
Calling Context:
Called to generate a hash value.
Parameters:
Return Value:
Always returns zero.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Currently, TCanvasGraphicDeque does not support comparisons via Hash or IsEqual. Classes can be derived to add such support.
TCanvasGraphicDeque & operator =(const TCanvasGraphicDeque &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
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.
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & -The stream the object is streamed out to.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & -The stream the object is streamed in from.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws a TStandardException(kStreamBadVersion,0) when streaming in a version other than kOriginalVersion. Passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void AdoptAtFront (MCanvasGraphic *)
Interface Category:
API.
Purpose:
Adopts the graphic at the front.
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.
virtual void AdoptAtBack (MCanvasGraphic *)
Interface Category:
API.
Purpose:
Adopts the graphic at the back.
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.
virtual void AdoptAfter (const TCanvasGraphicID & existing, MCanvasGraphic * toBeAdded)
Interface Category:
API.
Purpose:
Adopts the graphic after an identified graphic.
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.
virtual void AdoptBefore (const TCanvasGraphicID & existing, MCanvasGraphic * toBeAdded)
Interface Category:
API.
Purpose:
Adopts the graphic before an identified graphic.
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.
virtual void MoveToFront (const TCanvasGraphicID &)
Interface Category:
API.
Purpose:
Moves the identified graphic to the front.
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.
virtual void MoveToBack (const TCanvasGraphicID &)
Interface Category:
API.
Purpose:
Moves the identified graphic to the back.
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.
virtual bool MoveForward (const TCanvasGraphicID &)
Interface Category:
API.
Purpose:
Moves the identified graphic closer to the front by one position.
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.
virtual bool MoveBackward (const TCanvasGraphicID &)
Interface Category:
API.
Purpose:
Moves the identified graphic closer to the back by one position.
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.
virtual MCanvasGraphic * Orphan (const TCanvasGraphicID &)
Interface Category:
API.
Purpose:
Removes a graphic and returns it, passing the ownership responsibility for it to the caller.
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.
virtual MCanvasGraphic * Swap (const TCanvasGraphicID &, MCanvasGraphic * adopt)
Interface Category:
API.
Purpose:
Adopts a graphic in place of the identified other graphic. First, it swaps the IDs of the graphics so that the new graphic assumes the identity of the replaced graphic. Then, it returns the replaced graphic, passing the ownership responsibility to the caller.
Calling Context:
Typically called in the context of undoing or redoing a command.
Parameters:
Return Value:
MCanvasGraphic * -The replaced graphic.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void Delete (const TCanvasGraphicID &)
Interface Category:
API.
Purpose:
Removes the identified graphic 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.
virtual void DeleteAll ()
Interface Category:
API.
Purpose:
Removes all graphics 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.
virtual bool Member (const TCanvasGraphicID &) const
Interface Category:
API.
Purpose:
Determines if the identified graphic is a member.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the identified graphic is a member.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TCanvasGraphicID FrontMost () const
Interface Category:
API.
Purpose:
Identifies the frontmost graphic.
Calling Context:
Call this function directly.
Parameters:
Return Value:
TCanvasGraphicID -The ID of the frontmost graphic.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TCanvasGraphicID BackMost () const
Interface Category:
API.
Purpose:
Identifies the backmost graphic.
Calling Context:
Call this function directly.
Parameters:
Return Value:
TCanvasGraphicID -The ID of the backmost graphic.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TCanvasGraphicID After (const TCanvasGraphicID &) const
Interface Category:
API.
Purpose:
Identifies the graphic that is immediately after another graphic.
Calling Context:
Call this function directly.
Parameters:
Return Value:
TCanvasGraphicID -The ID of the graphic after the other one.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TCanvasGraphicID Before (const TCanvasGraphicID &) const
Interface Category:
API.
Purpose:
Identifies the graphic that is immediately before another graphic.
Calling Context:
Call this function directly.
Parameters:
Return Value:
TCanvasGraphicID -The ID of the graphic before the other one.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual long Count () const
Interface Category:
API.
Purpose:
Returns the number of graphics stored.
Calling Context:
Call this function directly.
Parameters:
Return Value:
long -The number of graphics.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- virtual const MCanvasGraphic * Lookup (const TCanvasGraphicID &) const
- virtual MCanvasGraphic * Lookup (const TCanvasGraphicID &)
Interface Category:
API.
Purpose:
- Returns a const pointer to the identified graphic.
- Returns a non-const pointer to the identified graphic.
Calling Context:
- Called to cross-reference a graphic from its ID.
- Called to cross-reference a graphic from its ID.
Parameters:
Return Value:
- const MCanvasGraphic * -A const pointer to the graphic.
- MCanvasGraphic * -A non-const pointer to the graphic.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TCanvasGraphicReadIterator * CreateReadIterator () const
Interface Category:
API.
Purpose:
Creates a read iterator over this representation.
Calling Context:
Call this function directly.
Parameters:
Return Value:
TCanvasGraphicReadIterator * -The iterator.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TCanvasGraphicWriteIterator * CreateWriteIterator ()
Interface Category:
API.
Purpose:
Creates a write iterator over this representation.
Calling Context:
Call this function directly.
Parameters:
Return Value:
TCanvasGraphicWriteIterator * -The iterator.
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.