C++ Reflection package?

Mihai Christodorescu <mihai@cs.ucsb.edu>
1 Apr 1999 00:53:21 -0500

          From comp.compilers

Related articles
C++ Reflection package? mihai@cs.ucsb.edu (Mihai Christodorescu) (1999-04-01)
Re: C++ Reflection package? mal@bewoner.dma.be (Lieven Marchand) (1999-04-03)
Re: C++ Reflection package? dormouse@teapot.com (Hao-yang Wang) (1999-04-03)
Re: C++ Reflection package? olivier.lefevre@wdr.com (Olivier Lefevre) (1999-04-06)
| List of all articles for this month |

From: Mihai Christodorescu <mihai@cs.ucsb.edu>
Newsgroups: comp.compilers
Date: 1 Apr 1999 00:53:21 -0500
Organization: Avtel Communications
Keywords: C++, question, comment


I am just getting into compilers and debugger and the
wonderful world of tools for making tools :-)

I was wondering whether there is such a beast as a reflection
(in the Java DevKit sense) library for C++. As far as I can figure out
(and I have not spent too much time on the topic), one would be able
to extract such information only from object files / shared libs that
were compiled with debug info. I know RTTI lets you query whether an
object is of a certain type. But I want to extract some textual
information about the class.

What I want to do is to load a shared library that has code
for a class in it, call a "factory" function that creates an object
for me (of a certain class type), and then query information (such as
member functions, arguments, type information, etc.) about the
object. I know what kind of object I get back (its basic type), but
that shared library might as well implement a subclass that is 15
classes down the inheritance tree.

Any comments, or pointers, are highly appreciated.



PS. On a completely different topic, is it possible to manipulate
namespaces in C++ (i.e. add/remove/replace classes in a namespace)?
  Mihai Christodorescu <mihai@cs.ucsb.edu> - TBP VP - ACM chair
[I haven't seen any C++ systems that keep enough info around to do that,
but it'd be pretty cool. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.