Previous Table of Contents Next


1.2.5 Interfaces


   Short Long LongLong UShort Ulong UlongLong Float Double LongDouble Fixed Char Wchar String Wstring Struct Boolean Sequence Octet Union Enum Array Any

   An interface is a description of a set of possible operations that a client may request of an object, through that interface. It provides a syntactic description of how a service provided by an object supporting this interface, is accessed via this set of operations. An object satisfies an interface if it provides its service through the operations of the interface according to the specification of the operations (see Section 1.2.8, “Operations,? on page 1-7).

   The interface type for a given interface is an object type, such that an object reference will satisfy the type, if and only if the referent object also satisfies the interface.

   Interfaces are specified in OMG IDL. Interface inheritance provides the composition mechanism for permitting an object to support multiple interfaces. The principal interface is simply the most-specific interface that the object supports, and consists of all operations in the transitive closure of the interface inheritance graph.

   Interfaces satisfy the Liskov substitution principle. If interface A is derived from interface B, then a reference to an object that supports interface A can be used where the formal type of a parameter is declared to be B.