Your approach actually won't work (at least, as you've written the code)
because if you write two messages to a stream without any sort of delimiter,
it's impossible to figure out later where one message ends and the other
starts.
But I suggest doing this instead:
message A {
...
}
message B {
Reviewers: eric.perie_hp.com,
Description:
Hi Eric, I decided to do this patch a little differently -- in
particular, I moved the actual string concatenation to occur in
Descriptors.java rather than in generated code. I also added a test.
At Google we have a policy of reviewing all changes befor
Hi again,
I have two classes where B extends from A. Since both classes are
legacy and as far as I understood protocol buffers I write a proto
file for class A. For serialization and deserialization I just add the
methods writeObject() and readObject() to class A.
Now I wonder how to write the p
Ah. Sure, that sounds reasonable.
On Mon, Aug 3, 2009 at 2:15 PM, Tai wrote:
>
> Sorry but maybe my post is somehow confusing. I try to migrate my java
> class into a protocal message class. Now I have a field like:
>
> publiy MyClass {
>
>Class anotherClass
>
> }
>
> I wonder how I should
Protocol message classes can only contain other protocol message classes,
not arbitrary Java classes. Otherwise, what would happen when you compile
the same .proto file in C++ or another language?
On Mon, Aug 3, 2009 at 1:14 PM, Tai wrote:
>
> Hi,
>
> I guess this is a simple question. I have a
Sorry but maybe my post is somehow confusing. I try to migrate my java
class into a protocal message class. Now I have a field like:
publiy MyClass {
Class anotherClass
}
I wonder how I should define that in a proto file (MyClassMessage).
Maybe like this:
message MyClass {
required st
lgtm
New version is much nicer. Suck about the crashing bug in pkg-config. =(
Jeff Bailey >|< Google, Inc. >|< +1 514 670-8754
On Thu, Jul 30, 2009 at 3:00 PM, Kenton Varda wrote:
> New patch: Use pkg-config instead. Much simpler.
>
>
> On Thu, Jul 30, 2009 at 10:05 AM, Jeff Bailey wrote:
>
Hi,
I guess this is a simple question. I have a Java class with an
attribute which is a class. How do I define that in a proto file?
Maybe the full qualified class name?
Thanks Tai
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
On Sat, Aug 1, 2009 at 4:42 AM, Jon Skeet wrote:
> Out of interest Kenton, does this make the bootstrapping code simpler?
> I'd imagine that can be built with just a "lite" version. It would be
> nice to get rid of some of the nastiness that's involved in C# just to
> get the PB-specific types to