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.
- TFunctionConnection (NotificationFunction theDefaultFunction)
- TFunctionConnection (NotificationFunction theDefaultFunction, const TInterest &)
- TFunctionConnection ()
Interface Category:
API.
Purpose:
- Creates a new function connection with the specified global function to be used as the default notification handler.
- 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.
- Default constructor.
Calling Context:
- Call this function directly.
- Call this function directly.
- Called by the stream-in operators and directly.
Parameters:
- NotificationFunction theDefaultFunction -The global function that will be called to handle notifications on interests that do not have their own specified global function.
- NotificationFunction theDefaultFunction -The global function that will be called to handle notifications on interests that do not have their own specified global function.
- const TInterest & -The initial interest.
- Takes no parameters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
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.
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:
- const TNotification & -The notification to distribute.
- const TInterest & -The interest used to match the connections that will get the distributed notification.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
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:
- NotificationFunction theDefaultFunction -The default notification handler function.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
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.
- virtual void AddInterest (const TInterest &)
- virtual void AddInterest (const TInterest &, NotificationFunction)
Interface Category:
API.
Purpose:
- 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.
- 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:
- Call this function directly.
- Call this function directly.
Parameters:
- const TInterest & -The interest specifying which notifications to receive.
- const TInterest & -The interest specifying which notifications to receive.
- NotificationFunction -The notification handler global function for notifications associated with this interest.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
- virtual void AdoptInterest (TInterest *)
- virtual void AdoptInterest (TInterest *, NotificationFunction)
Interface Category:
API.
Purpose:
- 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.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:
- Call this function directly.
- Call this function directly.
Parameters:
- TInterest * -The interest specifying which notifications to receive.
- TInterest * -The interest specifying which notifications to receive.
- NotificationFunction -The notification handler global function for notifications associated with this interest.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
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.
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.