Component Manager - Technical Details

Technical Details

A component was a piece of code that provided various functions that may be invoked by clients. Each function was identified by a signed 16-bit integer ID code. Non-positive codes were reserved for predefined functions that should be understood by all components—open/close a component instance, query whether a function was supported, etc. The meanings of positive function codes depended on the type of component.

A component instance was created by opening a component. This called the component's open function to allocate and initialize any necessary storage for the instance. Closing the instance got rid of this storage and invalidated all references to that instance.

Components and component instances were referenced by 32-bit values that were not pointers. Instead, they were interpreted as keys into internal Component Manager tables. These references were generated in such a way that, once they became invalid, those values were unlikely to become valid again for a long time. This minimized the chance of obscure bugs due to dangling references.

Components were identified by OSType codes giving their type, subtype and "manufacturer". For instance, a component type might be "raster image compressor", subtypes of which might exist for JPEG, H.261, Sorenson, and Intel Indeo, among others. It was possible to have multiple components registered with exactly the same identification codes, giving alternative implementations of the same algorithm for example using hardware versus software, trading off speed versus quality, or other criteria. It was possible for the applications to query the existence of such alternatives and make explicit choices between them, or let the system choose a default.

Among the options available, a component could delegate parts of its functions to another component as a form of subclassing for code reuse. It was also possible for one component to capture another, which meant that all accesses to the captured component had to go through the capturing one.

Read more about this topic:  Component Manager

Famous quotes containing the words technical and/or details:

    When you see something that is technically sweet, you go ahead and do it and you argue about what to do about it only after you have had your technical success. That is the way it was with the atomic bomb.
    J. Robert Oppenheimer (1904–1967)

    If my sons are to become the kind of men our daughters would be pleased to live among, attention to domestic details is critical. The hostilities that arise over housework...are crushing the daughters of my generation....Change takes time, but men’s continued obliviousness to home responsibilities is causing women everywhere to expire of trivialities.
    Mary Kay Blakely (20th century)