Class: TScrapItem

Declaration: ScrapItem.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TModelScrapItem TAggregateScrapItem

Purpose:

TScrapItem is an abstract class that you can use to derive classes of objects which can be transported from a drag-and-drop source to an acceptor in an drag-and-drop operation. Classes derived from TScrapItem add type-specific interfaces to read out the value they encapsulate.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Derive from TScrapItem to add type-specific interfaces to read out the values they encapsulate. The functions CreateIteratorFor and InternalCopyAvailableTypes must be overridden.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TScrapItem::~TScrapItem

virtual ~ TScrapItem ()

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: TScrapItem::CopyAvailableTypes

virtual void CopyAvailableTypes (TSequenceOf < TTypeDescription > & result, TMemoryHeap * whichHeap =NIL) const

Interface Category:

API.

Purpose:

Provides a list of type descriptions that are available from this object, The list is obtained by calling TScrapItem::InternalCopyAvailableTypes which is implemented by derived classes.

Calling Context:

Called to obtain a list of type descriptions to be published for this object. Called by TDragAndDropItem's CopyAvailableTypes, and thus is indirectly called by TDragAndDropInteractor when it needs to send the list of possible types to drop acceptors.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TScrapItem::operator>>=

virtual TStream & operator >>=(TStream & toWhere) 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: TScrapItem::operator<<=

virtual TStream & operator <<= (TStream & fromWhere)

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: TScrapItem::InternalCopyAvailableTypes

virtual void InternalCopyAvailableTypes (TSequenceOf < TTypeDescription > & result, TMemoryHeap & whichHeap) const

Interface Category:

API.

Purpose:

Provides a list of available type descriptions for this object. Deriving classes must implement this member function.

Calling Context:

Called to provide a list of available type descriptions for this object. Called by TScrapItem::CopyAvailableTypes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TScrapItem::TScrapItem

  1. TScrapItem ()
  2. TScrapItem (const TScrapItem & copy)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called to create a TScrapItem suitable for streaming into.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TScrapItem::operator=

TScrapItem & operator =(const TScrapItem & assign)

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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.