Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > Ada Code > Generating Ada code > Modeling Ada code in Modeler > Modeling task types in Modeler (Ada code)
  
Modeling task types in Modeler (Ada code)
You model a task type through a Class or Data Type and its Operations:
The Class or Data Type must be stereotyped by the «Ada Task» stereotype.
The task type body code is modeled through an Operation:
The Operation is stereotyped by the «Ada Create» stereotype.
The Operation Body property specifies the task type body code.
Each entry of the task type is modeled through an Operation stereotyped by the «Ada Entry» stereotype. Entry parameters are modeled through Operation Parameters.
To create an instance of the task type, create an Attribute, and then select the task type Class or Data Type as the Attribute's data type.
For example:
* 
This procedure applies only to the Ada 83 and Ada 95 Code Generator DLL.
To model a task type in Modeler:
1. If you have not done so already, add the Ada Profile package to the Model. How?
2. Create a Class or Data Type to represent the task type:
a. Create a Class or Data Type. If the Class or Data Type is a child of a Package, the Package must have Namespace mapping.
b. Name the Class or Data Type to that of the task type.
c. Apply the «Ada Task» stereotype to the Class or Data Type. How?
3. Create an Operation for the task type body code:
a. Create a child Operation of the Class or Data Type.
We recommend that you name the Operation to that of the Class or Data Type.
b. Apply the «Ada Create» stereotype to the Operation. How?
c. Specify the task type body code in the Body property of the Operation.
4. For each entry in the task type:
a. Create a child Operation of the Class or Data Type.
b. Name the Operation to that of the entry.
c. Apply the «Ada Entry» stereotype to the Operation. How?
d. If the entry uses an array of Ada entries, use the appropriate «Ada Entry» stereotype tag definitions to record the array:
For an array such as (1..6), use the Ada Entry Family Index tag definition.
For an array such as (T), where T is a type, use Ada Entry Family Index Type tag definition to reference the appropriate Type Definition.
e. Set the properties of the Operation as required.
f. Create Operation Parameters to model any entry parameters.
5. If you want to generate the task type body as a separate:
a. Apply the «Ada Separate» stereotype to the Operation. How?
b. Through the Ada Parent Subprogram tag definition (applied by the «Ada Separate» stereotype), reference the Operation that is generated as the subprogram that owns the separate.