Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2002-12-18 02:19:55

On Wednesday, December 18, 2002, at 02:24 AM, Robert Ramey wrote:

> From: Matthias Troyer <troyer_at_[hidden]>
>> I would like to make a comment here: our aim was just to achieve
>> portability between all different UNIX variants. We have about ten
>> different UNIX architectures around, but actually no Windows machines.
>> Thus, for our purposes XDR provides a perfect and portable binary
>> format which we have ben using without problems for more than eight
>> years.
> is it possible to snag the xdr source code from FreeBSD unix so it can
> be compiled for windows? I believe that the license would be boost
> friendly
> I would love to include an xdr portable binary implementation but I
> think that
> its appeal would be much diminished if itcouldn't be used by windows.
> After all, its whole motivation would be is archive portability.

I can look into that.
> I believe that this addition would make it portable to all platforms
> in common usage today (including Apple - based on freeBSD?).

It already works on Apple's Mac OS X.

>> I think we have one more disadvantage:
>> e) will not be able to deal with polymorphic objects, since there are
>> no virtual template functions
> the virtual functions eliminated would be those currently in *archive.
> user classes would be the same. Bascially instead of inheriting from
> basic_[i|o] archives would be specialization of something like
> class biarchive
> {
> biarchive & operator <<(int i)
> ...
> }
> then save/load would look like
> template<class Archive>
> void save(Archive &ar, T& t)
> {
> ar << member1;
> ...
> }

Here we have a problem as far as I can see: if the class is
polymorphic, how can I serialize the derived class by calling the
save() function of the base class?


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