There is no way to do this without using reflection or the generated
accessors (i.e. set_* and mutable_*).

On Wed, Oct 16, 2019 at 11:24 AM Gaurav Bhosale <[email protected]>
wrote:

> Yes. I an able to do that with reflection but I want to initialize all
> fields to zero without reflection.
> Is that possible?
> So idea is to access all fields if Test1 message.
> Currently, when I do
> Test1 test_message;
> test_message = new Test1();
>
> I am not able to access its fields x and so on.
> I wanted to ask all fields after memory allocation.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/protobuf/e0574a11-6d9c-4d3d-bf13-dd0413faba2f%40googlegroups.com
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CADqAXr595XKM8pXyedLMF%3DGNEBr%2BFMKV-Geku2-oUp%2BgO%2BnWjw%40mail.gmail.com.

Reply via email to