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

Patrick Meier meierpatrick at ymail.com
Wed Nov 26 14:03:43 EST 2008


Hello,

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? Or retrieve the complete source of this class as a string?

For example get something like:
class Foo is declared ... from line 10, character 1 to line 13, character 3.

or:
the source of class Foo is...
class Foo{
  Bar b;
  Foo();
};

Is it possible to use gccxml (pygccxml) to get this kind of information?

Thank you
Patrick



      




More information about the gccxml mailing list