"Patrick Stinson" <aj*****@gci.net> wrote in message
news:10*************@corp.supernews.com...
What sort of operations can one do with classes? I know
class A{};
typeid(A);
works, but what else can you do? Is there a way to pass a class as a
parameter to a function? class pointers? how does this relate to
class A{};
void (A::*)();
I'm looking for more of a quasi-comprehensive discussion. Cheers!
You could design your own set of reflection classes. It would not be easy,
but it seems like it should be doable . . . maybe. You might have to
reimplement the whole language in the process, though. Actually, the
undergrad research group I am with here at school is doing that kind of
thing, only with Java. We're extending all of the Java reflection classes
and doing some pretty nasty/crazy stuff with it. I'm a little early in my
education to be of any real help with the effort though, so in this, you
would have to look elsewhere for advice.
Just remember the first rule of computer science: "Adding a level of
indirection can solve any problem." <-- This is half tongue in cheek, half
serious.