$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Robert Ramey (ramey_at_[hidden])
Date: 2007-08-16 11:45:27
Thanks for looking into this.
Sergey Skorniakov wrote:
> I had looked into code and found that tracking and version
> information loaded from archive only if basic_iserializer::class_info
> returns true:
>
> void
> basic_iarchive_impl::load_preamble(
>    basic_iarchive & ar,
>    cobject_id & co
> ){
>    if(! co.initialized){
>        if(co.bis_ptr->class_info()){
>            class_id_optional_type cid;
>            load(ar, cid);    // to be thrown away
>            load(ar, co.tracking_level);
>            load(ar, co.file_version);
>        }
>        else{
>            // override tracking with indicator from class information
>            co.tracking_level = co.bis_ptr->tracking(m_flags);
>            co.file_version = version_type(
>                co.bis_ptr->version()
>            );
>        }
>        co.initialized = true;
>    }
> }
>
> So, for all types that has implementation_level less than
> object_class_info (standard library collections of primitive types
> has object_serializable implementation_level) information about
> tracking (and version) are generated in-place depending of presence
> appropriate instance of pointer_iserializer<Archive, T> in code. I
> think, it is very dangerous solution. May be, it's better to consider
> track_selectivly as track_always in such a situation.
That would raise howls from those concerned about performance.
I'm thinking that tracking behavior shouldn't be tied to
implementation level at all.
> The different behavior of xml archives explained by diferent
> implementation of loading object_id - xml archive just returns
> already parsed attribute (it gives object_id of last loaded object
> with object_id or uninitialized value), but other archives performs
> actual reading that leads into various troubles, depending of archive
> content.
Its the intention that all archives behave alike.  I'll look into it.
Robert Ramey