Class: TCanvasGraphicAssociationsWith

Declaration: CanvasCoreCommands.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

None.

Purpose:

Stores MCollectible properties in association with canvas graphic IDs. Useful for saving undo and redo information in commands that change canvas graphics. A template class that is instantiated for a specific type of property that is assumed to also be an MCollectible.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Intended to be derived or instantiated as is.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

Unlike collection classes, TCanvasGraphicAssociations own their properties and copy them when copied and delete them when deleted.

Member Function: TCanvasGraphicAssociationsWith::TCanvasGraphicAssociationsWith

  1. TCanvasGraphicAssociationsWith ()
  2. TCanvasGraphicAssociationsWith (const TCanvasGraphicAssociationsWith < AType > &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called to create a new association object and by the stream-in operators.
  2. Called to copy an association object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The copy constructor copies property associations.

Member Function: TCanvasGraphicAssociationsWith::~TCanvasGraphicAssociationsWith

virtual ~ TCanvasGraphicAssociationsWith ()

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:

Deletes property associations.

Member Function: TCanvasGraphicAssociationsWith::operator=

TCanvasGraphicAssociationsWith < AType > & operator =(const TCanvasGraphicAssociationsWith < AType > &)

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:

Copies property associations.

Member Function: TCanvasGraphicAssociationsWith::operator>>=

virtual TStream & operator >>=(TStream &) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

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.

Member Function: TCanvasGraphicAssociationsWith::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCanvasGraphicAssociationsWith::AdoptAssociation

virtual void AdoptAssociation (const TCanvasGraphicID &, AType * association)

Interface Category:

API.

Purpose:

Adopts an MCollectible object of type AType to be associated with the specified canvas graphic ID.

Calling Context:

Usually called by commands on MCanvasSelection that need to save original state during do and undo to later use to implement undo and redo. Can be called by any client that needs to associate properties with canvas graphic IDs.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCanvasGraphicAssociationsWith::OrphanAssociation

virtual AType * OrphanAssociation (const TCanvasGraphicID &)

Interface Category:

API.

Purpose:

Orphans an MCollectible object of AType that has previously been associated with the specified canvas graphic ID.

Calling Context:

Usually called by commands on MCanvasSelection that need to save original state during do and undo to later use to implement undo and redo. Can be called by any client that needs to associate properties with canvas graphic IDs.

Parameters:

Return Value:

AType * -The property, or NIL if there is no association.

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.