[protobuf] Use protobuf-net in C++/CLI

2013-10-07 Thread Barzo
Hi, I have built a C++ framework which use protobuf library. Now I'm writing a C++/CLI wrapper to make it visible in .NET world. Since I cannot made a wrapper for each message in my c++ .proto file, is there a way to use the protobuf-net generated c# file in a C++/CLI project? Regards, Daniele.

Re: [protobuf] Use protobuf-net in C++/CLI

2013-10-07 Thread Marc Gravell
I don't do much... no: *any* C++/CLI - but I guess the conflict here is that the c++ generated classes are not going to be CLI-friendly. So you need to either use a c++ library and c++ classes, or a managed library and managed classes. If your framework is unmanaged c++, then I *suspect* your best

Re: [protobuf] Use protobuf-net in C++/CLI

2013-10-07 Thread Barzo
Hi Marc, thanks for your reply. To be more clear... In the native SDK I have a native Message class which encapsulate messages from the protoc generated file. Then, in the managed wrapper, I have a managed MessageNET class which has to encapsulate messages from protogen generated file. Of course

Re: [protobuf] Use protobuf-net in C++/CLI

2013-10-07 Thread Marc Gravell
On 7 October 2013 10:45, Barzo wrote: > In a meanwhile I have built the .cs generated file into a separate DLL > assembly and I added it (linked) to my C++/CLI project. Indeed, compiling it as C# and referencing/linking was what I meant - i.e. using the C# *from* C++/CLI, rather than *in* C++/C

Re: [protobuf] Use protobuf-net in C++/CLI

2013-10-07 Thread Barzo
Thanks a lot! Daniele. Il giorno lunedì 7 ottobre 2013 11:55:13 UTC+2, Marc Gravell ha scritto: > > > On 7 October 2013 10:45, Barzo > wrote: > >> In a meanwhile I have built the .cs generated file into a separate DLL >> assembly and I added it (linked) to my C++/CLI project. > > > Indeed, compil

[protobuf] Serialize C# protocol buffer from builder

2013-10-07 Thread Dave
Is there a way to serialize and deserialize the C# protocol buffer using the builder mutable form? Write now I'm doing a build().WriteTo which is making an extra copy that I'd like to not do. Dave -- You received this message because you are subscribed to the Google Groups "Protocol Buffer

[protobuf] file transfer using protobuf

2013-10-07 Thread Kaustubh Deshmukh
Can I transfer file using google protobuf? If yes, how? Thank you for short guidance and help. Regards, Kaustubh -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an em

[protobuf] example of enum to string.

2013-10-07 Thread amirk
Hi, I am new to prtobuf, and I am having issues to enum to string conversion in C++. I see that there is genereated code for it (see below) but when I try to call these functions I am getting a segmentation fault. Can someone please post a C++ based example. Thanks, Amir this is the code genera

[protobuf] enum to string example

2013-10-07 Thread amirk
Hi, I am new to protobuf, Can someone please post an example of enum to string conversion in C++? I see that there is generated code for it (see below example for enum called XXX), but when I try to call I get a segmentation fault. Thanks, Amir inline const ::std::xxx& XXX_XXXIdentifier_Name(X

[protobuf] file transfer using google protobuf

2013-10-07 Thread Kaustubh Deshmukh
Hello Guys, Need to transfer file using google protocol buffers. Can you please let me know whether it is possible to do that? And if yes, a short guidance will be very helpful and appreciated. Thank you for the help. Regards, Kaustubh -- You received this message because you are subscribed

Re: [protobuf] file transfer using protobuf

2013-10-07 Thread Henner Zeller
On 5 October 2013 19:43, Kaustubh Deshmukh wrote: > Can I transfer file using google protobuf? > The 'bytes' type can store arbitrary content. If you want to transfer huge files, they you might want to design a protocol araound it by sending chunks that each are less than 2GBytes, possibly much

Re: [protobuf] enum to string example

2013-10-07 Thread Ilia Mirkin
You need to get a EnumDescriptor for the field in question, and then retrieve the EnumValueDescriptor using FindValueByNumber. That will have all the name information you need. To get the EnumDescriptor of an enum Foo, you can use Foo_descriptor() which should be in the generated code. I assume thi

Re: [protobuf] example of enum to string.

2013-10-07 Thread Henner Zeller
On 7 October 2013 08:58, amirk wrote: > Hi, > > I am new to prtobuf, and I am having issues to enum to string conversion > in C++. > I see that there is genereated code for it (see below) but when I try to > call these functions I am getting a segmentation fault. > What is your stacktrace ? >