Re: C++ Reflection package?

Olivier Lefevre <olivier.lefevre@wdr.com>
6 Apr 1999 22:48:58 -0400

          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: Olivier Lefevre <olivier.lefevre@wdr.com>
Newsgroups: comp.compilers
Date: 6 Apr 1999 22:48:58 -0400
Organization: Warburg Dillon Read
References: 99-04-004
Keywords: C++, tools

Mihai Christodorescu wrote:


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


Amen!


> 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.


It looks like you should try Visual Age. Its compilation model is very
special in that it keeps all information in a database rather than in
files, which db is very fine-grained (down to individual functions or
methods). Of course IBM won't do what you suggest because it falls
outside the language but the db has a developer API, so you migth just
be able to get from it the information you need to do what you
want. Indeed in the abstract of the IBM Research Technical Report #
8583 ("Extension Mechanisms in Montana") the authors of the system go
on to say:


      Montana uses a program representation (CodeStore) to achieve
      these aims, with compilation proceeding directly from the database.
      APIs for accessing information about programs from the CodeStore
      database are also made available for tool builders.


Your system would be VA- but not platform-specific since VA has been
ported to quite a few OSes. Poking into object files, OTOH, is a
daft/perverted thing to do, IMHO :)


Regards,


-- O.L.





Post a followup to this message

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