Boost logo

Boost Users :

From: Federico Feller (fliafeller_at_[hidden])
Date: 2006-03-02 06:52:54


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,
    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,
    const unsigned int file_version
){
    split_free(ar, t, file_version);
}

}}

According to the doc Ive read, this is the way to
declare that the class 'CLITimeStamp' can be
serialized. Howerver, when I try to do this:

template<class Archive>
        void load(Archive & ar, const unsigned int
version){
   ar & minDate
        };
where minDate is a CLITimeStamp pointer, i get the
follwing error:

<'serialize' is not a Member of CLITimeStamp>

Any ideas of what i could be doing wrong?

Thanks

Federico

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


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