[GCC-XML] get source of parsed C++ class

Roman Yakovenko roman.yakovenko at gmail.com
Wed Nov 26 14:50:09 EST 2008

On Wed, Nov 26, 2008 at 9:03 PM, Patrick Meier <meierpatrick at ymail.com> wrote:
> Hello,

Good evening.

> I am parsing a bunch of  header files with gccxml (pygccxml to be precise) and need to operate on the source of certain classes.
> Can I get information back from gccxml (or pygccxml) that allows me to retrieve the positions where in the header file the declaration of a certain class begins or ends?

You can get the beginning of the declaration only.

Every declaration has "location" property
, which provide you access to full file name and line (
) as reported by GCC-XML.

> Or retrieve the complete source of this class as a string?

No. A patch is welcome :-)

Roman Yakovenko
C++ Python language binding

More information about the gccxml mailing list