A .idl file forms a naming scope (or scope). Modules, interface statements, structures, unions, methods, and exceptions form nested scopes. An identifier can only be defined once in a particular scope. Identifiers can be redefined in nested scopes.
Names can be used in an unqualified form within a scope, and the name will be resolved by successively searching the enclosing scopes. Once an unqualified name is defined in an enclosing scope, that name cannot be redefined.
Fully qualified names are of the form:
scoped-name::identifier
For example, method name "meth" defined within interface "Test" of module "M1" would have the fully qualified name:
M1::Test::meth
A qualified name is resolved by first resolving the "scoped-name" to a particular scope S, then locating the definition of "identifier" within that scope. Enclosing scopes of S are not searched.
Qualified names of the form:
::identifier
These names are resolved by locating the definition of "identifier" within the smallest enclosing module.
Every name defined in an IDL specification is given a global name, constructed as follows:
The names of types, constants, and exceptions defined by the parents of a class are accessible in the child class. References to these names must be unambiguous. Ambiguities can be resolved by using a scoped name (prefacing the name with the name of the class that defines it and the characters "::", as in "parent-class::identifier). Scope names can also be used to refer to a constant, type, or exception name defined by a parent class but redefined by the child class.