To use different features we have implemented following structure: see Figure 2.2, “Model of the feature structure” .
In fact features are divided into 2
to 3 groups. The main groups
PreFeatures do something before the
generation, so for example they
prepare the PostFeatures. PostFeatures
do something after the
generation, but maybe they need
before they can do
The 3rd group is the
. PostProcessors are
stuff after generation of one file and before
the file is
closed (they can also do stuff with the file
written). Maybe they also need preparation.
difference between PostFeatures and PostProcessors is that
PostFeatures are used after all
and PostProcessors are
used after one file is
In Figure 2.3, “Activity diagram of the generation process in correlation with the features ” you can see how the features are invoked during the generation process.
All features from the 3 groups can be added to the generator through the workflow file. The order of the groups is indifferent, but the order in the groups is important in the workflow file.
- PreFeatures can be added with the beginning phrase
- PostFeatures can be added with the beginning phrase
- PostProcessors can be added with the beginning phrase
Every feature can be added with one of the following 3 structures:
Complete with feature specific properties [and an optional ID (to identify the same instance in another statement)].
<preFeature class="QualifiedClassName" id="optionalID" > <aProperty value="propertyValue" /> </preFeature>
Without properties (standard values will be used) [and an optional ID].
<postFeature class="QualifiedClassName" id="optionalID" />
Only with a reference of a previously used feature, so the previously used instance is used again. Please note that, when using references, it's not possible to set properties for the feature in this section.
<postProcessor idRef="optionalID" />