Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] Registering containers ofuser-provided types
From: Kolb, Jeremy (jkolb_at_[hidden])
Date: 2011-02-11 09:55:10


I think there's some awkardness and non-obvious bludgeoning that needs
to happen to get base pointers to serialize for library writing (esp
when the derived class is in another dependent library). I was trying
to pull apart various parts of the serialization library in order to get
this to work in my own code but I gave up.

 

From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Vivek
Sent: Thursday, February 10, 2011 11:37 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [Serialization] Registering containers
ofuser-provided types

 

Robert Ramey wrote:

        The rub here is your requirement that it be exported through

        a base class pointer.

 

That's exactly right. The library stores user-defined types and returns
them to user code, but doesn't know what those types are ahead of time,
hence the need to serialize via base pointers. As it is, the
BOOST_EXPORT_* macros require I know the types even before compile time
(i.e. at the time of writing the library code)... I basically need a way
of registering the type at a point between when I've written the code
and when it is compiled (which I guess only comes up as an issue for
those writing libraries).

 

        That would be the way to do it. However, someone proposed a
solution
        to this problem and uploaded it as a track item. I found it
intriguing,
        But I decided not to implement it to keep the library from
getting
        any more complicated than it already is. You might want to
        paste this proposed enhancement into your own code.

 

Do you have a ticket number or link for this?



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net