12

I'm currently creating a concept which uses Boost::Serialization and which needs to implement its own Boost::Archive cause the data has to be serialized in a certain way.

There is documentation about implementing custom archives in the documentation: http://www.boost.org/doc/libs/1_44_0/libs/serialization/doc/index.html

But I'm curious if there are any other (reallife) examples anywhere on the net. I couldn't find any. Perhaps someone could point me to a source or article.

MOnsDaR
  • 8,401
  • 8
  • 49
  • 70
  • Why would you want to create a new archive? (just asking). – ManicQin Oct 13 '10 at 13:20
  • I need to serialize data in a certain way (its a binary format which needs the data on specific positions etc). I thought by implementing a custom archive I could achieve this custom formatting and ordering of data. – MOnsDaR Oct 14 '10 at 07:16
  • 1
    IMHO, this would be hard to achieve with Boost.Serialization. It is oriented on class structure, not on data format. I mean latter is adapted to conform former. – Basilevs Oct 21 '10 at 12:25
  • 1
    One of the goals of Boost.Serialization, according to its docs: Orthogonal specification of class serialization and archive format. So it should be actually easy. – Pavel Bazant Oct 03 '13 at 18:04