|C++ Reflection package? firstname.lastname@example.org (Mihai Christodorescu) (1999-04-01)|
|Re: C++ Reflection package? email@example.com (Lieven Marchand) (1999-04-03)|
|Re: C++ Reflection package? firstname.lastname@example.org (Hao-yang Wang) (1999-04-03)|
|Re: C++ Reflection package? email@example.com (Olivier Lefevre) (1999-04-06)|
|From:||Mihai Christodorescu <firstname.lastname@example.org>|
|Date:||1 Apr 1999 00:53:21 -0500|
|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 <email@example.com> - 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]
Return to the
Search the comp.compilers archives again.