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
>serializated
>class with <something> and </something>, but the library passes only a
>stream
>of ints to you arhive class.
>
>Some other library (which name I can't remember now, sorry), used something
>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.

--Beman


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to