I am just wondering if there is a way to implement automatically public getter and setter methods inside our ROOT-ified classes.
We are lazy while implementing our c++ classes
Perhaps this feature already exists and we are not aware of. Anyhow, it would be great if we could add a modifier (e.g {get/set}) at each data member that triggers the get/set methods implementation at the dictionary generation stage.
For example, if we would write something like
Int_t fDummyMember = 0; //< {get/set}
Then at the dictionary generation stage it would automatically generate
This way, you avoid relying on ‘undefined’ meta-behavior of dictionary generation (some user in the future might remove things thinking it’s just a comment, but it’s actually changing code). Which happened to me several times when using ROOT GUI Classes, where comments, exclamation marks, etc., play a role in signals, transients, context menu, ClassDef titles, etc.
Which is not the most robust programming choice in my opinion.