Boost logo

Boost Users :

Subject: [Boost-users] Boost deserialization of a derived class problem
From: adrien.barral_at_[hidden]
Date: 2011-04-30 11:44:08


 Hello,
 I have got a problem serializing data via TCP/IP.
 My application is highly inspired of the asio example on
serialization.
 I have a server (my class "Recepteur"), and a client (my class
"Logger").
 I try to serialize two kine of data :
  - Loggable
  - HumanReadable.
 Loggable is a public base of HumanReadable, later I will have other
Loggable class to serialize (OneDPlotable etc...).
 Look at my two serializable classes :
 [code]
 // file Loggable.hpp
 #ifndef LOGGABLE_HPP
 #define LOGGABLE_HPP
 #include
 #include
 #include
 #include
 #include
 class Loggable
 {
 protected :
     friend class boost::serialization::access;
     template
     void serialize(Archive& _archive, const unsigned int _version)
     {
         std::cout



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