Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > Transformation Development Kit (TDK) > Customizing an ACS Code Generator DLL > Customizing a TDK code generation transformation patterns model - current TDK models > How TDK code generation transformation patterns models define code generation > What's in a TDK code generation transformation patterns model (TDK)
  
What's in a TDK code generation transformation patterns model (TDK)
This topic introduces you to the Packages and Classes that appear in a TDK Code Generation Transformation Patterns model.
* 
Do not change anything contained within the Generator or TDK Generator Framework packages - if you do so, your changes will be lost should you update the TDK Code Generation Transformation Patterns model with improvements provided in a future release of Modeler. You can customize a TDK Code Generation Transformation Patterns model without making changes within the Generator or TDK Generator Framework packages.
Package Structure
When you open a TDK Code Generation Transformation Patterns model, you will find Packages similar to as follows.
The only Packages that contain content of interest regarding customization are the following packages:
The Model2Text package contains Classes that define how the ACS Code Generator DLL is going to generate code.
The Reversers package contains Classes that define how the ACS Code Generator DLL is going to reverse engineer code specific tagged text in the code.
The Structure package contains Classes that declare Modeler items and extended properties with which the generated ACS Code Generator DLL will work.
The other Packages in a TDK Code Generation Transformation Patterns model contain profiles and other Classes concerned with the TDK generation of the ACS Code Generator DLL.
Model2Text package - Code Generation
When you want to customize how an ACS Code Generator DLL generates code, in the associated TDK Code Generation Transformation Patterns model you create Classes and Operations to extend the provided Classes and Operations in the Model2Text package.
The Model2Text package contains the following Class types:
4G Generation Classes — Classes that are stereotyped by the 4GGen stereotype. These Classes define how the ACS Code Generator DLL will generate code through Generation Rules and Operations.
4G Business Classes — Classes that are stereotyped by the 4GBusiness stereotype. These Classes are for reuse purposes only, they contain Generation Rules and Operations that can be used by many 4G Generation Classes.
The Model2Text package contains the following packages:
The CustomizationAttachPoints package contains 4G Generation Classes that are the first 4G Generation Classes in the chain of responsibility when generating code for the Model, Packages, Classes, Attributes, Operations, Roles, Type Definitions and Parameters. These 4G Generation Classes do not generate any code. Tell me more...
The C# Metatypes package contains Class Diagrams that show how the 4G Generation Classes and 4G Business Classes relate with each other for generating different aspects of the code.
The C# Studio Metatypes package contains Class Diagrams that show how the 4G Generation Classes and 4G Business Classes relate with each other for generating different Modeler items.
* 
Do not change the provided 4G Generation Classes and 4G Business Classes - if you do so, your changes will be lost should you update the TDK Code Generation Transformation Patterns model with improvements provided in a future release of Modeler.
For more information about changing how code is generated, see:
Creating alternative 4G generation classes in a TDK code generation transformation patterns model
Creating and extending 4G business classes in a TDK code generation transformation patterns model
Definition of how code is generated - 4G generation classes (TDK)
Reversers package - Reverse engineering of tagged text
When you want to customize how an ACS Code Generator DLL reverse engineers tagged text in the code, in the associated TDK Code Generation Transformation Patterns model you create Classes and Attributes to extend the provided Classes and Attributes in the Reversers package.
The Reversers package contains the following Class types:
4G GenClass classes — Classes that are stereotyped by the GenClass stereotype. These Classes define how the ACS Code Generator DLL will reverse engineer tagged text from the generated code files.
The Reversers package contains the following diagrams:
Reversers class diagram — shows the relationships between 4G GenClasses specific to the code being generated and the 4G GenClasses provided in the TDK Generator Framework.
* 
Do not change the provided 4G GenClasses - if you do so, your changes will be lost should you update the TDK Code Generation Transformation Patterns model with improvements provided in a future release of Modeler.
For more information about reverse engineering of tagged text, see:
Creating GenClass classes to reverse engineer tagged text in a TDK code generation transformation patterns model
Definition of how tagged text is reverse engineered - 4G GenClass classes (TDK)
Structure package - Meta Classes and Diagrams
When you customize a TDK Code Generation Transformation Patterns model, you will only have to create new Meta Classes or extend provided Meta Classes under the following conditions:
You want the generated ACS Code Generator DLL to work with a Modeler item type that is not being worked with at present. The Classes in the Structure package map to Modeler item types.
You want the ACS Code Generator DLL to work with an extended property that is not being worked with at present. This may be the case should you introduce a new Tag Definition from which you want to generate code.
The Structure package includes the following diagrams:
Structure class diagram — shows the relationships between the meta classes.
Mapping class diagram — shows which 4G Generation Classes use each meta class.
* 
Do not change the provided Meta Classes - if you do so, your changes will be lost should you update the TDK Code Generation Transformation Patterns model with improvements provided in a future release of Modeler.
For more information about extending Meta Classes, see:
Declaration of Modeler item types and extended properties - 4G meta classes (TDK)
Declaring extended properties in a TDK code generation transformation patterns model
Declaring new meta classes in a TDK code generation transformation patterns model