Interface and Implementation Classes
The design of the DB Interface Module uses the Interface/Implementation paradigm. Interface classes model objects in the application domain. Each interface class has an associated implementation class, which is used to implement the semantics defined by the interface class.
NOTE: Interface classes are public, and model objects in the application domain. Implementation classes are private, and implement the semantics of their associated interface classes.
This paradigm is familiar to most C++ programmers. For example, many beginning texts present examples of simple classes like string that follow the paradigm. A typical string class might be designed as an interface class that defines the semantics of the class and contains a pointer to a reference-counted implementation class, which provides the services of data storage, memory management, and so on.
The public class hierarchy of the DB Interface Module consists of a set of interface classes that are concrete, as opposed to abstract. These concrete classes function as is without requiring further derivation. As interface classes, they do no work and store no data themselves. Instead, each interface class instance consists of a pointer to an implementation class instance, and forwards all function calls to it. The implementation classes are not part of the public hierarchy. Only the interface classes are visible to the application programmer.