Package mapping for IDL (IDL code)
If the Package directly contains any Attributes, Classes, Connectors, Data Types, Exceptions, Port Types, Signals, Structures, Type Definitions, Unions or Value Types, ACS generates an IDL file for the Package. ACS generates code similar to this:
//============================================
/// @file Package1.idl
//============================================
#ifndef PACKAGE1_IDL
#define PACKAGE1_IDL
...
#endif
For each Package, ACS generates a subfolder in the working directory unless the Package is set up to generate a module, or the «source» stereotype is applied to the Package and the tagged value of the Ignore tag definition is set to TRUE.
A Package is set up to generate a Module when the «CORBAModule» stereotype is applied to it, or when its Mapping property set to Namespace.
The generation of a Package is derived from its child items and its properties.
Child items:
• If the Package owns
Components that are not assemblies and contain items requiring generation, ACS generates an IDL file for each Component. ACS may use Components that are assemblies for generating CDP files. For Component mapping information, see
Component mapping for IDL.
• If the Package owns Connectors, ACS generates a struct declaration for each Connector. ACS may use Connectors for generating CDP files. For Connector mapping information,
• If the Package owns Packages, ACS generates the sub-Packages as subfolders and modules depending on the Package's mapping.
Other child items are ignored.
Properties:
• If the Description property has a value, ACS generates the Description as a comment.
• ACS generates the Name property as the name of the IDL package and folder.
| ACS may modify the folder name to make it valid for IDL. You can specify the exact folder name through the CODE_GENERATION_NAME property of a Package.
Tell me more... |
• The Mapping property can determine whether the Package is generated as a module (Namespace mapping) or a folder (Folder mapping):
◦ If the Mapping property is set to Namespace, ACS generates the Package as a module. No subfolder is generated.
◦ If the Mapping property is set to Folder, ACS generates the Package as a subfolder, unless the «source» stereotype is applied to the Package and the Ignore tag definition is set to TRUE, in which case ACS does not generate a subfolder.
Important: If the «CORBAModule» stereotype is applied to the Package, ACS generates the Package as a module with no subfolder.
Other properties are ignored.
Tag Definitions:
If the «CORBAModule» stereotype is applied to the Package, ACS generates the Package as a module with no subfolder, irrespective of whether the Mapping is set to Namespace or Folder.
The following Tag Definitions are applied to a Package by the «Source» stereotype from the IDL Profile:
• If the tagged value of the File Name tag definition is set, ACS generates the value as the name of the generated file.
• If the tagged value of the ignore tag definition is set to TRUE, ACS does not generate a folder for the Package and the IDL file is generated in the folder that is created for the closest scoping Package.
• If the tagged value of the includes tag definition has been set, ACS generates the text at the beginning of the IDL file, that is, the file include directives for the IDL file.
Reverser Notes : When reverse engineering file include directives, the Reverser attempts to model the import statements as Dependencies in the Model. If the Reverser cannot model the import statements through Dependencies, the file include directives are recorded through the Includes tag definition.