![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
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.
- TCanvasGraphicAssociationsWith ()
- TCanvasGraphicAssociationsWith (const TCanvasGraphicAssociationsWith < AType > &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called to create a new association object and by the stream-in operators.
- 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.
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.
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.
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 no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- const TCanvasGraphicID & -The ID of the graphic to associate property with.
- AType * association -The property (must also be an MCollectible).
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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.