1. Is there anything incorrect in my understanding so far?:

* Descriptors = INTROSPECTION (querying the message structure at
runtime)
* Reflection = Introspection + MODIFYING the message structure at
runtime
* Descriptors and Reflection are implemented as C++ structures with
member functions
* These structures are shared by all instances of the same message
class

If so, I would be interested to know how several message objects can
share the same structure (underlying implementation).

2. Both the lines below print the value of the name field in Message1.
Are there big performance or other differences between how each method
gets the value?

Message Message1;
Message& ref=Message1; //reference to message1

cout<<Message1.name();
cout<<Message1.GetReflection()->GetString( ref,
stabiliser.GetDescriptor()->FindFieldByName("name"));

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to