I've got this for a field option, file should be fairly similar  (using
Message::descriptor()->file())

if (field->options().HasExtension(the_option)) {
    return field->options().GetExtension(the_option);
  }

On Fri, Mar 24, 2017 at 1:38 PM, Bruce Buffam <[email protected]> wrote:

> I have a sequence of the following expressions in my proto file as follows:
> ...
>
> extend google.protobuf.FileOptions {
>
>      // The foo service semantic version
>      string foo_service = 1001;
> }
>
> option (foo_service) = "1.1.0";
> ...
>
> Is there a c++ code snippet somewhere that shows how to retrieve the value
> of foo_service?
>
> Rgds,
> Bruce
>
>
> --
> You received this message because you are subscribed to the Google Groups "
> grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/grpc-io/30815ca5-8f6a-436a-a9b9-9bdb284c20ab%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/30815ca5-8f6a-436a-a9b9-9bdb284c20ab%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Christian Rivasseau
Co-founder and CTO @ Lefty <http://www.lefty.io>
+33 6 67 35 26 74

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAJ6g4%3DaERVqsOy1uzZuabVjUFz5sRM-5sNSE5ghMSnnC6ffr7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to