Previous Table of Contents Next


3.17.1 Component


   A component declaration describes an interface for a component. The salient characteristics of a component declaration are as follows:

   3.17.1.1 Syntax

   The syntax for declaring a component is as follows:

   (112) <component> ::= <component_dcl>

   | <component_forward_dcl> (113)<component_forward_dcl>::= “component? <identifier>

   (114) <component_dcl> ::= <component_header> “{? <component_body> “}?

   <component_forward_dcl> is described in Section 3.17.1.2, “Forward Declaration.

   <component_header> is described in Section 3.17.2, “Component Header.

   <component_body> is described in Section 3.17.3, “Component Body.

   3.17.1.2 Forward Declaration

   A forward declaration declares the name of a component without defining it. This permits the definition of components that refer to each other. The syntax consists simply of the keyword component followed by an <identifier> that names the component. The actual definition must follow later in the specification.

   Multiple forward declarations of the same component name are legal.

   It is illegal to inherit from a forward-declared component whose definition has not yet been seen.