Previous Table of Contents Next


9.5 Preconditions for IDL Generation

   The IDL mapping may not produce valid CORBA IDL if any of the following preconditions on the input meta-model is not satisfied:

   “An identifier is an arbitrarily long sequence of ASCII alphabetic, digit and underscore (“_?) characters. The firstd character must be an ASCII alphabetic character.?

    Names of Model Elements that have a valid “idl_substitute_name? Tag are excepted from this precondition; (see 9.6.2.1, “Substitute Name,? on page 196 ).

   NOTE: No such requirement applies to Model Elements such as Tags whose names are not visible in the IDL mapping. However, for these “invisible? elements it is advisable to use a naming convention that minimizes the risk of name collision within the Namespace itself.

   NOTE: This precludes circular importing and circular clustering. It also precludes recursion between “pure? DataTypes. (The two exceptions correspond to cases that can be expressed in OMG IDL using forward interface declarations.)

   CORBA 2.3 adds an additional IDL restriction: “The name of an interface or a module may not be redefined within the immediate scope of the interface of the module.? For example:

   module M { typedef short M; // Error: M is the name of the module // in the scope of which the typedef is interface I { void i (in short j); // Error: i clashes with the interface }; };

   The IDL templates in this specification do not contain any patterns of this form. However, poor choice of names in a meta-model may generate IDL that violates this restriction. In particular, the same name should not be used for both a container and its contents. For example, a Package should not have the same name as one of its Classes, DataTypes, or Associations. A Class should not have the same name as one of its Attributes or References. An Association should not have the same name as one of its AssociationEnds.