Recently, at the end of this topic was discussed the implementation of a method that retrieves the value of a data member using its name, as implemented now in TRestMetadata::GetDataMemberValue.
However, this seems to work only with numbers and strings. How should I get a TVector2 structure? I tried using vName.fX to get the X component, but it did not work.
Perhaps, if it is a complex structure, as TVector2 the REST_Reflection methods could identify this and just use the TVector2::Print method? for example…
Indeed the most straight forward solution is to write a very long code to iterate all possible types and handle their print logic. But I think there must be some existing code to do this. For example when you define a vector<int> object in root prompt, it will show its content. I am still looking a way to do this.