Hello Hitesh,

Thanks, I think that works fine for one-level deep collections of 
“Serializable”. However, I don’t think that addresses nested collections.
I thought I had that figured out, but I still don’t see how, with just one call 
to a method from PdxWriter, be able to write something like a 
std::vector<std::vector<int> >.
Are you maybe suggesting having a CacheableVector<CacheableVector<PdxWrapper> >?
Meaning the inner type is always wrapped in a PdxWrapper such that it is always 
a “Serializable”?

Thanks!

Cosmin

De : Hitesh Khamesra [mailto:[email protected]]
Envoyé : mercredi 5 août 2015 20:59
À : [email protected]
Objet : Re: Serializing collections in PDX

Hi:

You can CacheableVector for this. And then pass this in following PdxWriter 
api..

 virtual PdxWriterPtr writeObject(const char* fieldName, CacheablePtr value) = 
0;

See if this helps.

Thanks.
HItesh

________________________________
From: CREMARENCO Cosmin 
<[email protected]<mailto:[email protected]>>
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Cc: GIRARD-REYDET Vincent 
<[email protected]<mailto:[email protected]>>
Sent: Tuesday, August 4, 2015 7:09 AM
Subject: Serializing collections in PDX

Hello,

Sorry for cross-posting, this was also sent to dev (btw, the mailing list 
address for “user” doesn’t appear on the homepage).

I’m using PDX as a portable serialization format between Java and C++.
While in C++ I’m trying to serialize nested collections (say 
std::vector<std::vector<std::string> > ).
How can I do that with PDX? The PdxWriter API says I’m only allowed flat arrays 
of types (and small number of types at that).
I can of course write recursively components of the collection, but I’m forced 
to write “metadata” like the size of the collection and the PdxWriter methods 
need a field name every time.
These metadata fields will have given names but will that not hinder indexing 
and the user view of the PDX fields in the stream? What would you recommend in 
this case?

Thanks!

Cosmin

*******************************
This e-mail contains information for the intended recipient only. It may 
contain proprietary material or confidential information. If you are not the 
intended recipient you are not authorised to distribute, copy or use this 
e-mail or any attachment to it. Murex cannot guarantee that it is virus free 
and accepts no responsibility for any loss or damage arising from its use. If 
you have received this e-mail in error please notify immediately the sender and 
delete the original email received, any attachments and all copies from your 
system.

*******************************

This e-mail contains information for the intended recipient only. It may 
contain proprietary material or confidential information. If you are not the 
intended recipient you are not authorised to distribute, copy or use this 
e-mail or any attachment to it. Murex cannot guarantee that it is virus free 
and accepts no responsibility for any loss or damage arising from its use. If 
you have received this e-mail in error please notify immediately the sender and 
delete the original email received, any attachments and all copies from your 
system.

Reply via email to