Download Tutorial - Mia

Transcript
Use the contextual menu "Add tags" on the "toString" template to add the BeginTag and EndTag
scripts.
Figure 55 - Adding tags
The scripts BeginTag and EndTag are templates themselves. We can therefore call other
templates or macros in these scripts. The BeginTag script will allow you to delimit the beginning of
the text zone that will be manually inserted, and the EndTag will mark the end of this zone.
During generation, if the file does not exist, the code is generated with the tags, and between the
tags, the text that is defined in the script between the calls to BeginTag and to EndTag. On the
other hand, if the file exists, the BeginTag script is evaluated and if the tag is present in the file, the
text which is between the two tags of the file, is recovered and replaced between the two generated
tags.
The result of the evaluation of a BeginTag and of an EndTag must be unique in a generation
(you cannot, for example, generate a tag “//Start of user code” two times). In addition, BeginTag
and EndTag should not contain carriage returns.
Figure 56 – Unique BeginTag
MIA-Generation
Tutorial
This document is the property of Mia-Software.
It cannot be reproduced, even partially, by any means, without prior written permission.
39