Interface Implication

Meta Data Services Programming

Meta Data Services Programming

Interface Implication

Interface implication enables a client application to define a correspondence between two interfaces in an information model such that all of the members on one interface are available to members of another interface. Interface implication offers some of the functionality of multiple inheritance, which is not allowed in COM.

Interface implication supports information model definitions of the form Interface-I1-implies Interface I2, which means that any class that implements I1 also implements I2. Consequently, if I1 is added to the list of implemented interfaces on a class, I2 will be added to the list automatically. The engine supports implication for such classes, whether the interfaces exist at the time of the implication definition, or are installed into the repository at a later time.

Extending an Information Model Using Interface Implication

Interface implication facilitates information model extension. By using interface implication, you can define a new interface and require that all new and existing classes support it. Interface implication eliminates the need to write a custom procedure that updates existing classes so that they support the new interface.

For example, consider the two interfaces IA and IB shown in the following figure. Suppose that all classes implementing IA now need to implement IB as well. By using interface implication, you can define IA-implies-IB, as shown in the following figure. This ensures that any class that implements IA, such as C, will also implement IB, even if class C is installed after the implication has been defined.

Note  In previous versions of the repository engine, interface implication was accomplished only by using the Model Development Kit (MDK). With this release, this restriction no longer applies.

For more information about creating information models by using the MDK, see the Microsoft® SQL Server™ 2000 Meta Data Services Software Development Kit (SDK).

See Also

Adding an Interface Implication

Defining Inheritance

Simulating Multiple Inheritance