|
Boost Users : |
From: RIVASSEAU Jean Noel (JN.RIVASSEAU_at_[hidden])
Date: 2006-02-23 10:39:54
Hello
First I would like to point out a bug in the documentation : void_register_cast <Derived, Base> MUST take two (bogus) arguments, so calling void_register_cast <Derived, Base> () as said in the documentation will not work.
I had to look at the code to figure that out.
Secondly, I am at the point where I am wondering if I should have started to use the BSL at all. The library is undoubtly useful but is plagued by strange things that must be done in order for it to run smoothly. I do not at all understand how the system works behind the scenes; I would not care if it would "just work" but this is not the case.
My problem is:
Ok, I have lots of classes, many of which need to be persistent. So, I have written serialization code for them. I have always written my code as non-intrusive, which means I have not used member functions, but templated functions.
Now, the problem is where to put the serialization code for these classes. If I just write them on the implementation file (the .cc) for the class, it does not work. At run time I have always errors telling me that either the class is not exported (unregistered_class exception) or an unregistered_cast happens.
The only solution I have found is to put *ALL* serialization code into the same big .cc file. If I do just that, it works. However this file is becoming enormous and has to be recompiled every time I change only *one* of the class to be serialized. It is already taking a minute to compile on a fast machine, so I must really break it up into other parts.
But everytime I do that everything stops working.
Have you any ideas, Robert? I am using extended_type_info_no_rtti, this may be the cause of the problem...
Jean-Noël
Ps: I still have the std::string bug, which is also uncomprehensible for me.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net