boost::function and boost::serialize

I would like to be able to serialize boost::function objects with the boost::serialize library, and i really don't know anything about the internal structure of boost::function nor how it works, and when trying to read the headers i really get lost there. So could anyone give me a hint or something on how to make a wrapper for boost::function (i know that function address might change from executable to executable, and also for run to run, that's why i thought "adding" a translator, that i assing a name to each function i have a pointer to, and when it serializes it it saves the name, and when loading, it search the address of the function with that name)... if you know how this could be done, or have any hint i will greatly appreaciate it... Also i would like to know how boost::serialize handles the shared pointers, because i my own designed objects with reference counting, and i don't know how to serialize them (to preserve shared behavior), and also i have the doubt, what happens, if i have an object shared 8 times in memory, and i only serialize it 4 times, so when i load it again, the counter will say 8 or 4?. Thanks you very much...
participants (1)
-
mysticdevil@gmail.com