Posted by
Ballabio Gerardo-4 on
URL: http://quantlib.414.s1.nabble.com/Extending-QLXL-and-serialization-issue-tp13901p13903.html
I have run into the same issue.
In the generated xml files, every QLXL object is identified by a reference number. If I understand correctly, the numbers are defined by the order in which object are registered in the functions called by registerQlFunctions (see QuantLibXL/qlxl/register/register_all.cpp and other files in that directory). Whenever you insert a new object in the middle of the sequence, all subsequent objects get their numbers incremented by one.
In order to avoid that problem, new objects should only be added at the end of the sequence. But because the functions which do the registering are autogenerated by gensrc which, if I am not mistaken, sorts objects first by category and then alphabetically, this is not doable. You'll have to live with that.
I'd suggest that you write a utility program to "convert" your files to the new numbering sequence. That's the only way to port them between different QLXL releases or development versions.
Gerardo
-----Messaggio originale-----
Da: Lapin [mailto:
[hidden email]]
Inviato: venerdì 11 gennaio 2013 16.54
A:
[hidden email]
Oggetto: [Quantlib-users] Extending QLXL and serialization issue
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
--
View this message in context:
http://quantlib.10058.n7.nabble.com/Extending-QLXL-and-serialization-issue-tp13901.htmlSent from the quantlib-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head></head>
<body>
<div style="font-family:Calibri;font-size:10px">
Banca Profilo S.p.A.
Corso Italia, 49 - 20122 Milano - Tel. 02 58408.1, Fax 02 5831 6057
Capitale Sociale Euro 136.794.106,00 i.v.
Iscrizione al Registro Imprese di Milano, C.F. e P.IVA 09108700155 -
[hidden email]
Iscritta all’Albo delle Banche e dei Gruppi bancari
Aderente al Fondo Interbancario di Tutela dei depositi
Aderente al Conciliatore Bancario Finanziario e all’Arbitro Bancario Finanziario
Appartenente al Gruppo bancario Banca Profilo e soggetta all’attività di direzione e coordinamento di Arepo BP S.p.A.
DISCLAIMER:
The information transmitted may contain confidential and/or privileged material.
Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient is prohibited.
If you received this in error, please contact the sender and delete the material from any computer.
</div>
</body>
</html>
------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users