Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] Export question
From: Tom Aylesworth (taylesworth_at_[hidden])
Date: 2009-04-08 15:04:59


Robert Ramey <ramey <at> rrsd.com> writes:

> "Tom Aylesworth" <taylesworth <at> realitymobile.com> wrote in message
> news:0D75E0E38A78ED40B5933CCBB98119F3900F5CDABF <at>
hermes.realitymobile.local...
> I just want to make sure that I understand the use of the Serialization
> library's EXPORT macros. On the "Serializable Concepts" page of the
> documentation, it states:
>
> --
> The macro BOOST_CLASS_EXPORT_GUID associates a string literal with a
> class. . This permits each class to be in a separate header file along with
> its string identifier.
>
> *** Hmmm - my current copy of the documentation doesn't include the above
> statement. It shouldn't be there now. I'll double check.

fyi, here's the link to the section of the current Boost documentation with the
quote:

http://www.boost.org/doc/libs/1_38_0/libs/serialization/doc/serialization.html#
export

> The associated example shows the EXPORT macro following the #include of the
> header defining the class to be exported.
>
> **** hmmm - which example?

The short example at the following link. It is the same example snippet you
included in your email.

http://www.boost.org/doc/libs/1_38_0/libs/serialization/doc/special.html#export

Thanks to both you and Emil for the helpful responses. The serialization
library is incredibly useful and does exactly what I need!

I hope you don't mind me saying, however, that the documentation leaves a
little to be desired. In addition to this issue, I also spent a few hours
trying to track down an error caused by the fact that I originally had my
BOOST_CLASS_EXPORT macros wrapped in a namespace clause. I had placed the
macros after my class declarations in the header file and therefore they were
wrapped in the same namespace as the classes themselves. I finally found a
post on this list from someone who pointed out they have to be outside of
namespaces. I haven't seen that mentioned in the Boost documentation on the
EXPORT macros.

If you'd like, I'd be more than happy to donate some time to reworking some of
the documentation to address these concerns.

Tom


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