Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2004-06-05 09:33:26


> Robert Ramey wrote:
>
> >Russell Balest wrote
> >
> >>Does someone know where in the code I can implement this easily.
> >>I just want to ignore the comments.
> >>
> >easy to accommodate. Just create a use the following in your serialize
> >functions:
> >
> >Template<class Archive>
> >Void serialize(Archive, my_class & t){
> > std::string comment;
> > ar & BOOST_NVP("comment", comment);
> > ar & BOOST_NVP("myclass_data", t);;
> >}
> >
> >In which case your XML output will look like:
> >
> >...
> ><comment></comment>
> ><myclass_data>..contents of t</myclass_data>
> >...
> >
> >
> >
> Good idea. I'll probably do that.

Another approach would be to preprocess your input files and strip the added
comments using XSLT, perl, or a simple regex program. That way you don't
have to modify the data structures under test.

Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk