Try it out, As long as all objects are cacheable it should work. For each
PdxWrapper you will see call in PdxSerailizer.
Thanks.HItesh
From: CREMARENCO Cosmin <[email protected]>
To: "[email protected]" <[email protected]>;
Hitesh Khamesra <[email protected]>
Cc: GIRARD-REYDET Vincent <[email protected]>
Sent: Thursday, August 6, 2015 9:40 AM
Subject: RE: Serializing collections in PDX
#yiv4924471990 #yiv4924471990 -- _filtered #yiv4924471990
{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv4924471990
{font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;} _filtered #yiv4924471990
{}#yiv4924471990 #yiv4924471990 p.yiv4924471990MsoNormal, #yiv4924471990
li.yiv4924471990MsoNormal, #yiv4924471990 div.yiv4924471990MsoNormal
{margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}#yiv4924471990 a:link,
#yiv4924471990 span.yiv4924471990MsoHyperlink
{color:blue;text-decoration:underline;}#yiv4924471990 a:visited, #yiv4924471990
span.yiv4924471990MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}#yiv4924471990
p.yiv4924471990MsoAcetate, #yiv4924471990 li.yiv4924471990MsoAcetate,
#yiv4924471990 div.yiv4924471990MsoAcetate
{margin:0cm;margin-bottom:.0001pt;font-size:8.0pt;}#yiv4924471990
p.yiv4924471990msoacetate, #yiv4924471990 li.yiv4924471990msoacetate,
#yiv4924471990 div.yiv4924471990msoacetate
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}#yiv4924471990
p.yiv4924471990msonormal, #yiv4924471990 li.yiv4924471990msonormal,
#yiv4924471990 div.yiv4924471990msonormal
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}#yiv4924471990
p.yiv4924471990msochpdefault, #yiv4924471990 li.yiv4924471990msochpdefault,
#yiv4924471990 div.yiv4924471990msochpdefault
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}#yiv4924471990
p.yiv4924471990msonormal1, #yiv4924471990 li.yiv4924471990msonormal1,
#yiv4924471990 div.yiv4924471990msonormal1
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}#yiv4924471990
p.yiv4924471990msochpdefault1, #yiv4924471990 li.yiv4924471990msochpdefault1,
#yiv4924471990 div.yiv4924471990msochpdefault1
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}#yiv4924471990
span.yiv4924471990msohyperlink {}#yiv4924471990
span.yiv4924471990msohyperlinkfollowed {}#yiv4924471990
span.yiv4924471990msohyperlink1 {}#yiv4924471990
span.yiv4924471990msohyperlinkfollowed1 {}#yiv4924471990
span.yiv4924471990emailstyle171 {}#yiv4924471990 span.yiv4924471990emailstyle27
{}#yiv4924471990 p.yiv4924471990msonormal2, #yiv4924471990
li.yiv4924471990msonormal2, #yiv4924471990 div.yiv4924471990msonormal2
{margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}#yiv4924471990
span.yiv4924471990msohyperlink2
{color:blue;text-decoration:underline;}#yiv4924471990
span.yiv4924471990msohyperlinkfollowed2
{color:purple;text-decoration:underline;}#yiv4924471990
p.yiv4924471990msoacetate1, #yiv4924471990 li.yiv4924471990msoacetate1,
#yiv4924471990 div.yiv4924471990msoacetate1
{margin:0cm;margin-bottom:.0001pt;font-size:8.0pt;}#yiv4924471990
p.yiv4924471990msonormal3, #yiv4924471990 li.yiv4924471990msonormal3,
#yiv4924471990 div.yiv4924471990msonormal3
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}#yiv4924471990
p.yiv4924471990msochpdefault2, #yiv4924471990 li.yiv4924471990msochpdefault2,
#yiv4924471990 div.yiv4924471990msochpdefault2
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}#yiv4924471990
p.yiv4924471990msonormal11, #yiv4924471990 li.yiv4924471990msonormal11,
#yiv4924471990 div.yiv4924471990msonormal11
{margin:0cm;margin-bottom:.0001pt;font-size:11.0pt;}#yiv4924471990
span.yiv4924471990msohyperlink11
{color:blue;text-decoration:underline;}#yiv4924471990
span.yiv4924471990msohyperlinkfollowed11
{color:purple;text-decoration:underline;}#yiv4924471990
span.yiv4924471990emailstyle1711 {color:windowtext;}#yiv4924471990
p.yiv4924471990msochpdefault11, #yiv4924471990 li.yiv4924471990msochpdefault11,
#yiv4924471990 div.yiv4924471990msochpdefault11
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}#yiv4924471990
span.yiv4924471990emailstyle271 {color:#1F497D;}#yiv4924471990
span.yiv4924471990EmailStyle40 {color:#1F497D;}#yiv4924471990
span.yiv4924471990TextedebullesCar {}#yiv4924471990 .yiv4924471990MsoChpDefault
{font-size:10.0pt;} _filtered #yiv4924471990 {margin:70.85pt 70.85pt 70.85pt
70.85pt;}#yiv4924471990 div.yiv4924471990WordSection1 {}#yiv4924471990 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]>
To: "[email protected]" <[email protected]>; Hitesh
Khamesra <[email protected]>
Cc: GIRARD-REYDET Vincent <[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]]
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]>
To: "[email protected]" <[email protected]>
Cc: GIRARD-REYDET Vincent <[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.