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
Attributes, ACS generates an attribute declaration for each Attribute. For Attribute mapping information, see
Attribute mapping for IDL • If the Package owns
Basic Types, the Basic Types are ignored. For Basic Type mapping information, see
Basic Type mapping for IDL.
• If the Package owns
Bound Modules, ACS generates an IDL file for each Bound Module. ACS may use Bound Modules for generating CDP files. For Bound Module mapping information, see
Bound module mapping for IDL.
• If the Package owns
Classes, ACS generates a struct declaration for each Class. For Class mapping information, see
Class mapping for IDL.
• 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
Data Types, ACS generates a struct declaration for each Data Type. For Data Type mapping information, see
Data type mapping for IDL.
• If the Package owns
Deployment Plans, ACS generates a CDP file for each Deployment Plan. For Deployment Plan mapping information, see
Deployment plan item (IDL code).
• If the Package owns
Domains, ACS generates a CDD file for each Domain. For Domain mapping information, see see
Domain item (IDL code) • If the Package owns
Events, ACS may use those Events for generating CDP files. For Exception mapping information, see
Exception mapping for IDL.
• If the Package owns
Exception, ACS generates an exception declaration for each Exception. ACS may use Exceptions for generating CDP files. For Exception mapping information, see
Exception mapping for IDL • If the Package owns
Interfaces, ACS generates an IDL file for each Interface. ACS may use Interfaces for generating CDP files. For Interface mapping information, see
Interface mapping for IDL.
• If the Package owns
Messages, ACS generates an IDL file for each Message. ACS may use Messages for generating CDP files. For Message mapping information, see
Message mapping for IDL.
• If the Package owns Packages, ACS generates the sub-Packages as subfolders and modules depending on the Package's mapping.
• If the Package owns
Port Types, ACS generates struct declaration for each Port Type. ACS may use Port Types to generate CDP files. For Port Type mapping information, see
Port type mapping for IDL • If the Package owns
Signals, ACS generates a struct declaration for each Signal. For Signal mapping information, see
Signal mapping for IDL • If the Package owns
Structure, ACS generates a struct for each Structure. ACS may use Structures for generating CDP files. For Structure mapping information, see
Structure mapping for IDL.
• If the Package owns
Type Definitions, ACS generates a typedef or enum declaration for each Type Definition. For Type Definition mapping information, see
Type Definition mapping for IDL.
• If the Package owns
Unions, ACS generates a union declaration for each Union. ACS may use Unions for generating CDP files. For Union mapping information, see
Union mapping for IDL.
• If the Package owns
Value Types, ACS generates a valuetype declaration for each Value Type. ACS may use Value Types for generating CDP files. For Value Type mapping information, see
Value type mapping for IDL.
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.