Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

map and shared_ptr serialization between C# and C++ applications? [duplicate]

Possible Duplicate:
Binary serialization/de-serialization in C++ and C#

I am working on a project where server is written in C++ (boost is extensively used) and the client application is written in C#. I am facing the problem while serializing/deserializing messages between client/server.

I have studied various alternative libraries for achieving this sort of cross-platform serialization, and Protocol Buffers seems to be the best... but it does not support serialization of the standard library's map container and boost::shared_ptr.

My question then, is:

  • Can someone explain how map and boost::shared_ptr could be serialized using Protocol Buffers. Or failing that,
  • Would Apache's Thrift work for this?
  • ...Or am I stuck using interop DLLs on the (C#) client side?
like image 417
user587469 Avatar asked Nov 06 '22 03:11

user587469


1 Answers

What about wrapping the c++ message classes with c++/cli ref classes so that you use the same boost serialisation library on the client side.

like image 168
T33C Avatar answered Nov 09 '22 12:11

T33C