Tagged Questions
16
votes
2answers
5k views
How to hook up Boost serialization & iostreams to serialize & gzip an object to string?
I've been using the Boost serialization library, which is actually pretty nice, and lets me make simple wrappers to save my serializable objects to strings, like so:
namespace bar = boost::archive;
...
12
votes
3answers
481 views
Derived class serialization without class tracking in Boost (C++)
I have some problems with boost serialization when serializing derived class through base class pointer. I need a system which serialize some objects as they are being received in the system, so i ...
12
votes
2answers
243 views
Deriving custom archive classes from boost::archive::text_oarchive_impl and boost::archive::text_iarchive_impl
Note:
Boost's archive scheme is based on symmetrical input and output archive classes. It's tedious to write about both of them all the time, so I'll use ?archive to mean both oarchive and iarchive.
...
11
votes
3answers
391 views
portable archive not compiling under GCC
I need to (de)serialize data on both Windows and Linux (and transfer the files in between). I wanted to use the portable binary archives of Boost's serialization library which can be found in the ...
10
votes
1answer
1k views
Boost.Asio with google protocol buffers
I've currently investigating ways of improving our current c++ network hand-made serialization mechanism maintaining our existing binary protocol.
The first approach taken was to code it using ...
8
votes
1answer
560 views
Serializing a variables_map
How do I serialize/deserialize a boost::program_options::variables_map? I can't find an already implemented serialize function, and I don't know what functions in variables_map I can use to extract ...
7
votes
2answers
2k views
Linker errors when using boost serialization
I am using boost serialization. I compiled with: -L/opt/local/lib -lboost_serialization -stdlib=libc++, but got several (ungooglable) errors:
Undefined symbols for architecture x86_64:
...
7
votes
3answers
956 views
How can boost::serialization be used with std::shared_ptr from C++11?
I know that there is a boost module for serialization of boost::shared_ptr, but I cannot find anything for std::shared_ptr.
Also I don't know, how to implement it easily. I'm afraid that the ...
7
votes
1answer
1k views
Why doesn't boost::serialization check for tag names in XML archives?
I'm starting to use boost::serialization on XML archives. I can produce and read data, but when I hand-modify the XML and interchange two tags, it "fails to fail" (i.e. it proceeds happily).
Here's a ...
7
votes
2answers
586 views
boost serialization and doubles
I am trying to serialize a class to a string using the boost serialization library and included in my class are several double member variables.
Below is the code I'm using to serialize:
#include ...
6
votes
4answers
3k views
Does Boost.Serialization serialize differently on different platforms?
I use Boost.Serialization to serialize a std::map. The code looks like this
void Dictionary::serialize(std::string & buffer)
{
try {
std::stringstream ss;
...
6
votes
1answer
2k views
How to serialize shared/weak pointers?
I have a complex network of objects connected with QSharedPointers and QWeakPointers. Is there a simple way to save/load them with Boost.Serialization? So far I have this:
namespace boost {
...
5
votes
2answers
561 views
Boost Serialization Library upgrade
How do I know that I can safely upgrade Boost Serialization Library on a production system without breaking compatibility with the existing data ? Is there any test that I should perform in order to ...
5
votes
2answers
527 views
Using boost::serialization greatly increases binary size
I use rather complex data structures (mostly using STL containers) in my app, and serialize them using Boost (v1.34).
Whenever I compile with debug symbols (gcc -g), the resulting executable gets ...
5
votes
2answers
390 views
Boost serialization end of file
I serialize multiple objects into a binary archive with Boost.
When reading back those objects from a binary_iarchive, is there a way to know how many objects are in the archive or simply a way to ...