From 51168e70b530c6920411680d5e6dde7aeaba164c Mon Sep 17 00:00:00 2001 From: Hugo Lima Date: Sat, 17 Oct 2009 13:41:44 -0300 Subject: - Typesystem documentation broken in smaller parts, so it's more redable now (IMO). - Added cross referencing for nodes cited along the documentation. - Added documentation for the new and not implemented yet, add-function tag. --- doc/typesystem_templates.rst | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 doc/typesystem_templates.rst (limited to 'doc/typesystem_templates.rst') diff --git a/doc/typesystem_templates.rst b/doc/typesystem_templates.rst new file mode 100644 index 000000000..31b155c5a --- /dev/null +++ b/doc/typesystem_templates.rst @@ -0,0 +1,55 @@ +.. _using-code-templates: + +Using Code Templates +-------------------- + +template +^^^^^^^^ + + The template node registers a template that can be used to avoid duplicate + code when extending the generated code, and it is a child of the typesystem + node. + + .. code-block:: xml + + + + + + Use the insert-template node to insert the template code (identified by the + template's ``name`` attribute) into the generated code base. + + +insert-template +^^^^^^^^^^^^^^^ + + The insert-template node includes the code template identified by the name + attribute, and it can be a child of the inject-code, conversion-rule, template, + custom-constructor and custom-destructor nodes. + + .. code-block:: xml + + + + + + Use the replace node to modify the template code. + + +replace +^^^^^^^ + + The replace node allows you to modify template code before inserting it into + the generated code, and it can be a child of the insert-template node. + + .. code-block:: xml + + + + + + This node will replace the attribute ``from`` with the value pointed by + ``to``. + -- cgit v1.2.3