Defining an abstract child base class

The abstract child base class defines the interface for remote member function calls handled by child objects. These are the member functions that are specific to a particular object type in the collection. If your collection manages five types of objects, you might have five dispatcher implementation classes that derive from the abstract child base--each overriding the member functions in a way specific to the object type.

For example, for a server that manages fonts, each font might be capable of the same functions, but implement them differently. In this case, you define a single abstract child base class, but derive a number of dispatcher implementation classes from that one base. Each derived class represents a different font type.

When the parent dispatcher gets a request, it identifies the font type and returns the child ID for the child dispatcher that handles that font type. The child caller then issues requests directly to the dispatcher that owns the implementation class for that specific behavior.


[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