In my application, I have a need to track characteristics of message
fields on a field-by-field basis, e.g. has this field changed. This is
very much like what is already done in libprotobuf code for tracking
whether a field has been set yet. Looking under the hood, I found the
_has_bits_, a simple bitfield tracking mechanism, and thought I could
reuse this for tracking other characteristics my app is interested in.
So far, though, it looks like the bit numbers are hard-coded in the
_set_bit/_clear_bit/has_bit method calls. Is there any plan to modify
the compiler to define these field bits as constants or at least
#defines in the generated c++ header file?

Aside from this general question, is there another simple way you can
think of to track what fields have changed? I couldn't find anything
in the API that allowed diff'ing two instances of the same message
class. (I also couldn't find any equality operators, so had to define
that myself; please advise if this was unnecessary.)

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

Reply via email to