$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: j.c. (jolix_at_[hidden])
Date: 2008-04-14 11:21:25
Sweet, just what I was looking for, thanks.
On Apr 14, 2008, at 8:31 AM, Robert Ramey wrote:
> lookup base_object in the documentation.
>
> Robert Ramey
>
> "j.c." <jolix_at_[hidden]> wrote in message news:CB290CFC-9ABD-4FF9-80C1-766E3063F8A6_at_[hidden] 
> ...
> I am writing a packet base class that can be serialized. The class  
> so far looks like:
>
>     class packet_base
>     {
>         using namespace boost;
>
>         public:
>             packet_base();
>             ~packet_base();
>
>             friend class boost::serialization::access;
>             template <typename Archive>
>             void serialize(Archive & ar, const unsigned int version)
>             {
>                 ar & m_length;
> ar & m_type;
> ar & m_method;
>             }
>
>         private:
>
>             uint16_t m_length;
>     uint16_t m_type;
>     uint16_t m_method;
>     };
>
> The question now is how can I derive class A from packet_base and  
> have both packet_base and A's variables serialized? Obviously  
> base_class needs to be archived first so it's variables are at the  
> front of the buffer.
>
> Thanks in advance.
> J
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://listarchives.boost.org/mailman/listinfo.cgi/boost-users
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://listarchives.boost.org/mailman/listinfo.cgi/boost-users