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 > Changing code generation definition in a TDK code generation transformation patterns model > Overview of changing a TDK code generation transformation patterns model
  
Overview of changing a TDK code generation transformation patterns model
When you change the definition of how code is generated in a TDK Code Generation Transformation Patterns model, do not change the provided Classes in the TDK Code Generation Transformation Patterns model.
* 
If you change provided Classes in a TDK Code Generation Transformation Patterns model (or anything in the Model2Text and TDK Generator Framework packages), those changes will be lost should you update the TDK Code Generation Transformation Patterns model with improvements provided in a future release of Modeler.
Fortunately, you can change the definition of how code is generated, without changing the content of the Model2Text and TDK Generator Framework packages.
Declaring new meta classes
The provided Meta Classes reside in the Generator::Structure package.
If you need to create new Meta Classes, create a Package outside of the Model2Text and TDK Generator Framework packages, and then create your new Meta Classes in that Package.
For more information about Meta Classes, see:
Declaration of Modeler item types and extended properties - 4G meta classes (TDK)
Declaring new meta classes in a TDK code generation transformation patterns model
Declaring extended properties of a provided meta class
The provided Meta Classes define their extended properties through Attributes.
If you need to declare new extended properties on a provided Meta Class, for example, should you want to generate code for a new Tag Definition you have introduced, do not declare the extended properties on a provided Meta Class.
To declare extended properties, create a new Class outside of the Model2Text and TDK Generator Framework packages, declare the extended properties on that Class, and then link that Class to the Meta Class through a Dependency of type Abstraction that is stereotyped by the 4GExtends stereotype - the Meta Class then inherits the new extended properties.
For more information about declaring extended properties, see:
Declaration of Modeler item types and extended properties - 4G meta classes (TDK)
Declaring extended properties in a TDK code generation transformation patterns model
* 
After creating a Class to declare extended properties, instead of linking the Class to a Meta Class, you can use a Dependency of type Abstraction that is stereotyped by the 4GExtends stereotype to link the Class directly to any 4G Business Classes or 4G Generation Classes that use those extended properties.
Creating new 4G business classes
The provided 4G Business Classes reside in the Generator::Model2Text package.
If you need to create new 4G Business Classes, create a Package outside of the Model2Text and TDK Generator Framework packages, and then create your new 4G Business Classes in that Package.
After creating a new 4G Business Class, new 4G Generation Classes and other 4G Business Classes can inherit its Rules and Operations through Generalizations.
For more information about 4G Business Classes, see:
Creating and extending 4G business classes in a TDK code generation transformation patterns model
Reuse of rules and operations - 4G business classes (TDK)
Creating new 4G generation classes
The provided 4G Generation Classes reside in the Generator::Model2Text package. In addition, Attach Point 4G Generation Classes reside in the Generator::Model2Text::CustomizationAttachPoints package.
If you need to create new 4G Generation Classes, create a Package outside of the Model2Text and TDK Generator Framework packages, and then create your new 4G Generation Classes in that Package.
To include your 4G Generation Class in the chain of responsibility without changing the content of the Model2Text and TDK Generator Framework packages, you must add your 4G Generation Class to the beginning of the chain of responsibility so that it is considered before any of the provided 4G Generation Classes.
* 
The first 4G Generation Class in a chain of responsibility will typically be an Attach Point 4G Generation Class, which resides in the Generator::Model2Text::CustomizationAttachPoints package.
For more information about 4G Generation Classes, see Creating alternative 4G generation classes in a TDK code generation transformation patterns model
Changing provided 4G generation classes
The provided 4G Generation Classes reside in the Generator::Model2Text package.
If you feel you have to change the definition of code generation in a provided 4G Generation Class, create a clone of the 4G Generation Class outside of the Model2Text and TDK Generator Framework packages, and then add that clone to the beginning of the chain of responsibility; you can then change the definition of code generation on the clone, and it will be used to generate code instead of the 4G Generation Class you cloned.
Reverse engineering additional tagged text
The provided GenClass classes that defined how code specific tagged text is reverse engineered reside in the Generator::Reversers package.
If you want to create new GenClass Classes to reverse engineer additional tagged text, create a Package outside of the Model2Text and TDK Generator Framework packages, and then create your new GenClass classes in that Package.
For more information about GenClass classes for reverse engineering 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)