![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TRequestBasedMemberFunctionConnection
Inherited By:
None.
Purpose:
This is similar to the member function connection, except that that notifications are distributed to the receiver object using the object's own request queue. The advantage of this is that the receiver object is manipulated from only one thread and thus does not have to deal with any concurrency issues such as locking its data.
Instantiation:
Always allocate on the heap.
Deriving Classes:
This class is not intended for deriving.
Concurrency:
Multithread safe.
Resource Use:
No special requirements.
- TRequestBasedMemberFunctionConnectionTo (AReceiver * theReceiver, TRequestProcessor * processorToUse)
- TRequestBasedMemberFunctionConnectionTo (AReceiver * theReceiver, TRequestProcessor * processorToUse, MemberFunction defaultFunction)
- TRequestBasedMemberFunctionConnectionTo (AReceiver * theReceiver, TRequestProcessor * processorToUse, MemberFunction defaultFunction, const TInterest & theInterest)
- TRequestBasedMemberFunctionConnectionTo ()
Interface Category:
API.
Purpose:
- Creates a new request based member function connection with no default notification member function pointer. The request processor is not adopted, it is aliased. The request process is used to serialize the notifications that a receiver object will get with other requests made against the object. Thus, the receiver object does not have to deal with concurrency issues.
- Creates a new request based member function with the specified member function to be used as the default notification handler. The request processor is not adopted, it is aliased. The request process is used to serialize the notifications that a receiver object will get with other requests made against the object. Thus, the receiver object does not have to deal with concurrency issues.
- Creates a new request based 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. The request processor is not adopted, it is aliased. The request process is used to serialize the notifications that a receiver object will get with other requests made against the object. Thus, the receiver object does not have to deal with concurrency issues.
- Default constructor.
Calling Context:
- Call this function directly.
- Call this function directly.
- Call this function directly.
- Called by the stream-in operators and directly.
Parameters:
- AReceiver * theReceiver -The object to receive the notifications.
- TRequestProcessor * processorToUse -The aliased request processor to be used to dispatch the notifications to the receiver object.
- AReceiver * theReceiver -The object to receive the notifications.
- TRequestProcessor * processorToUse -The aliased request processor to be used to dispatch the notifications to the receiver object.
- MemberFunction 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.
- TRequestProcessor * processorToUse -The aliased request processor to be used to dispatch the notifications to the receiver object.
- MemberFunction 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 ~ TRequestBasedMemberFunctionConnectionTo ()
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.
AReceiver * GetReceiver () const
Interface Category:
API.
Purpose:
Gets the object that will receive the notifications.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the receiver object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
MemberFunction GetDefaultFunction () const
Interface Category:
API.
Purpose:
Gets the member function that will be invoked on the receiver to handle a notification associated with an interest that does not have its own special notification handler member function.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the default notification handler member function.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
- void SetReceiver (AReceiver * theReceiver)
- void SetReceiver (AReceiver * theReceiver, MemberFunction defaultFunction)
Interface Category:
API.
Purpose:
- Changes the object that will receive the notifications.
- Changes the object that will receive the notifications and the default notification handler member function.
Calling Context:
- Call this function directly.
- Call this function directly.
Parameters:
- AReceiver * theReceiver -The object to receive the notifications.
- AReceiver * theReceiver -The object to receive the notifications.
- MemberFunction defaultFunction -The default notification handler member function.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
- virtual void AddInterest (const TInterest &)
- void AddInterest (const TInterest &, MemberFunction)
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 member 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 member function will be invoked against the object 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.
- MemberFunction -The notification handler member 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 *)
- void AdoptInterest (TInterest *, MemberFunction)
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 member 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 member function will be invoked against the object 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.
- MemberFunction -The notification handler member function for notifications associated with this interest.
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.