From: X Wang (wangx0802_at_[hidden])
Date: 2008-01-29 17:19:01
What I want is to concatenate some of my own data (all printable strings, delimited by some char, say 0x01) and append serialized data (from different modules, treated as a black box) to it. For this reason, I need a delimiter(hopefully from ascii set) which is not in serialized charater set so I could figure out the boundary and decode the whole string later. What you suggested would work, just the setup becomes less straightforward for my case.
Robert Ramey <ramey_at_[hidden]> wrote:
Since a std:string and std:wstring could contain any character, there is no
way go guarentee that any specific character would not be used.
I'm not sure why you want to do this.
maybe you would like to use a string stream and serialize the data into
that. The you could use a string stream to load it and you would already
have what you wanted.
oa << another_complicated_class_instance;
ia >> my_complicated_class_instance;
first = is.?string;
ia >> another_complicated_class_instance
second = is.?string
X Wang wrote:
> Hi, I am using boost serialization text_oarchive to serialize data
> objects into text strings, and then I need to delimit several of
> these serialized strings and concatenate them into an ascii text. So
> obvious I want to choose a delimiter (currently using 0x01) not used
> by boost serialization. My question is how do I find the character
> set used by boost serialization so that whatever I choose for my
> delimiter would not shows up in text_oarchive's result?
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile.
> Try it now. _______________________________________________
> Unsubscribe & other changes:
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Never miss a thing. Make Yahoo your homepage.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk