Boost logo

Boost Users :

Subject: [Boost-users] [serialization] appending to an archive
From: hurcan solter (hsolter_at_[hidden])
Date: 2009-05-23 11:12:54

I am trying to append one or more records to the existing archive file,
using something like this;

void Logger::save(const std::string& fileName)
    assert(fileName != "logger.dmp");
    bp::time_duration endRecordTime = getCurrentTime();

    path dst = complete(path(fileName, native));
    path src = complete(path("logger.dmp", native));
    copy_file(src, dst);

    ofstream saveFile(dst,std::ios::app);
    ArchiveType archive(saveFile,boost::archive::no_header);
    *mArchive << endRecordTime

although i specify no_header flag, it inserts a '0' as a preamble,
how can i turn it off? have you guys ever needed to use serialization
like this? what was your solution

Thanks in advance

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at