سؤال

ZeroC Ice serialization seems pretty easy for sequences of primitives or buildin types:

out = Ice::createOutputStream(communicator);
vector<Ice::Byte> data = ...;
out->write(&v[0], &v[v.size()]);

But how to serialize something different without suitable write method? I have to send a sequence of structs:

struct item{
    string name;
    ByteSeq data;
   };

sequence<item> ItemList;

How to serialize a ItemList?!

هل كانت مفيدة؟

المحلول

I found the solution. ZeroC automatically generates suitable write methods. Just take a look.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top