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.
- TMemberFunctionConnection (void * theReceiver, TNotificationMemberFunction * notifyFunction, ENotTheDefaultFunction)
- TMemberFunctionConnection (void * theReceiver, TNotificationMemberFunction * defaultFunction)
- TMemberFunctionConnection (void * theReceiver, TNotificationMemberFunction * defaultFunction, const TInterest &)
- TMemberFunctionConnection (TNotificationMemberFunction * notifyFunction)
Interface Category:
API.
Purpose:
- Creates a new member function connection with no default notification member function pointer.
- Creates a new member function with the specified member function to be used as the default notification handler.
- 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.
- Default constructor.
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:
- Called by TMemberFunctionConnectionTo only.
- Called by TMemberFunctionConnectionTo only.
- Called by TMemberFunctionConnectionTo only.
- Called by TMemberFunctionConnectionTo only.
Parameters:
- AReceiver * theReceiver -The object to receive the notifications.
- ENotTheDefaultFunction -Indicates no default function provided.
- TNotificationMemberFunction* defaultFunction -Member function instance used to call member functions in typesafe way.
- AReceiver * theReceiver -The object to receive the notifications.
- TNotificationMemberFunction* defaultFunction -The member function of the object that will be called to handle notifications on interests that do not have their own specified member function.
- AReceiver * theReceiver -The object to receive the notifications.
- TNotificationMemberFunction* defaultFunction -The member function of the object that will be called to handle notifications on interests that do not have their own specified member 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 ~ 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.
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.
- void SetVoidReceiver (void * theReceiver)
- void SetVoidReceiver (void * theReceiver, TNotificationMemberFunction * defaultFunction)
Interface Category:
API.
Purpose:
- Sets the receiver as a void *.
- Sets the receiver and default function.
Calling Context:
- Called only by TMemberFunctionConnectionTo.
- Called only by TMemberFunctionConnectionTo.
Parameters:
- void * theReceiver -The receiver object as void*.
- void * theReceiver -The receiver object as void*.
- TNotificationMemberFunction * defaultFunction -The default function.
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.
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 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 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.
- void AddInterestImplementation (const TInterest &)
- void AddInterestImplementation (const TInterest &, TNotificationMemberFunction *)
Interface Category:
API.
Purpose:
- Shared implementation of add interest.
- Shared implementation of add interest with specific member function.
Calling Context:
- Called only by TMemberFunctionConnectionTo.
- Called only by TMemberFunctionConnectionTo.
Parameters:
- const TInterest & -The interest.
- const TInterest & -The interest.
- TNotificationMemberFunction * -The member function to call.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
- void AdoptInterestImplementation (TInterest *)
- void AdoptInterestImplementation (TInterest *, TNotificationMemberFunction *)
Interface Category:
API.
Purpose:
- Shared implementation of add interest.
- Shared implementation of add interest with specific member function.
Calling Context:
- Called only by TMemberFunctionConnectionTo.
- Called only by TMemberFunctionConnectionTo.
Parameters:
- const TInterest * -The interest.
- const TInterest * -The interest.
- TNotificationMemberFunction * -The member function to call.
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.