|
Boost Users : |
From: Hughes, James (jhughes_at_[hidden])
Date: 2007-05-03 03:52:38
I have now fixed this problem - I needed to add BOOST_CLASS_EXPORT_GUID
code to my derived classes and it all started working. There was also an
issue with NVP around a base class which required
BOOST_SERIALIZATION_BASE_OBJECT_NVP.
Thanks to all for the help.
Rgds
James
> -----Original Message-----
> From: boost-users-bounces_at_[hidden]
> [mailto:boost-users-bounces_at_[hidden]] On Behalf Of
> Hughes, James
> Sent: 02 May 2007 14:18
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] [Serialisation] Question
> onshared_ptr'sandbase/derived classes
>
>
> > -----Original Message-----
> > From: boost-users-bounces_at_[hidden]
> > [mailto:boost-users-bounces_at_[hidden]] On Behalf Of
> Robert Ramey
> > Sent: 02 May 2007 14:08
> > To: boost-users_at_[hidden]
> > Subject: Re: [Boost-users] [Serialisation] Question on
> > shared_ptr'sandbase/derived classes
> >
> > Hughes, James wrote:
> > > Hi All,
> > >
> > > I am trying to serialise a vector of shared_ptr's which
> point to a
> > > base class which may be one of a number of derived class (Not
> > > polymorphic in that the base class has no virtual functions
> > - its just
> > > supplies base functionality to derived classes)
> >
> > I don't think this is generally possible.
> >
> > The default extended type info relies on dynamic cast for
> downcasting.
> >
> > Try making at least one function in the base class virtual.
>
> Hello Robert,
>
> I just had a look through the class, and it does have some
> virtual functions so that doesn't appear to be the problem.
> Would just having a virtual destructor be good enough anyway?
>
>
> >
> > Robert Ramey
> >
> >
> >
> > _______________________________________________
> > Boost-users mailing list
> > Boost-users_at_[hidden]
> > http://lists.boost.org/mailman/listinfo.cgi/boost-users
> >
>
> This message (including any attachments) contains
> confidential and/or proprietary information intended only for
> the addressee.
> Any unauthorized disclosure, copying, distribution or
> reliance on the contents of this information is strictly
> prohibited and may constitute a violation of law. If you are
> not the intended recipient, please notify the sender
> immediately by responding to this e-mail, and delete the
> message from your system. If you have any questions about
> this e-mail please notify the sender immediately.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law. If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system. If you
have any questions about this e-mail please notify the sender
immediately.
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