Package mapping for C (C code)
ACS generates a Package as a subfolder of the root directory, unless the Package is the root object. In the following example, the Package1 and Package2 Packages are generated as subfolders of the root directory.
If a Package owns any Attributes, Operations or Type Definitions, ACS generates a header and implementation file for the Package. The header and implementation files declare and define the Package's Attributes, Operations and Type Definitions, and are derived from the properties and the tagged values set for Tag Definitions that are applied by the «C Package» stereotype.
Child items:
If the Package owns Attributes, the Attributes are generated in the header and implementation files created for the Package. For Attribute mapping information, see Attribute mapping for C (C code)
Example code:
/* File foo.h */
int anAttribute;
If the Package owns Basic Types, the Basic Types are ignored.
If the Package owns Classes, header and implementation files are generated for each Class. For Class mapping information, see Class mapping for C (C code).
If the Package owns Dependencies, ACS typically generates #includes in the code. For Dependency mapping information, see Dependency mapping for C (C code).
Example code:
/* File foo.h */
#include "bar.h"
If the Model directly owns Data Types, header and implementation files are generated for each Data Type. For Data Type mapping information, see Data type mapping for C (C code).
If the Model directly owns Interfaces, a header file is generated for each Interface. For Interface mapping information, see Interface mapping for C (C code.
If the Package owns Operations, the Operations are generated in the header and implementation files created for the Package. For Operation mapping information, see Operation mapping for C (C code).
Example code:
/* File foo.h */
int anOperation();
If the Model directly owns Signals, header and implementation files are generated for each Signal. For Signal mapping information, see Signal mapping for C (C code).
If the Package owns Type Definitions, the Type Definitions are generated in the header and implementation files created for the Package. For Type Definition mapping information, see Type definition mapping for C (C code).
Example code:
/* File foo.h */
typedef char String[128];
Properties:
The Mapping property of a Package is ignored, but if ACS generates a Package that has Namespace mapping, a warning is added to the error log.
The Name property is generated as the name of the header and implementation files.
* 
ACS may modify the package name that is added to the code to make it valid for C. You can specify the exact package name to add to the code through the CODE_GENERATION_NAME property of a Package. Tell me more....
The Visibility property of a Package is ignored.
Tag Definitions:
The following tag definitions are applied to a Package by the «C Package» stereotype:
If the tagged value of the C Header Includetag definition has been set, the value is generated at the beginning of the header file so that you can generate your own #includes to files that are not modeled in the Model. Note that you can use Dependencies to generate #includes to other Classes, Data Types, Interfaces and Signals that are modeled in the Model.
If the tagged value of the C Implementation Includetag definition has been set, the value is generated at the beginning of the implementation file so that you can generate your own #includes to files that are not modeled in the Model. Note that you can use Dependencies to generate #includes to other Classes, Data Types, Interfaces and Signals that are modeled in the Model.