|
In an object-oriented program, it is common to have a collection of interconnected objects of a variety of types. To manipulate such a collection, it is often desirable to be able to extend the functionality of the individual objects, in different ways for different and independent clients, and possibly for more than one client at a time. The complete set of potential clients may not be known when the code for the collection is compiled, or when the collection is actually built. Furthermore, it is desirable to be able to extend the functionality of the various objects in a type-safe manner.
"Shadowing" is a flexible way to solve this problem that permits a collection of objects to be projected from one type-space to another. Internally, a simple form of run-time typing is used to provide type-safety. Both the shadow technology and the run-time typing technology use a specialized utility called autodefine that automates many of the implementation details.
|