Templates are the heart of the code generation system: they read a
dotgen
specification and produce a bunch of source files from
it. Templates can produce virtually any kind of code, but they are
usually used to produce a server or a client implementation of the
component(s) described in the input specification.
A template is invoked on a dotgen
specification by invoking genom3
with the template name followed by one or several input files (see the
manual for details).
A number of base templates are provided by genom3
. These are the
skeleton
, mappings
and interactive
templates described
hereafter. Additional templates can be made available by installing
extra packages. At the time of writing, there exist for instance a
pocolibs
and a ros
template that both provide a server and several
kind of clients implementations. The list of available templates can
be obtained by the command genom3 -l
(see the
general options).
New templates can be developed by using the TCL
code generator
engine (Creating Templates).
Skeleton: Creating initial codels
Mappings: Generating IDL mappings
Interactive: Running the TCL engine interactively
Creating Templates: Producing your own code