Previous | Table of Contents | Next |
A <component_header> declares the primary characteristics of a component interface.
3.17.2.1 Syntax
The syntax for declaring a component header is as follows:
(115) <component_header> ::= “component? <identifier> [ <component_inheritance_spec> ] [ <supported_interface_spec> ]
(116)<supported_interface_spec> ::= “supports? <scoped_name> { “,? <scoped_name> }* (117)<component_inheritance_spec>::= “:?
<scoped_name>
A component header comprises the following elements:
• the keyword component.
•an <identifier> that names the component type.
• an optional <inheritance_spec>, consisting of a colon and a single <scoped_name> that must denote a previously-defined component type.
• an optional <supported_interface_spec> that must denote one or more previously-defined IDL interfaces.
3.17.2.2 Supported interfaces
A component may optionally support one or more interfaces. When a component definition header includes a supports clause
as follows:
component <component_name> supports <interface_name> { … };
For further detail see the CORBA Components specification, chapter 1, section 1.4.5 (Supported Interfaces).
3.17.2.3 Component Inheritance
A component may optionally inherit from a component that supports one or more interfaces. This is specified by using the
inheritance construct that looks like:
component <component_name> : <component_name> { ... };
The following rules apply to component inheritance:
• A derived component type may not directly support an interface.
• The interface for a derived component type is derived from the interface of its base component type.
• A component type may have at most one base component type.
• The features of a component that are inherited by the derived component are:
• the provides statements • the uses statements • the emits statements • the publishes statements • the consumes statements • attributes
See Section 3.17.2.3, “Component Inheritance,? on page 3-60 for details of component
inheritance.