how is it possible to mark a parameter as call-by-value for delphi code generation?
Currently all my parameters are generated as call-by-reference => “var”-keyword is prefixed!
But what is with methods like: setXY(var newValue : LongInt) ?
I don’t want to pass the parameter by reference…
And how can I apply this setting, if it exists, to an attribute marked with the stereotype “Property” => I want the setter-param is also generated as call-by-value…
Thank you for your post. Having discussed your case, we decided to determine whether a parameter should pass by value or by reference by checking the value of in/out property (You can see in the Parameter specification). Concerning the getter/setter, we are considering to change it to pass by value. I will keep you informed on any news about those reported issues.
We’ve made a patch that solves your problem. Please download the Windows installer at:
To use it, just execute, and overwrite the old installation. This patch is for VP-UML version 7.0. Please make sure your license key supports it.
Check the in/out value for parameter to determine whether the parameter will pass by value or reference:
in = by value
inout = by reference
out = by reference
return = by reference
Change getter and setter to pass by value
Hope this helps.
thanks for your reply and the fast patching!
I’ll try it as soon as possible and post the results here!
I tried and it worked! Fine!
May you decide to implement a setting/stereotype for fields (with sterotype property assigned) to switch the setter-parameter to by-ref or by-val… But for now your patch works
Glad to know that it’s working as expected. I am uncertain to Delphi, but I will pass your opinion to our team for further studies. Will let you know if you will support your request. Thanks for your suggestion!
Have a nice weekend!