Extending QLXL and serialization issue
Posted by Lapin on
URL: http://quantlib.414.s1.nabble.com/Extending-QLXL-and-serialization-issue-tp13901.html
Hi,
I have extended QLXL but I have an issue with the serialization.
When I try to deserialize the object that were created befate the update I get a stream error (more or less the old object is not recognized).
I have looked into it, and I have found the reason why. When I have added the new classes, the class_id="251" in the xml object is not the same as in the previous object. For example, I get the following:
Old object:
<px class_id="149" tracking_level="1" version="0" object_id="_90">
<ObjectId>GBPYC6M_MID</ObjectId>
<ClassName>qlPiecewiseYieldCurve</ClassName>
New object:
<px class_id="153" tracking_level="1" version="0" object_id="_90">
<ObjectId>GBPYC6M_MID</ObjectId>
<ClassName>qlPiecewiseYieldCurve</ClassName>
I have not touched to this object nor I have touched any related part to the yield curve term structure object.
If in the xml I put back the class_id as it was before the change (addind 4 to each of them in the xml file), the deserialization works just fine.
I was unable to locate where we can control this behavior or just why it is doing so.
Thanks