|
Boost Users : |
Subject: Re: [Boost-users] mpi/serialization: broadcasting derived classhrough base pointer 1.47
From: MM (finjulhich_at_[hidden])
Date: 2012-01-25 08:50:06
> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Robert Ramey
> Sent: 24 January 2012 17:53
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] mpi/serialization: broadcasting derived
> classhrough base pointer 1.47
>
> MM wrote:
> typedef templateclass<arg> myclass;
> >
> > On the sending side, I have BOOST_CLASS_EXPORT_KEY(
> > namespace::namespace::myclass )
> >
> > I don't know why it is not sent down the pipe.
>
> Note that you'll have to have BOOST_CLASS_EXPORT... on BOTH sides.
>
> This is usually assured by having the save and load symetrical.
>
> Robert Ramey
I have generated preprocessed output of the translation unit and the macros
expand correctly to:
namespace boost { namespace serialization { template<> struct guid_defined<
nicohich::histodatas::daily_data > : boost::mpl::true_ {}; template<> inline
const char * guid< nicohich::histodatas::daily_data >(){ return
"nicohich::histodatas::daily_data"; } } }
namespace boost { namespace serialization { template<> struct guid_defined<
nicohich::histodatas::future_daily_data > : boost::mpl::true_ {}; template<>
inline const char * guid< nicohich::histodatas::future_daily_data >(){
return "nicohich::histodatas::future_daily_data"; } } }
namespace boost { namespace serialization { template<> struct guid_defined<
nicohich::histodatas::minute_data > : boost::mpl::true_ {}; template<>
inline const char * guid< nicohich::histodatas::minute_data >(){ return
"nicohich::histodatas::minute_data"; } } }
This bit appears AFTER the _declaration_ of the serialize template function,
but _before_ its implementation.
These derived types only have the serialize<> template function, not the
save and load because they don't need them.
The base class has a save() and load().
This is very puzzling,
Regards,
MM
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