Conditional Class

Traditional classes are suitable for representing essential and static identities of objects, but they may be too rigid and inflexible for describing nonessential and volatile characteristics of objects.

A conditional class is a collection of loosely connected objects. Unlike a traditional class, it doesn't ``create'' new members using the constructor, but issues membership to members of other classes that satisfy certain conditions. Such memberships may be cancelled once the conditions are no longer satisfied.

By using conditional classes, it is possible to avoid unnecessary programming complexity, too many levels of multiple inheritance, and frequent object creations and destructions.



Subsections

oz 2009-12-22