Previous Table of Contents Next


3.1 Overview

   The OMG Interface Definition Language (IDL) is the language used to describe the interfaces that client objects call and object implementations provide. An interface definition written in OMG IDL completely defines the interface and fully specifies each operation’s parameters. An OMG IDL interface provides the information needed to develop clients that use the interface’s operations.

   Clients are not written in OMG IDL, which is purely a descriptive language, but in languages for which mappings from OMG IDL concepts have been defined. The mapping of an OMG IDL concept to a client language construct will depend on the facilities available in the client language. For example, an OMG IDL exception might be mapped to a structure in a language that has no notion of exception, or to an exception in a language that does. The binding of OMG IDL concepts to several programming languages is described in this manual.

    The description of OMG IDL’s lexical conventions is presented in Section 3.2, “Lexical Conventions,? on page 3-3. A description of OMG IDL preprocessing is presented in Section 3.3, “Preprocessing,? on page 3-11. The scope rules for identifiers in an OMG IDL specification are described in Section 3.20, “Names and Scoping,? on page 3-67.

    OMG IDL is a declarative language. The grammar is presented in Section 3.4, “OMG IDL Grammar,? on page 3-12 and associated semantics is described in the rest of this chapter either in place or through references to other sections of this standard.

   OMG IDL-specific pragmas (those not defined for C++) may appear anywhere in a specification; the textual location of these pragmas may be semantically constrained by a particular implementation.

   A source file containing interface specifications written in OMG IDL must have an “.idl? extension.

   The description of OMG IDL grammar uses a syntax notation that is similar to Extended Backus-Naur Format (EBNF). Table 3-1 lists the symbols used in this format and their meaning.

   Table 3-1 IDL EBNF

Symbol

Meaning

::= Is defined to be
| Alternatively
<text> Nonterminal
“text? Literal
* The preceding syntactic unit can be repeated zero or more times
+ The preceding syntactic unit can be repeated one or more times
{} The enclosed syntactic units are grouped as a single syntactic unit
[] The enclosed syntactic unit is optional—may occur zero or one time