I am trying to add a functionality to only save a small set of messages that are defined in a huge proto, where the definition of small set of messages will be defined by this another proto that the users will declare.
Example:
message LargeProto {
optional int32 id = 1;
optional Type type = 2;
optional Image img1 = 3;
optional Image img2 = 4;
}
message SmallProto1 {
optional int32 id = 1;
optional Type type = 2;
optional Image img1 = 3;
}
message SmallProto2 {
optional int32 id = 1;
optional Type type = 2;
optional Image img2 = 4;
}
SmallProto1 = readFrom(LargeProto lp);
SmallProto2 = readFrom(LargeProto lp);
Do we have an already existing functionality that will allow us to only read specific messages from one proto to another proto without hardcoding all this in C++? Do we have some form of generic implementation available to do something as above?