Interfaces define the signatures of CORBA component methods. Each method must be declared as an IDL operation in the IDL interface.
Interfaces are declared as shown below:
interface InterfaceName [: BaseInterface1, BaseInterface2, ...] { operations };
where:
InterfaceName is the name of the interface.
operations is a zero or more of IDL operation declarations. See “Operation declarations”.
BaseInterface, BaseInterface2, and so forth form an optional list of existing interfaces from which the new interface inherits definitions. If a new interface inherits from other existing interfaces, the existing interfaces that are inherited from are referred to as base interfaces, and the new interface is referred to as a derived interface.
For example, this interface, StockComponent, inherits from no other interface:
interface StockComponent {
};
This interface, C, inherits from interfaces A and B:
interface C : A, B {
}
Interfaces that inherit definitions from other interfaces are subject to the following constraints:
Operations and attributes cannot be redefined in the new interface.
Operation and attribute names defined in base interfaces must be unique. For example, if a method is defined in both interface A and interface B, you cannot define a new interface that inherits from both B and A.
Exceptions, constants, and types from a base interface can be redefined in the derived interface.
References to type names, exception names, and constant names that are used in multiple derived interfaces must be made unambiguous by prefixing references with the name of the interface that contains the definition of interest. For example, if the constant MAX is defined in both A and B, then A::MAX refers to the definition in A, and B::MAX refers to the definition in B.