Generation of Programs from Templates

ASN1C has the capability to generate custom application programs using code generated by the compiler. The custom programs are formed by combining code from user created template files with generated code. Placeholders are built into the template code which are replaced with the compiler generated items.

The -gen-from-template command-line option or 'Generate program from template' GUI option is used to generate these types of programs.

Currently, the following placeholders in a template file may be specified for replacement:

Examples of some template files may be found in the templates directory within the installation. Templates are used to generate the client and server application programs described in the last section. These templates can be modified to change what is generated when those commands are used.

In the release, only templates in the C/C++ programming language are supported.