Inheriting from generated C++ classes for adding Qt QString accessors. Problems expected?
Hi all I'd like to add some Qt specific addditions to some generated gpb classes, but I note the warning on the first C++ page of the documentation: You should not create your own Foo subclasses. If you subclass this class and override a virtual method, the override may be ignored, as many generated method calls are de-virtualized to improve performance. I should be fine as long as I don't use any of the already defined member names shouldn't I? Bart --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Swap() and RemoveLast() should be added to Reflection API
Hi - I noticed that the functionality for Swap() and RemoveLast() was not available to reflection. I needed them and tried to add them in a branch, and it seemed trivial enough (especially RemoveLast). Is there anything that I missed? Is there a reason that this is more complex than I can see or was it simply not added yet? Thanks, Scott --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Inheriting from generated C++ classes for adding Qt QString accessors. Problems expected?
If you are OK with the possibility that future versions of protocol buffers may break your code (probably in minor ways), then you can do whatever you want. If you aren't OK with that, then you should not subclass protocol buffer types. There are tons of ways that future changes to the implementation could break you. This is known generally as the fragile base class problem. On Mon, Mar 9, 2009 at 3:00 AM, bart van deenen bart.vandee...@gmail.comwrote: Hi all I'd like to add some Qt specific addditions to some generated gpb classes, but I note the warning on the first C++ page of the documentation: You should not create your own Foo subclasses. If you subclass this class and override a virtual method, the override may be ignored, as many generated method calls are de-virtualized to improve performance. I should be fine as long as I don't use any of the already defined member names shouldn't I? Bart --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Any protocol buffers MIME types?
As part of ongoing work looking at RPC (over a range of transports), one thing that keeps cropping up is sending messages via a RESTful API over http[s] (so the method to invoke it part of the URI, with the message as the body); pretty trivial to do, but I wonder: is there any common MIME type that anyone has used for such? Or just application/ octet-stream? Marc Gravell --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Any protocol buffers MIME types?
We haven't defined a MIME type. Does it make sense to define a MIME type for protocol buffers in general, as opposed to MIME types for individual protocols? The latter makes more sense to me, since there's not much you can do with a protocol buffer without knowing its type. On Mon, Mar 9, 2009 at 2:11 PM, Marc Gravell marc.grav...@gmail.com wrote: As part of ongoing work looking at RPC (over a range of transports), one thing that keeps cropping up is sending messages via a RESTful API over http[s] (so the method to invoke it part of the URI, with the message as the body); pretty trivial to do, but I wonder: is there any common MIME type that anyone has used for such? Or just application/ octet-stream? Marc Gravell --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---