Class: TMemberFunctionConnection

Declaration: Notification.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TNotifierConnection

Inherited By:

TMemberFunctionConnectionTo

Purpose:

This class is the base class for TMemberFunctionConnectionTo. Its only purpose is to provide implementation sharing for instances of TMemberFunctionConnectionTo. It should never be used directly by clients. Clients should always use TMemberFunctionConnectionTo.

Instantiation:

Never instantiated directly by clients.

Deriving Classes:

TMemberFunctionConnectionTo is the only derived class.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TMemberFunctionConnection::TMemberFunctionConnection

  1. TMemberFunctionConnection (void * theReceiver, TNotificationMemberFunction * notifyFunction, ENotTheDefaultFunction)
  2. TMemberFunctionConnection (void * theReceiver, TNotificationMemberFunction * defaultFunction)
  3. TMemberFunctionConnection (void * theReceiver, TNotificationMemberFunction * defaultFunction, const TInterest &)
  4. TMemberFunctionConnection (TNotificationMemberFunction * notifyFunction)

Interface Category:

API.

Purpose:

  1. Creates a new member function connection with no default notification member function pointer.
  2. Creates a new member function with the specified member function to be used as the default notification handler.
  3. Creates a new member function with the specified member function to be used as the default notification handler and the interest to be added as the initial interest.
  4. Default constructor.
  5. There may be many different notification threads, so a receiver object that uses this templatized member function connection must be written to be multithread safe. See also TRequestBasedMemberFunctionConnectionTo.

Calling Context:

  1. Called by TMemberFunctionConnectionTo only.
  2. Called by TMemberFunctionConnectionTo only.
  3. Called by TMemberFunctionConnectionTo only.
  4. Called by TMemberFunctionConnectionTo only.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMemberFunctionConnection::~TMemberFunctionConnection

virtual ~ TMemberFunctionConnection ()

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:

Multithread safe.

Other Considerations:

None.

Member Function: TMemberFunctionConnection::GetVoidReceiver

void * GetVoidReceiver () const

Interface Category:

API.

Purpose:

Returns the receiver as void*.

Calling Context:

Called only by TMemberFunctionConnectionTo.

Parameters:

Return Value:

void * -The receiver.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMemberFunctionConnection::GetDefaultFunctionImplementation

const TNotificationMemberFunction * GetDefaultFunctionImplementation () const

Interface Category:

API.

Purpose:

Returns the default member function object.

Calling Context:

Called only by TMemberFunctionConnectionTo.

Parameters:

Return Value:

The default member function.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMemberFunctionConnection::SetVoidReceiver

  1. void SetVoidReceiver (void * theReceiver)
  2. void SetVoidReceiver (void * theReceiver, TNotificationMemberFunction * defaultFunction)

Interface Category:

API.

Purpose:

  1. Sets the receiver as a void *.
  2. Sets the receiver and default function.

Calling Context:

  1. Called only by TMemberFunctionConnectionTo.
  2. Called only by TMemberFunctionConnectionTo.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMemberFunctionConnection::RemoveAllInterests

virtual void RemoveAllInterests ()

Interface Category:

API.

Purpose:

Removes all of the connection's interests. If the connection is connected to the notifier, then it will no longer receive any notifications. However, it is still connected to the notifier and should be disconnected before being deleted.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMemberFunctionConnection::RemoveInterest

virtual void RemoveInterest (const TInterest &)

Interface Category:

API.

Purpose:

Removes all the interests that match the passed-in interest. The connection will no longer get notifications that are associated with this interest.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMemberFunctionConnection::Notify

virtual void Notify (const TNotification &, const TInterest &)

Interface Category:

API.

Purpose:

Called by the notifier to cause the connection to distribute the notification to the connection. The connection can then distribute the notification to its receiver object or a global receiver function.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMemberFunctionConnection::Connect

virtual void Connect ()

Interface Category:

API.

Purpose:

Performs a connect on the notifier and registers all of the connection's own interests with the notifier. After this point, the receiver will begin to receive notifications that match its interests.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMemberFunctionConnection::AddInterestImplementation

  1. void AddInterestImplementation (const TInterest &)
  2. void AddInterestImplementation (const TInterest &, TNotificationMemberFunction *)

Interface Category:

API.

Purpose:

  1. Shared implementation of add interest.
  2. Shared implementation of add interest with specific member function.

Calling Context:

  1. Called only by TMemberFunctionConnectionTo.
  2. Called only by TMemberFunctionConnectionTo.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMemberFunctionConnection::AdoptInterestImplementation

  1. void AdoptInterestImplementation (TInterest *)
  2. void AdoptInterestImplementation (TInterest *, TNotificationMemberFunction *)

Interface Category:

API.

Purpose:

  1. Shared implementation of add interest.
  2. Shared implementation of add interest with specific member function.

Calling Context:

  1. Called only by TMemberFunctionConnectionTo.
  2. Called only by TMemberFunctionConnectionTo.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

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.