Re: [protobuf] C++ - getting a reference to a map value

2019-02-14 Thread Mohamed Koubaa
PM Mohamed Koubaa wrote: > Adam, > > The point about the style guide is well-taken, I also understood that this > is a deliberate divergence from the contract of std::map. > > > The function signature of at() claims it returns a reference but in > practice it->sec

Re: [protobuf] C++ - getting a reference to a map value

2019-02-13 Thread Mohamed Koubaa
returns an iterator so once > you've verified that it's not equal to end() you can return >second. > > On Wed, Feb 13, 2019 at 12:19 PM Mohamed Koubaa > wrote: > >> Hello, >> >> I'm using version 3.2. I have a google::protobuf::map and >> would like to impl

[protobuf] C++ - getting a reference to a map value

2019-02-13 Thread Mohamed Koubaa
::map (and I don't claim to understand it completely) it seems that the "at" method does a find and then just returns iter->second which does a copy. So the client of TryGetValue will have used after free. Is there another way to do this? Thanks! Mohamed Koubaa Software Develop

Re: [protobuf] Techniques for distributing proto definitions

2017-10-19 Thread Mohamed Koubaa
and the full runtime on the other, and you'd have another switch on the client libraries to contend with. Regards, Mohamed Koubaa Software Developer ANSYS, Inc On Thu, Oct 19, 2017 at 2:51 PM, Jeff White <jswh...@ebay.com> wrote: > I don't see documentation on recommended mechanisms to sh

Re: [protobuf] Too many protobufs

2017-06-21 Thread Mohamed Koubaa
Martin, You may want to consider the Lite runtime. If you're using Proto3 you could also try use the 'Any' type to loosely couple your proto definitions. Regards, Mohamed Koubaa Software Developer ANSYS Inc On Wed, Jun 21, 2017 at 9:01 AM, Martin Kosicky <martin.kosi...@gmail.com> wrote:

Re: [protobuf] Typos in the C++ Tutorial

2017-02-09 Thread Mohamed Koubaa
Hello, Wouldn't it be nice if you could tell protoc to use a different singular and plural form! Thanks, Mohamed Koubaa Software Developer ANSYS Inc On Wed, Feb 8, 2017 at 5:18 PM, Jacopo Notarstefano < jacopo.notarstef...@gmail.com> wrote: > Hi, > > I was reading https://develo

[protobuf] python --cpp_implementation on windows v3.1.0

2016-12-28 Thread Mohamed Koubaa
c argument '/Wno-write-strings' Could I be missing something in my setup or is this indeed not supported? Thanks, Mohamed Koubaa Software Developer ANSYS Inc -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this grou

Re: [protobuf] protobuf::Any Message vs MessageLite interface

2016-12-07 Thread Mohamed Koubaa
Hi Adams, Nice to see there is an issue I could follow. FYI I'm going with (1). To add a data point, we're interested in the lite runtime not for mobile but to avoid exacerbating long link times when adding protobuf to an (already) large project. Thanks, Mohamed Koubaa Software Developer ANSYS

Re: [protobuf] protobuf::Any Message vs MessageLite interface

2016-12-01 Thread Mohamed Koubaa
external symbol "public: static class google::protobuf::Any const & __cdecl google::protobuf::Any::default_instance(void)" (?default_instance@Any @protobuf@google@@SAAEBV123@XZ) Thanks, Mohamed Koubaa Software Developer ANSYS Inc On Thu, Dec 1, 2016 at 1:36 PM,

Re: [protobuf] protobuf::Any Message vs MessageLite interface

2016-12-01 Thread Mohamed Koubaa
ource.type_url(), msg->GetTypeName()); //Could be converted to an assert or CHECK style macro in a non-test project msg->ParseFromArray(source.value().c_str(), source.value().size()); } Thanks, Mohamed Koubaa Software Developer ANSYS Inc On Tue, Nov 29, 2016 at 8:22 PM, Adam Cozzette &

Re: [protobuf] protobuf::Any Message vs MessageLite interface

2016-11-29 Thread Mohamed Koubaa
Hello, I am sorry to bring back an old thread, but the outcome is not clear. Is there either an intent or any ongoing work to support Any types with the lite runtime? Best Regards, Mohamed Koubaa Software Developer ANSYS Inc On Mon, Oct 10, 2016 at 3:00 PM, 'Adam Cozzette' via Protocol Buffers

Re: [protobuf] service without gRPC

2016-08-08 Thread Mohamed Koubaa
those stubs). I did notice the rpcz project but did not have a chance yet to evaluate it. Thanks, Mohamed Koubaa Software Developer ANSYS Inc On Sat, Aug 6, 2016 at 3:20 AM, John Obaterspok <john.obaters...@gmail.com> wrote: > Hi, > > You could check out https://github.com/thesamet/r

[protobuf] service without gRPC

2016-08-05 Thread Mohamed Koubaa
not generate any stubs in c++. I am using proto3 beta4 at the moment. Do I need any additional flags to protoc? Thanks Mohamed Koubaa Software Developer ANSYS Inc -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from

Re: [protobuf] message wrapped enums

2016-07-19 Thread Mohamed Koubaa
, Mohamed Koubaa Software Developer Ansys Inc On Tue, Jul 19, 2016 at 2:26 PM, Feng Xiao <xiaof...@google.com> wrote: > > > On Tue, Jul 19, 2016 at 7:38 AM, Mohamed Koubaa <mohamed.kou...@ansys.com> > wrote: > >> Hello, >> >> In my cpp proto3 project

Re: [protobuf] Performance of large 'byte' messages

2016-06-30 Thread Mohamed Koubaa
Hi Feng, Thanks for the quick reply. Using swap, assigning to the protobuf could be reduced to 1300ms, which is great. Thanks! Mohamed On Thu, Jun 30, 2016 at 5:15 PM, Feng Xiao <xiaof...@google.com> wrote: > > > On Thu, Jun 30, 2016 at 1:59 PM, Mohamed Koubaa <mohame

Re: [protobuf] Performance of large 'byte' messages

2016-06-30 Thread Mohamed Koubaa
this is better than the Aliasing option that you mention because that would require careful management of the lifetime of the memory being aliased. Thanks! Mohamed On Thu, Jun 30, 2016 at 2:57 PM, Feng Xiao <xiaof...@google.com> wrote: > > > On Thu, Jun 30, 2016 at 9:00 AM,

[protobuf] Performance of large 'byte' messages

2016-06-30 Thread Mohamed Koubaa
of memcpy. This is the case with Avro (although we really really don't like the avro cpp API). Is this possible to fix in the proto library? If not for the general 'bytes' object, what if we add a tag like: bytes payload = 2; [huge] Thanks! Mohamed Koubaa Software Developer ANSYS Inc -- You