Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > SDL script for generating code > SDL script extensions for TDK > Special modules - GenerateStart.sdl, GenerateEnd.sdl, Reverse.sdl and OperationBody.sdl (SDL script)
  
Special modules - GenerateStart.sdl, GenerateEnd.sdl, Reverse.sdl and OperationBody.sdl (SDL script)
This topic applies to TDK SDL script extensions. For more information, see Overview of SDL script extensions for TDK (SDL script).
SDL Script Extensions for TDK:
Generate.sdl, GenerateStart.sdl, GenerateEnd.sdl, Reverse.sdl and OperationBody.sdl are special modules. They are executed at specific times in the generation and reverse process
The Generate.sdl file is called once for each class, package and model during the generation process.
TDK SDL scripts can include these extra SDL files with reserved names:
GenerateStart.sdl – Called once per generation process, before any call to Generate.sdl.
GenerateEnd.sdl – Called once per generation process after all classes, packages and the model have been processed by Generate.sdl.
Reverse.sdl – Called when ACS is idle but one of the generated files gets changed externally due to user save-to-disk operation.
OperationBody.sdl – Called during generation process each time a %operation_body% macro is executed.
When a generation process takes place, the framework calls GenerateStart.sdl once, then calls Generate.sdl for each class, package and the model, then calls GenerateEnd.sdl once.
Generate.sdl is mandatory.
If one of the other modules is missing, a default behavior is replaced:
Default GenerateStart.sdl and GenerateEnd.sdl do nothing at all.
Default OperationBody.sdl generates the <current language> Text attribute of the current Operation object between tags.
Default Reverse.sdl reverses the content of ## Operation ... ## OperationEnd tags back to the operation Text (and Ada Declarations for the Ada language).
See the C++ TDK generator model for detailed examples.