Hello everybody,
I’m playing with Reflex, now I’m able to look up the structure of my classes, but I have some problem to access the members of a real object via the Reflex system.
Let’s suppose I have a class named MyClass which has an int data member called MyType:
//I get the class type object
MyClass my;
Reflex::Type tt= Reflex::Type::ByName(“MyClass”);
if(tt.IsClass()){
// I get the oject decribing the data member
Member dm = tt.DataMemberByName(“MyType”);
Now from documentation (:? ) Member has a method Get( ) that can be used to access the real data member into the “my” object, but I do not understand how it works, especially about the type casting .
Can you provide an example.
Regards,
Paolo.
Paolo Zuccon, Ph.D.
INFN – Sezione di Perugia