Family Split

Part of the ObjectBasedProgramming pattern language. Discussion occurs on FamilySplitDiscussion.

Original at http://www.geocities.com/SiliconValley/Foothills/5962/familysplit.htm


This pattern is under development.

Intent

Provide a strategy to design space efficient instance data.

Motivation

Instance data designed with the application of the FamilyFusion pattern can be very space-inefficient under some circumstances. A more space-efficient design is required.

Applicability

Use the FamilySplit pattern when

Solution

The attributes common to all subclasses (or a significant portion) are stored in the primary instance data structure. Creation of auxiliary instance data structure to store the sub-class specific information.

Extreme case - each subclass would have its own data structure

Consequences

The FamilySplit pattern has three important consequences:

  1. Require more sophisticated buffer management.

  2. Higher complexity in the polymorphic function.

  3. Lower memory consumption.

Sample Code

This section is to be filled in.

Known Uses

This section is to be filled in.

Related Patterns

This pattern provides a strategy to design the instance data introduced by the InstanceData pattern.

The FamilyFusion pattern describes a different technique to design the instance data structure for a class family.


EditText of this page (last edited August 12, 1998) or FindPage with title or text search