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 operations for generating C code (C code)
  
Setting up operations for generating C code (C code)
In addition to the standard Operation properties in Modeler, you can apply the «C Operation» stereotype to an Operation, and then use its 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 Operation as required. Tell me more...
3. If you want to generate the Operations of a Model, Package, Class, Data Type or Interface in a specific order, order the Operations as required. Tell me more...
4. Apply the «C Operation» stereotype to the Operation.
For information about applying Stereotypes to an item, see
5. If you want to generate the Operation as a function macro, apply the «CMacro» stereotype to the Operation. ACS generates the Operation as follows: #define <operation name> (<comma separated list of parameters>) <operation body code>
6. Open the Operation's Property Pages, and then click the C Operation tab.
For information about setting the tagged value of a Tag Definition, see
7. If you want to specify a CV qualifier for the Operation, set the tagged value of the C CV Qualifier tag definition as required.
8. If you want to specify indirection text for the Operation, such as * or *const, type the text as the tagged value of the C Indirection tag definition.
9. If you want to specify that the Operation is inline, set the tagged value of the C Inline tag definition to TRUE.
10. If you want to specify a storage class keyword for the Operation, set the tagged value of the C Storage Class tag definition to auto, register or extern.
11. If you want to specify that the Operation 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 the function pointer parameters as the tagged value of the C Function Pointer Parameters tag definition. The tag definitions are generated as follows for the Operation:
<C Function Pointer Return>(<C Indirection><derived C Name>(<Parameters>))(<C Function Pointer Parameters>);
Operation Implementation:
<C Function Pointer Return>(<C Indirection><derived C Name>(<Parameters>))(<C Function Pointer Parameters>);
* 
The <derived C Name> for the Operation Implementation is the scoped name unless the Operation is a non-member, in which case the unscoped name is used.
12. If you want to add comments to the Operation implementation code, specify the comments as the tagged value of the C Operation Implementation Comment tag definition. For information about setting up Parameters, see .