I'm constructing sequence diagrams using the preprocessor and macros like this:
!definelong CALL_METHOD(FROM_CLASS, TO_CLASS, FUNC_NAME)
'!define RETURN FROM_CLASS <-- TO_CLASS
FROM_CLASS -> TO_CLASS: FUNC_NAME()
FROM_CLASS <-- TO_CLASS
I use it like this:
CALL_METHOD(Taxi, Customer, getMoney)
This leads to the inclusion of the block getMoney from the file Customer.iuml at the position of the CALL_METHOD statement.
The second line in the macro (!define RETURN FROM_CLASS <-- TO_CLASS) is supposed to define the string RETURN in a way that it can be used inside the getMoney block, i.e. it should be expanded to FROM_CLASS <-- TO_CLASS and thereby generate an arrow pointing back to the caller (Taxi, in this case).
Is there a way I can make this work? Can I have a nested !define and have it visible in files, that are included in the scope of the CALL_METHOD macro?
Thanks for your help!