Connecting Tech Pros Worldwide Help | Site Map

data jam/preserves

keindl@gmail.com
Guest
 
Posts: n/a
#1: Nov 15 '06
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

keindl@gmail.com
Guest
 
Posts: n/a
#2: Nov 15 '06

re: data jam/preserves


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

Nandor

doug turnbull
Guest
 
Posts: n/a
#3: Nov 15 '06

re: data jam/preserves


keindl@gmail.com wrote:
Quote:
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-lit...alization.html

mlimber
Guest
 
Posts: n/a
#4: Nov 15 '06

re: data jam/preserves


doug turnbull wrote:
Quote:
keindl@gmail.com wrote:
Quote:
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-lit...alization.html
And this:

http://boost.org/libs/serialization/doc/index.html

Cheers! --M

Closed Thread