|
Boost Users : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2006-03-02 11:19:35
Try the following changes:
Federico Feller wrote:
> Hi. I have problems defining a non-instrusive
> serialization of a class. Ive defined the following
> functions:
>
> namespace boost {
> namespace serialization {
>
> template<class Archive>
> inline void save(
> Archive & ar,
> const CLITimeStamp & t,
> const unsigned int /* file_version */
> ){
> std::string aux =
> std::string(t.get14LengthRepresentation());
> ar & aux;
> }
>
> template<class Archive>
> inline void load(
> Archive & ar,
> const CLITimeStamp & t, // can't be const as its going to be
> changed!!! remove const
> const unsigned int /* file_version */
> ){
> std::string aux;
> ar >> aux;
> t = CLITimeStamp((char*)aux.c_str());
> }
>
> template<class Archive>
> inline void serialize(
> Archive & ar,
> const CLITimeStamp & t, // can't be const as its going to be
> changed!!! remove const
> const unsigned int file_version
> ){
> split_free(ar, t, file_version);
> }
>
> }}
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