Deriving a new caucus member class

TCaucusMember includes a series of pure virtual functions that you must override to create a concrete caucus member class. Not all of these member functions are used directly; some are used by objects of other classes, such as TCaucusSendMessage and TCaucusReceiveMessage.

NOTE This section briefly introduces the member functions you need to override. For the detailed descriptions of each member function that you need to override, refer to the class and member function descriptions, available online.

At minimum, you need to override the member functions:

Clients that use the Caucus framework call Leave and GetIdentity directly.

TCaucusSendMessage objects use StartSend and EndSend. The TCaucusSendMessage constructor calls StartSend to obtain a stream that it can write to. The destructor calls EndSend, passing a pointer to the stream back to the caucus member using this member function.

The operator TStream& ( ) const allows you to stream to and from send message and receive message objects.

TCaucusReceiveMessage objects use the StartReceive and EndReceive member functions similarly. One difference, however, is that the abstract interface defines three StartReceive member functions, each providing a different level of information on the incoming message. Typically, a client calls only one TCaucusReceiveMessage constructor, based on the client's need for information.

NOTE The most derived destructor of TCaucusMember must call the Leave member function to ensure that a leave message is issued when the member is destroyed.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker