Class: TFunctionConnection

Declaration: Notification.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TNotifierConnection

Inherited By:

None.

Purpose:

This is similar to the member function connection, except that that notifications are distributed to a the global receiver function.

Instantiation:

Always allocate on the heap.

Deriving classes:

This classes is not intended for deriving.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TFunctionConnection::TFunctionConnection

  1. TFunctionConnection (NotificationFunction theDefaultFunction)
  2. TFunctionConnection (NotificationFunction theDefaultFunction, const TInterest &)
  3. TFunctionConnection ()

Interface Category:

API.

Purpose:

  1. Creates a new function connection with the specified global function to be used as the default notification handler.
  2. Creates a new function with the specified member function to be used as the default notification handler and the interest to be added as the initial interest.
  3. Default constructor.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.
  3. Called by the stream-in operators and directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TFunctionConnection::~TFunctionConnection

virtual ~ TFunctionConnection ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TFunctionConnection::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: TFunctionConnection::SetDefaultFunction

virtual void SetDefaultFunction (NotificationFunction theDefaultFunction)

Interface Category:

API.

Purpose:

Changes the global function that will be invoked to handle a notification associated with an interest that does not have its own special notification handler global 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: TFunctionConnection::GetDefaultFunction

virtual NotificationFunction GetDefaultFunction () const

Interface Category:

API.

Purpose:

Gets the global function that will be invoked to handle a notification associated with an interest that does not have its own special notification handler global function.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the default notification handler.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TFunctionConnection::AddInterest

  1. virtual void AddInterest (const TInterest &)
  2. virtual void AddInterest (const TInterest &, NotificationFunction)

Interface Category:

API.

Purpose:

  1. Adds an interest for a notification. A new interest is added by a client of a notifier to express the desire to receive notifications that are generated and that are associated with this interest. If the connection is already connected to the notifier, then the receiver will immediately begin to receive the notifications associated with this interest. The default notification handler global function of the object will be called for notifications associated with this interest.
  2. Adds an interest for a notification. A new interest is added by a client of a notifier to express the desire to receive notifications that are generated and that are associated with this interest. If the connection is already connected to the notifier, then the receiver will immediately begin to receive the notifications associated with this interest. The specified global function will be invoked when notifications associated with this interest arrive.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TFunctionConnection::AdoptInterest

  1. virtual void AdoptInterest (TInterest *)
  2. virtual void AdoptInterest (TInterest *, NotificationFunction)

Interface Category:

API.

Purpose:

  1. Adopts an existing interest into the connection's own collection of interests. A new interest is added by a client of a notifier to express the desire to receive notifications that are generated and that are associated with this interest. If the connection is already connected to the notifier, then the receiver will immediately begin to receive the notifications associated with this interest. The default notification handler global function of the object will be called for notifications associated with this interest.
  2. 2.Adopts an existing interest into the connection's own collection of interests. A new interest is added by a client of a notifier to express the desire to receive notifications that are generated and that are associated with this interest. If the connection is already connected to the notifier, then the receiver will immediately begin to receive the notifications associated with this interest. The specified global function will be invoked when notifications associated with this interest arrive.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TFunctionConnection::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: TFunctionConnection::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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.