Re: [boost] Re:Serialization and Reflection

2002-12-20 Thread Dave Harris
In-Reply-To: <[EMAIL PROTECTED]> On Tue, 17 Dec 2002 22:17:51 -0800 Robert Ramey ([EMAIL PROTECTED]) wrote: > It will be much easier to switch to the new boost framework if > archives in the old format can still be loaded (without having > 2 lots of code). > [...] > Eventually when all your old fil

[boost] Re:Serialization and Reflection

2002-12-18 Thread Robert Ramey
>From: Matthias Troyer <[EMAIL PROTECTED]> >> the current serialization code doesn't rely on save being virtual >> to function. It downcasts the base class pointer to the most >> derived class and calls the save function on the recast pointer. >> This casting is implemented by void_cast. >How ca

Re: [boost] Re:Serialization and Reflection

2002-12-18 Thread Matthias Troyer
On Wednesday, December 18, 2002, at 05:03 PM, Robert Ramey wrote: From: Matthias Troyer <[EMAIL PROTECTED]> template 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 calli

[boost] Re:Serialization and Reflection

2002-12-18 Thread Robert Ramey
From: Matthias Troyer <[EMAIL PROTECTED]> >> template >> 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 clas

Re: [boost] Re:Serialization and Reflection

2002-12-17 Thread Matthias Troyer
On Wednesday, December 18, 2002, at 02:24 AM, Robert Ramey wrote: From: Matthias Troyer <[EMAIL PROTECTED]> 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 W

[boost] Re:Serialization and Reflection

2002-12-17 Thread Robert Ramey
From: [EMAIL PROTECTED] (Dave Harris) >Will it be able to load files from existing 3rd party formats? >For example, I currently have a lot of data stored in Microsoft's MFC >archive format. This includes very little metadata beyond the version >number. The meaning of fields is defined by their

Re: [boost] Re:Serialization and Reflection

2002-12-17 Thread Jeremy Maitin-Shepard
On Tue, Dec 17, 2002 at 07:06:47PM -0500, David Abrahams wrote: [snip] > > A reflective framework could be in three stages: a preprocessing stage > > (which creates the reflection data), an optional code > > generation/transformation stage, then a compilation stage. In this sense, > > it would be

[boost] Re:Serialization and Reflection

2002-12-17 Thread Robert Ramey
From: Matthias Troyer <[EMAIL PROTECTED]> >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

Re: [boost] Re:Serialization and Reflection

2002-12-17 Thread David Abrahams
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Can you elaborate on compile-time reflection? We have the type-traits > library, which may be an example what you have in mind. But this will > always be limited without further compiler support. The compile-time reflection capabilities of C++ a

Re: [boost] Re:Serialization and Reflection

2002-12-17 Thread [EMAIL PROTECTED]
On Tue, 17 Dec 2002, Robert Ramey wrote: > A very interesting post. > > I also believe it is interesting to consider whether it is valuable > to make a system of reflection for C++. I'm not sure whether > it is or not - but it is interesting non the less. In particular we > would be interested

Re: [boost] Re:Serialization and Reflection

2002-12-17 Thread Matthias Troyer
On Tuesday, December 17, 2002, at 05:52 PM, Robert Ramey wrote: Second, in terms of Serialization, I'm willing to create a portable, efficient binary archiver based on CDR (the format used by CORBA). Since I'm lazy, I will probably steal most of the code from ACE/TAO (http://www.cs.wustl.edu/~

[boost] Re:Serialization and Reflection

2002-12-17 Thread Robert Ramey
A very interesting post. I also believe it is interesting to consider whether it is valuable to make a system of reflection for C++. I'm not sure whether it is or not - but it is interesting non the less. In particular we would be interested in compile-time reflection as well as runtime reflect