Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TScrapItem
Inherited By:
None.
Purpose:
TAggregateScrapItem is the system-standard abstract interface for a scrap item representing an aggregate.
Instantiation:
Abstract class; do not allocate.
Deriving Classes:
Derive classes from TAggregateScrapItem to provide implementations which are optimized to their particular uses. The functions CreateIteratorFor and InternalCopyAvailableTypes must be overridden.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
virtual ~ TAggregateScrapItem ()
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 TStream & operator >>=(TStream & toWhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toWhere -The stream the object streams itself 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 & fromWhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromWhere -The stream the object streams itself 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 TIteratorOver < TScrapItem > * CreateIteratorFor (const TTypeDescription & matchType, TMemoryHeap * whichHeap =NIL) const
Interface Category:
API.
Purpose:
Abstract function for "reading out" the individual entities contained in the represented aggregate. Override this function to return an iterator which iterates over all contained individual entities which offer a representation matching the specified matchType, and for each provides the TScrapItem of that type.
Note that only the iterator is allocated on the specified heap and given to the caller. The scrap items which this iterator provides access to are not given to the caller for ownership, and the references to the scrap items, as well as the iterator instance, are only valid for the lifetime of the TAggregateScrapItem which the iterator comes from.
Calling Context:
Call this function directly.
Parameters:
- const TTypeDescription & matchType -The type of scrap items the iterator is to iterate over.
- TMemoryHeap * whichHeap =NIL -The heap from which the iterator is to be allocated.
Return Value:
An iterator which iterates over all contained individual entities which offer a representation matching the specified matchType, and for each provides the TScrapItem of that type.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This is a pure virtual function and needs to be overridden.
static TTypeDescription GetScrapItemType ()
Interface Category:
API.
Purpose:
Returns the type description the aggregate scrap is to be published as, as a whole single entity, to Basic Drag and Drop. Always use this function to get this type description value because the returned value is assured to compare compatibly with type description carrying extension hints. Such hints are optionally used to provide information about the individual entities in the aggregate scrap item.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The type description the aggregate scrap is to be published as, as a whole single entity, to Basic Drag and Drop
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TAggregateScrapItem::InternalCopyAvailableTypes
virtual void InternalCopyAvailableTypes (TSequenceOf < TTypeDescription > & result, TMemoryHeap & whichHeap) const
Interface Category:
API.
Purpose:
An override of the TScrapItem member function for enumerating the representations of the scrap, in this case the aggregate as a whole. Derived classes must implement this member function, and should, by convention, always return a type description value which compares equal to the value returned by GetScrapItemType.
Calling Context:
Called to provide a list of available type descriptions for this object.
Parameters:
- TSequenceOf < TTypeDescription > & result -The list of type descriptions for this object.
- TMemoryHeap * whichHeap -The heap on which to create the list. If this parameter is NIL, the default heap is used.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected pure virtual function overrides the inherited TScrapItem function.
- TAggregateScrapItem ()
- TAggregateScrapItem (const TAggregateScrapItem & copy)
Interface Category:
API.
Purpose:
- Default constructor. This constructor is protected.
- Copy constructor. This constructor is protected.
Calling Context:
- Called by the stream-in operators.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TAggregateScrapItem & operator =(const TAggregateScrapItem & 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.