extending enums

1,701 views
Skip to first unread message

sabretoothedhamster

unread,
Nov 13, 2010, 11:10:56 AM11/13/10
to Protocol Buffers
Hello everyone!

Is there any way to extend not only a message, but an enum also? E.g.
having the example from http://code.google.com/apis/protocolbuffers/docs/techniques.html
I would like to keep OneMessage description separated into two files.
Core part with Foo and Bar descriptions in one .proto file (like in
the second pre section), and the second .proto file with Baz
description. It is clear how to organize this on a message level, but
I would like also to have enum Type { FOO = 1; BAR = 2; } in the first
file, and enum Type { BAZ = 3; } in the second. Is it possible at all?
Any workarounds?

Kenton Varda

unread,
Nov 16, 2010, 11:11:42 PM11/16/10
to sabretoothedhamster, Protocol Buffers
There is no explicit support for this.  You can, of course, just use an integer instead.


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


Reply all
Reply to author
Forward
0 new messages