Supporting Multiple Interfaces With Overlapping Functionality

Meta Data Services Programming

Meta Data Services Programming

Supporting Multiple Interfaces With Overlapping Functionality

As an information model changes to accommodate new functionality, it is common to create a new interface by evolving an existing interface. In this situation, the two interfaces (the old and new versions) have overlapping functionality. The two interfaces can exist together when the old version of the interface must still be supported. In this case, properties can be renamed and placed on different interfaces while keeping the underlying semantics synchronized between the interfaces.

The following graph shows an object exposing the two interfaces:

I1: An interface with a base member M1.

I2: An interface with a derived member M2.

By using member delegation from I2 to I1, the user can either call the base member (that is, I1::M1), or call the derived member (that is, I2::M2), which will be delegated to I1::M1.

For more information about other ways of combining interface members, see Flattening Interfaces and Simulating Multiple Inheritance.

See Also

Creating a Derived Member

Derived Members

Interface Implication