Thanks a lot for the reply. I understood that part. Currently in the .proto
file, there is a string definition which gets translated to std::string.
What we actually need is a typedef which can be configured as per the end
user wish, before building the protobuf. But can i get some assistance on
ho
Echoing Chris's messages, we don't really want to get into supporting
arbitrary types in the core implementation. Various language-specific
annotations could be added, but doing this portably across languages would
be difficult. Supporting these types also complicate the reflection
implementations.
On Fri, Jul 8, 2011 at 9:46 AM, Eric Hopper wrote:
> I guess. This is an interesting and general problem. Practically every
> system like protobuf needs to solve it. Python itself, for example,
> solves it for pickle by allowing you to write custom methods for your
> classes to reduce them to well
We don't support this at this time - the primary problem is that specifying
an allocator for C++ string's produces a completely new type. This means
allocators can't simply be injected into a particularly message instance;
instead it would have to be part of the message definition.
On Wed, Jul 6,
You'll have to check with the developer of the C# implementation for
support, but it appears that this code is the initialization of the member
to the default value. My guess is the implementation's code generator looks
up the enum name of the default value, and assumes that the default value is
ze
Zero is reserved for historical reasons; it used to be used for propagating
error codes.
The wire format was designed with extensibility in mind; while in many
applications unknown fields won't be encountered, this support is critical
in many internal applications.
Note that simply adding a zero
Comment #2 on issue 313 by agca...@gmail.com: in c++ generated header,
has_FIELD will return random results if more than 32 optional fields
defined in single message
http://code.google.com/p/protobuf/issues/detail?id=313
The problem was that the developer of the library I was using update
Responding to my own post in case the outcome is useful to anyone.
I have been perplexed for a while with the python pyext (C++)
implementation of protobuf, and i think I finally figured out how it
was intended to work:
python_protobuf.h declares the GetCProtoInsidePyProto and
MutableCProtoInside
On Jun 30, 10:16 am, Christopher Smith wrote:
> You could always extend the compiler, but I bet you could get away with a
> simple preprocessor that aliases types and represents those larger integers
> as raw bytes.
I guess. This is an interesting and general problem. Practically every
system l
Hi,
I'm using java I found the corresponding methods in java. Thanks for
the quick response.
On Jul 8, 3:08 am, Pherl Liu wrote:
> Which language are you using? In c++, you can call
> message::GetDescriptor()->FindFieldByNumber() to get a FieldDescriptor; then
> call GetReflection()->Set* funct
I haven't used protostuff/IKVM, but I would *hope* that IKVM allows some kind
of passing of either a Stream or byte[]. That would allow you to
serialize/deserialize to swap between models.
If you have access to *both* models at once, perhaps another possibility is
AutoMapper on the .NET side.
How do I construct protobuf-net messages from protostuff messages and visa
versa?
I am using protostuff from dotnet and this seems to work by using ikvm to
call Java from C#.
But I would like to move the java message objects back into my native net
protobuffer framework,
What is the best
I am getteing an error
error CS1001: Identifier expected
when I generate a .cs file from this .proto file. How can I fix this and
make it compile?
person.proto
message Person {
required int32 id = 1;
optional string name = 2;
optional string motto = 3 [default="When the cat is away, the mouse
Thank for your help but I don't think you understood my problem. I
will give more detail.
I'm trying to make communicate two process using protocol buffers in
pipes (the group thing won’t work). For efficiency purpose, they will
keep their connection as long as they are alive but the messages hav
Comment #4 on issue 312 by big4...@gmail.com: Required field with default
value serializes if not set
http://code.google.com/p/protobuf/issues/detail?id=312
Thanks for the thorough explanation. I understand calling IsInitialized is
not free, but the fact that the PartialSerialize and Serial
Which language are you using? In c++, you can call
message::GetDescriptor()->FindFieldByNumber() to get a FieldDescriptor; then
call GetReflection()->Set* functions.
On Fri, Jul 8, 2011 at 3:58 AM, SM wrote:
> Hello,
>
> Is there a way to set the field value by the tag which we mention in
> the
16 matches
Mail list logo