[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[henshin-user] How to easily increment (add 1 to) a parameter?
Dear Henshin Users,
in the process of creating a set of Henshin Units and Rules I stumbled
upon a task, which ideally should be easy to deal with: I want to
increment an integer parameter. I attached an image of the units and
rules I set up to do this. It feels very bloated if you consider the
only thing which should be done is incrementing a parameter.
The attached image shows the unit incrementHour which takes the IN
parameter "hour" and outputs the OUT parameter "oneMore" which is
hour+1. The object Temp you can see in the rules exists for the sole
purpose to make incrementing possible. It has one attribute "tempInt"
of type EInt, which temporarily stores the parameter value that is
going to be incremented.
Do you have any idea how to do this "better"? E.g. one of the following
- less rules/units,
- without an instance object,
- or whatever you consider smarter
I would be happy to hear any suggestions from you.
Description: PNG image