Serialization of a universal data type
Hi, I have started using Boost Serialization in one of my project and thanks for the library. I may be asking a question that might have got repeated, but i did my search on the forums but couldn't get the relevant answer. I have a data-type which is more like a universal datatype(unsigned long). Consider a 64 bit system and if the value to be stored in this datatype is greater than 8 bytes, then it is stored as value. If the value to be stored is greater than 8 bytes, then it is stored elsewhere and the pointer is stored here. By using other meta-data information, the data is extracted from this data-type. To be exact, i am referring to the datum implementation in open-source database postgresql. If i have to serialize this data-type, i need more info from other variables which store the metadata. The functions, i am trying to implement in Boost serialization are readDatum and _outDatum(similar to load/save). I don't see, how i can do that in Boost serialization, especially because of the signature of the load/save function. It only takes the version and the object to be serialized. How can i pass the other meta-data? I could always create a new data-type(say SerializableDatum) with all the required info, but then this data-type is being created only for the purpose of serialization. Is there any better way to achieve the same result? Thanks, Gokul.
"Gokulakannan Somasundaram"
Thanks for the clarification...
Gokul.
On Tue, Jun 30, 2009 at 9:02 PM, Robert Ramey
"Gokulakannan Somasundaram"
wrote in message I could always create a new data-type(say SerializableDatum) with all the required info, but then this data-type is being created only for the purpose of serialization. Is there any better way to achieve the same result? What could be better than this? For an example look at the NVP wrapper and the documentation of serialization wrappers. This method of "adding extra data" (for xml this means the name tag of the variable) has worked very well.
Robert Ramey
Thanks, Gokul.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Gokulakannan Somasundaram
-
Robert Ramey