Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > C Code > Generating C Code > Overview of generating C code (C code) > Overview of modeling C code (C code) > Setting up attributes for generating C code (C code)
  
Setting up attributes for generating C code (C code)
In addition to the standard Attribute properties in Modeler, you can apply the «C Attribute» stereotype to an Attribute, and then use their Tag Definitions to define C specific information.
1. If you have not done so already, add the C Profile package to your Model. How?
2. Set the standard properties of the Attribute as required. Tell me more... If you want ACS to generate an Attribute as a #define rather than an attribute, set up the Attribute as Read Only with a Default, but no Type. You can then ignore the rest of this procedure.
3. If you want to generate the Attributes of a Model, Package, Class, Data Type, Interface or Signal in a specific order, order the Attributes as required. Tell me more...
4. Apply the u«C Attribute» stereotype to the Attribute. For information about applying Stereotypes to an item, see Applying a stereotype to a model item.
5. Open the Attribute's Property Pages, and then click the C Attribute tab. For information about setting the tagged value of a Tag Definition, see Setting a tagged value for an applied tag definition.
6. If you want to specify array text for the Attribute, type the text as the tagged value of the C Array Spec tag definition.
7. If you want to specify a CV qualifier for the Attribute, set the tagged value of the C CV Qualifier tag definition as required.
8. If you want to specify indirection text for the Attribute, such as * or *const, type the text as the tagged value of the C Indirection tag definition.
9. If you want to specify a storage class keyword for the Attribute, set the tagged value of the C Storage Class tag definition to auto, register or extern.
10. If you want to specify bitfield width text for the Attribute, type the text as the tagged value of the C Bitfield tag definition.
11. If you want to specify that the Attribute is of type 'pointer to function', specify the function pointer return as the tagged value of the C Function Pointer Return tag definition and specify any function pointer parameters as the tagged value of the C Function Pointer Parameters tag definition. The tag definitions are generated as follows for the Attribute: <C Function Pointer Return> (<C Indirection><derived C Name>)(<C Function Pointer Parameters>);
12. If you want the Attribute to be generated with no name, set the tagged value of the C Anonymous Item tag definition to TRUE.