Class: TDocumentScrapItemAcceptor

Declaration: DocumentScrapItemAcceptor.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TScrapItemAcceptor

Inherited By:

None.

Purpose:

TDocumentScrapItemAcceptor is an abstract base class that defines the protocol necessary to implement an acceptor for Workspace entities. Acceptors are used by Workspace entities to accept items dropped on them during a drag and drop operation. The acceptor and the drag source negotiate over the type used to transfer information from the source to the acceptor. Acceptor classes are attached to a Workspace entity type via the utility program AddWorkspaceDropAcceptor and removed with RemoveWorkspaceDropAcceptor.

Instantiation:

Abstract base class; do not allocate.

Deriving Classes:

Derived classes must override the pure virtual functions ChoosePreferredTypeForDocument and AcceptScrapItemForDocument.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TDocumentScrapItemAcceptor::~TDocumentScrapItemAcceptor

virtual ~ TDocumentScrapItemAcceptor ()

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: TDocumentScrapItemAcceptor::operator>>=

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: TDocumentScrapItemAcceptor::operator<<=

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 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: TDocumentScrapItemAcceptor::ChoosePreferredTypeForDocument

virtual bool ChoosePreferredTypeForDocument (const TDocumentReference & representedDocument, const TPlaceReference & placeContext, const TSequenceOf < TTypeDescription > & availableTypes, TTypeDescription & chosenType) const

Interface Category:

API.

Purpose:

Chooses from the specified list the type preferred by this acceptor to accept the specified document. This function is called as part of the type negotiation performed between the drag source and this acceptor object.

Calling Context:

Called when the user drops an item on the Workspace entity to which this acceptor is attached.

Parameters:

Return Value:

Returns true if this function chose one of the types from the list; false otherwise.

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 TDocumentScrapItemAcceptor.

Member Function: TDocumentScrapItemAcceptor::AcceptScrapItemForDocument

virtual bool AcceptScrapItemForDocument (const TDocumentReference & representedDocument, const TPlaceReference & placeContext, const TTypeDescription & type, const TScrapItem & scrapItem)

Interface Category:

API.

Purpose:

Accepts the specified scrap item. This function is only called after the drag source and this object has agreed on a type description.

Calling Context:

Called to accept an item dropped on the Workspace entity associated with this drop acceptor.

Parameters:

Return Value:

Returns true if the scrap item was accepted by this function; false otherwise.

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 TDocumentScrapItemAcceptor.

Member Function: TDocumentScrapItemAcceptor::TDocumentScrapItemAcceptor

  1. TDocumentScrapItemAcceptor ()
  2. TDocumentScrapItemAcceptor (const TDocumentScrapItemAcceptor & source)

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:

TDocumentScrapItemAcceptor is an abstract base class. Do not instantiate this class.

Member Function: TDocumentScrapItemAcceptor::operator=

TDocumentScrapItemAcceptor & operator =(const TDocumentScrapItemAcceptor & source)

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:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.