Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
None.
Purpose:
TExportScrapItemsQuery provides a simple interface for exporting scrap items. It iterates over all of the translators on the system, finds the ones which can handle specified scrap items, and performs the translation when requested.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
TImportForeignDataQuery is intended to be used directly.
Clients can also create derived classes which handle exports of higher-level such as an entire clipboard.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
TExportScrapItemsQuery is intended for use as a transient helper object in functions which need to export scrap items. It is not copyable, assignable, or streamable.
TExportScrapItemsQuery (const TScrapItemProvider * scraps)
Interface Category:
API.
Purpose:
Creates a TExportScrapItemsQuery object for exporting a collection of scrap items.
Calling Context:
Called to create a TExportScrapItemsQuery for the scrap items available from a TScrapItemProvider.
Parameters:
- const TScrapItemProvider * scraps -An object that can provides the scrap item types available to the query and that can produce an actual TScrapItem on request. The TScrapItemProvider is aliased, not adopted. The caller is responsible for deleting the provider after this query object has been destroyed.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TExportScrapItemsQuery ()
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.
void CopyAvailableTypes (TSequenceOf < TForeignDataType > & types, TMemoryHeap * =0) const
Interface Category:
API.
Purpose:
Returns the types of foreign data that can be created from the scrap items available to this query. If no foreign data can be created an exception is thrown.
Calling Context:
You can call this function directly.
Parameters:
- TSequenceOf < TForeignDataType > & types -This sequence is filled in with TForeignDataType objects representing all of the foreign data types which can be created from the query's input. The caller is responsible for deleting the TForeignDataType objects added to the sequence.
- TMemoryHeap * =0 -The memory heap in which the returned TForeignDataType objects should be created. The default parameter value of 0 will cause the objects to be created in the default heap.
Return Value:
None.
Exceptions:
Throws TForeignDataException(kNoTranslator) if there is no translator which can produce the requested foreign data from any of the scrap items available to this query.
Passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
void DoTranslation (const TForeignDataType & desiredType, TForeignData & destination) const
Interface Category:
API.
Purpose:
Performs a translation which produces the requested type of foreign data.
Calling Context:
You can call this function directly.
Parameters:
- const TTypeDescription & desired -The type of foreign data that is desired as output. This must be one of the types returned by CopyAvailableTypes; otherwise an exception will be thrown.
- TForeignData & destination -The foreign data location to which the exported data should be written.
Return Value:
None.
Exceptions:
Throws TForeignDataException(kNoTranslator) if there is no translator which can produce the requested foreign data type from any of the scrap items available to this query.
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.