It depends on what protobuf version you are using. There will be a had_foo() 
for each optional field if you are using protobuf version 2.xx (see C++ 
code reference 
<https://developers.google.com/protocol-buffers/docs/reference/cpp-generated>). 
You are out of luck if you are using V3.0 because you will have to create 
your own boolean fields if you need to track whether the optional is 
populated or not.

On Tuesday, March 17, 2015 at 2:09:21 PM UTC-4, s_mitra wrote:
>
> Hi,
>
> I have doing some coding related to protobuf where server and client will 
> exchange some info via protobuf.
>
> In the response object I have multiple optional message objects. 
> How to check which all object is empty and which is not ??
>

-- 
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 email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to