Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to automatically serialize a C++ object?

Is there something similar to Java/.NET serialization for C++?

like image 925
joemoe Avatar asked Jan 24 '10 05:01

joemoe


1 Answers

Google's protocol buffers provides a C++ implementation in the core package; as a nice benefit, you can then share this data with lots of other languages - but you will be limited to using the generated types rather than your own (which some serialization engines in other languages support).

In reality this isn't a problem, as (if necessary) you can just treat the generated types as a DTO that twin to your actual domain objects.

like image 114
Marc Gravell Avatar answered Oct 17 '22 09:10

Marc Gravell