I’m quite new to the PDX API, but I’m afraid it won’t work.
Remember, my constraint is to call one and only one method of PdxWriter for any 
field of my class.
For a nested collection I would have to call writeObjectArray at the root of 
the object, but the inner PdxWrapper would itself dispatch to toData in 
PdxSerializer.
And that would mean other calls to PdxWriter.

Am I missing something?

Thanks!

Cosmin

De : Hitesh Khamesra [mailto:[email protected]]
Envoyé : jeudi 6 août 2015 18:10
À : [email protected]
Objet : Re: Serializing collections in PDX

Hi Cosmin:

>>Are you maybe suggesting having a CacheableVector<CacheableVector<PdxWrapper> 
>>>
right, this should work.


Thanks.
Hitesh

________________________________
From: CREMARENCO Cosmin 
<[email protected]<mailto:[email protected]>>
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>; 
Hitesh Khamesra <[email protected]<mailto:[email protected]>>
Cc: GIRARD-REYDET Vincent 
<[email protected]<mailto:[email protected]>>
Sent: Thursday, August 6, 2015 8:50 AM
Subject: RE: Serializing collections in PDX

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]]<mailto:[mailto:[email protected]]>
Envoyé : mercredi 5 août 2015 20:59
À : [email protected]<mailto:[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.

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

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