Boost logo

Boost :

From: Jeremy Maitin-Shepard (jbms_at_[hidden])
Date: 2002-12-17 20:43:36


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 both a compile and run-time framework.
>
> Sounds like a great idea to me.

I was actually thinking along the lines of manually specifying fields
which do not neccessarily correspond to actual instance variables, or
to a single instance variable. This is because instance variables
(which are often private) are nearly useless on their own. In C++
classes, they tend to correspond to the implementation details, while
the methods provide access to what are effectively the fields. For
example, would it be particularly useful for a reflection framework to
provide access to the instance variables of a reference counting
string class?

It seems more useful to identify basic types or data structures with
which all of the agregate types that we want to be accessible through
reflection can be represented. In previous posts I have enumerated
some of these basic types.

I realize that methods, however, are more straight forwardly handled
automatically. However, the other objection I have with a system that
requires separate non-standard preproccessing is that it becomes more
difficult to maintain the data.

- Jeremy Maitin-Shepard


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