data jam/preserves

K

keindl

I heard that Python or maybe Ruby has a feature that transforms a
complex data structure into something simple data structure that can be
saved into a file. For example a structure containing several lists,
vectors set etc. is transformed into a possible long vector of
integeres. The transformation is reversible. This way it is easy to
save and load the state of a running application.

Is there something like this for C++? I have the following application
in mind: I'd like to write parallel C++ code with MPI but I need to
pass very complex data (built with the STL) between the nodes. MPI is
very simplistic to this is a difficult task. If I had an encode/decode
function pair that creates a vector of integers from any data, then
this encoded simplified data preserve can be passed easily between the
nodes.

Nandor
 
K

keindl

I remember now that what I am looking for is the C++ version of the
pickle module in Python.

Nandor
 
D

doug turnbull

I heard that Python or maybe Ruby has a feature that transforms a
complex data structure into something simple data structure that can be
saved into a file. For example a structure containing several lists,
vectors set etc. is transformed into a possible long vector of
integeres. The transformation is reversible. This way it is easy to
save and load the state of a running application.

Is there something like this for C++? I have the following application
in mind: I'd like to write parallel C++ code with MPI but I need to
pass very complex data (built with the STL) between the nodes. MPI is
very simplistic to this is a difficult task. If I had an encode/decode
function pair that creates a vector of integers from any data, then
this encoded simplified data preserve can be passed easily between the
nodes.

Nandor

Maybe this will help,
http://www.parashift.com/c++-faq-lite/serialization.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top