For example, I have a class with members:
std::map<std::string, int>

Some methods of my class fill this structures. I want to serialize this 
data to storage. I wrote an .proto file, protoc generated for me two files .pb.hh.
I see two ways:
1) Add set/get methods to my class, and use them to set members in 
generated class and after that serialize.
2) Rewrite my methods and members to generated class, fill members by this 
rewriting methods and serialize.

What should I choose? 

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 post to this group, send email to
Visit this group at
For more options, visit

Reply via email to