Previous | Table of Contents | Next |
The syntax of a repository identifier prefix declaration is as follows:
(103) <type_prefix_dcl> ::= “typeprefix? <scoped_name> <string_literal>
A repository identifier declaration includes the following elements:
• the keyword typeprefix
•a <scoped_name> that denotes an IDL name scope to which the prefix applies
• a string literal that must contain the string to be prefixed to repository identifiers in the specified name scope
The <scoped_name> is resolved according to normal IDL name resolution rules, based on the scope in which the declaration occurs.
It must denote a previously-declared name of one of the following IDL constructs:
• module
• interface (including abstract or local interface)
• value type (including abstract, custom, and box value types)
• event type (including abstract and custom value types)
• specification scope ( :: )
The specified string is prefixed to the body of all repository identifiers in the specified name scope, whose values are assigned
by default. To elaborate:
By “prefixed to the body of a repository identifier,? we mean that the specified string is inserted into the default IDL format
repository identifier immediately after the format name and colon ( “IDL:? ) at the beginning of the identifier. A forward
slash ( ‘/’ ) character is inserted between the end of the specified string and the remaining body of the repository identifier.
The prefix is only applied to repository identifiers whose values are not explicitly assigned by a typeid declaration. The
prefix is applied to all such repository identifiers in the specified name scope, including the identifier of the construct
that constitutes the name scope.