Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2004-09-07 23:08:09

>I'm slowly designing the addition of serialization support to
>Boost.MultiIndex, and come up with a need that, AFAIK, the
>current serialization library does not cover:

>The serialization of a multi_index_container should ensure that
>the order in which elements appear is preserved for all indices
>of the container.


>This implies serializing the elements and then
>recording the appropriate rearrangements in each index. I'm
>writing the code for serializing these rearrangements in
>an efficient manner as some sort of "diff" sequences, using
>an algorithm called "longest increasing subsequence" (LIS).

>The algorithm would greatly benefit for some low-level API
>by the serialization lib that, given an object reference, would
>return the order in which that object was serialized. I guess this
>information is already available internally, as the lib must keep
>track of previously saved objects.

>If this requirement is deemed too exotic to provide to the
>general user, well, I can write something myself without aid from
>the lib, but I thought I should ask at least :)

It seems too exotic to me.

The focus of the serialization library is to re-create exactly that which
was there before. So far, that has already been possible with the API
provided. Some containers (e.g. slist) required a little bit of special
handling to preserve sequence but this did not require any change in the
basic API. All of this special handling is part of the implementation of the
container in question.

I'm really not sure what your doing, so without knowing more its hard for me
to comment.

Robert Ramey

Boost list run by bdawes at, gregod at, cpdaniel at, john at