Hi

 

My name is Ohad, and I work for the Technion institution, Israel.

We are currently working on a research that involves programming in C++, and for that project we are using the serialization module of Boost.

I'm not sure if this is the place to ask for help with boost. If not, Could you please direct me to the right address?

my problems:

 

1) does the following supposed to work? :

I have a :

class saving helper{

boost::archive::binary_archive* ar;

}

 

and:

class Y {

X* first

vector <Y*> second

}

 

and I try to save Y with the saving helper:

for each level of Y object I initialize a saving helper, directly call a function that does *ar & * first (the function name isnt serialize\save)

for each Y* on the next level I create a new saving helper object with a new pointer, initiallized the same:

saving_helper::saving_helper(saving_helper* to_copy){ this->ar = to_copy->ar;}

and continue saving the very same object (another level) with the new saving helper

 

(the load is standard - via a regualr load function) 

 

I know that this is not the standard way to use boost, but I dont have much choice.

 

2)  When trying to use the above method with text archive, I always get a streaming error, but If I use a binary archive than

the streaming error vanished and instead I start to read the file from its middle (i.e. read the forth number instead of the first, reading the fifth bumber instead the second,etc).

increasing the file length by adding to it 3 redundent numbers solved those two problems, and yet Im looking for a more stable solution, so help will be apprecialted.

3) boost tracking: where should I put the BOOST_CLASS_TRACKING macro?

 

I currently use:

boost 1.47.0

visual studio 2010

OS windows 7

 

Thanks in advance

 

Ohad