Signal mapping for C (C code)
For each Signal that is not nested, ACS generates a header file (.h) and an implementation file (.c). Each Signal maps to a struct in the header file created for the Signal.
The struct declaration and implementation is derived from the items it owns and properties of the Signal.
Child items:
If a typed Part (Attribute) has an Association that has not been rolled up to the Part's type, ACS generates a nested struct that is derived from the Part's type. The nested struct defines the Role that is modeled against the Part.
If a Signal owns Parts (Attributes or Roles) that are connected through an Association, initialization code is generated in the constructor for the Signal.
• If the Signal owns Classes through nested Classes, the nested Classes are generated within the struct declaration, unless its C Non Member tag definition is set to TRUE.
If a typed Part (Role) has an Association that has not been rolled up to the Part's type, ACS generates a nested struct that is derived from the Part's type. The nested struct defines the Role that is modeled against the Part.
If a Signal owns Parts (Attributes or Roles) that are connected through an Association, initialization code is generated in the constructor for the Signal.
Other child items are ignored.
Properties:
• The Abstract property is ignored.
• If the Description property has a value, ACS generates the description as a comment on the line before the struct declaration.
• The Formal Template Parameters property is ignored.
• The Name property is generated as the name of the header and implementation files, and the name of the struct in the code.
|
ACS may modify the struct name that is added to the code to make it valid for C. You can specify the exact struct name to add to the code through the CODE_GENERATION_NAME property of a Signal.
Tell me more...
|
• The Persistent property is ignored.
• The Template property is ignored.
• The Template Specialization Parameters property is ignored.
• The Template Specialization property is ignored.
• If the Union property is set to TRUE (Union check box selected in Property Pages), the Signal is generated as a union.
• If the Visibility property is set to Public or Protected, the struct is declared in the header file. If the Visibility property is set to Private, the struct is declared in the implementation file. For nested Signals, this property is ignored.
Tag Definitions:
None