I'm wondering if protobuf supports a way to determine if a type is a
well-known type via reflection in C++? I'm working on a marshalling layer
for a custom encoding format and I need to unbox well-known types into
their primitive type (e.g., Double to double). I've so far been unable to
find any information on if it's possible to definitively tell if a type is
well known or not, other than .
For example, if I have the following protobuf,
message A
{
message B
{
double val = 1;
google.protobuf.Doublevalue prev_val = 2;
}
repeated B values;
}
I need to convert into something with the following format
class B
{
double val;
double prev_val;
}
class A
{
list<B> values;
}
The issue I see is that based on the protobuf format, the output would be
ambiguous. I could also generate the following because I'm unable to tell
whether I should unbox the type or generate a wrapping class.
class B
{
double val;
class C
{
double prev_val;
}
}
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.