Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-11-18 12:38:06

At 09:21 AM 11/18/2002, Vladimir Prus wrote:

>I believe that the biggest problem is that the current library does
>not have any "begin class serialization"/"end class serialization" hooks,
>which archive classes can interpret. IOW, you want to surround a
>class with <something> and </something>, but the library passes only a
>of ints to you arhive class.
>Some other library (which name I can't remember now, sorry), used
>like 'describe', and there were explicit 'beginComposite' function.

That was Jens' library. The version I have supported these hooks (which
were overridden for specific formats):

   void start_sequence(std::size_t) { os << "["; }
   void start_sequence_element() { }
   void separate_sequence_elements() { }
   void end_sequence_element() { }
   void end_sequence() { os << "] "; }

   void start_struct() { os << "{"; }
   void separate_struct_members() { }
   void end_struct() { os << "} "; }

   void start_value() { }
   void end_value() { os << " "; }

Those seemed sufficient for HTML, XML, and other nested data structures in
addition to various flavors of CSV and similar formats.


Boost list run by bdawes at, gregod at, cpdaniel at, john at