Right, I guess I didn't explain why they don't work in this case.
Generating .proto files from C++ headers is obviously the reverse of
the normal sequence.  In the PB method of versioning, the
original .proto is written and deployed.  The next version then writes
an extension of the original.  If the .proto file is generated from C+
+ headers, every time the headers are changed, the .proto is wiped out
and replaced with a new one.  This is dangerous if a new C++ class
version redefines a field - it would break old code.

To sum up, you'd lose the benefits of the PB versioning system.  You
certainly could generate .proto files from C++, but I don't know what
you'd use them for - if you wanted to generate, for example, Java
bindings from them, then just write the .proto file manually in the
first place and generate C++ and Java bindings from that.

That being said, you could still use the Protocol Buffers wire format,
but you'd probably need to add a version tag to each message.  You can
use extend the Boost Serialization library for this, and Mike, I have
a note or two on this if you're interested.

And there's still the possibility that I've completely missed
something :)
--~--~---------~--~----~------------~-------~--~----~
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