Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2007-02-02 11:20:45


Just wrap it as a "binary_object". Use:

ar & NVP(binary_object(tarray, sizeof(tarray));

Robert Ramey

Markus Werle wrote:
> Robert Ramey <ramey <at> rrsd.com> writes:
>
>>
>> Your solution below would likely work. These days I would expect
>> find the T* / size pair replaced with something like std::vector<T
>> *> tarray in which case you could have just used:
>>
>> ar & tarray
>
> Is there a possibilty to say "store as binary data" even for xml
> archives? Sometimes the <item></item> overhead is just too big and
> I'd prefer
> the archive to include a CDATA section in that case. All other items
> should remain human readable, UI like this:
>
> ar & stored_as_binary_data(tarray);
>
> This would be very useful for std::vector<double> and friends ...
>
>
> Markus


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net