IOHDDriveNub


Abstract: "Impedance-matcher" class to connect Generic device driver to Transport Driver.

The IOHDDriveNub class exports the generic hard disk protocol, forwarding all requests to its provider (the Transport Driver). Though the nub does no actual processing of requests, it is necessary in a C++ environment. The Transport Driver can be of any type, as long as it inherits from IOService. Because Transport Drivers needn't derive from a type known to IOHDDrive, it isn't possible for IOHDDrive to include the appropriate header file to allow direct communication with the Transport Driver. Thus we achieve polymorphism by having the Transport Driver instantiate a subclass of IOHDDriveNub. A typical implementation for a concrete subclass of IOHDDriveNub (e.g. IOSCSIHDDriveNub) simply relays all methods to its provider (the Transport Driver).

All pure-virtual functions must be implemented by the Transport Driver, which is responsible for instantiating the Nub.

© 2000 Apple Computer, Inc. — (Last Updated 2/23/2000)