Class: TScrapItemProvider

Declaration: ScrapItemProvider.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TSimpleScrapItemProvider

Purpose:

TScrapItemProvider is an abstract base class that defines the protocols for an object that provides data to the clipboard.

Instantiation:

Abstract base class; do not allocate.

Deriving Classes:

Provided classes include TSimpleScrapItemProvider. Derived classes must override the pure virtual functions: CopyAvailableTypes, and GiveAssociatedScrapTo.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TScrapItemProvider::~TScrapItemProvider

virtual ~ TScrapItemProvider ()

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

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

Interface Category:

API.

Purpose:

Copies the type descriptions for the data types available from this provider.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is a pure virtual function and must be overridden by classes deriving from TScrapItemProvider.

Member Function: TScrapItemProvider::GiveAssociatedScrapTo

virtual bool GiveAssociatedScrapTo (TTypeDescription & theType, MScrapAcceptor & theAcceptor)

Interface Category:

API.

Purpose:

Gives the data associated with the specified type to the specified acceptor.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

Returns true if the acceptor accepted the data.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is a pure virtual function and must be overridden by classes deriving from TScrapItemProvider.

Member Function: TScrapItemProvider::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: TScrapItemProvider::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 a TInvalidVersionError if the version of the object on the stream is unknown to the version of the shared library installed.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TScrapItemProvider::TScrapItemProvider

  1. TScrapItemProvider ()
  2. TScrapItemProvider (const TScrapItemProvider &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

TScrapItemProvider is an abstract base class--all the constructors are protected. Do not instantiate this class.

Member Function: TScrapItemProvider::operator=

TScrapItemProvider & operator =(const TScrapItemProvider &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

Parameters:

Return Value:

Returns a const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

TScrapItemProvider is an abstract base class--all the constructors are protected. Do not instantiate this class.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.