[C++-sig] pygccxml and template classes

Roman Yakovenko roman.yakovenko at gmail.com
Wed Dec 8 13:03:30 CET 2010


On Wed, Dec 8, 2010 at 9:40 AM, Davidson, Josh <josh.davidson at lmco.com>wrote:

> I'm having some trouble getting pyccxml to parse specialized classes.
>  Consider the following simple header file:
>
>
> #ifndef TEMPLATECLASS_HPP_
> #define TEMPLATECLASS_HPP_
>
> template <typename Type1, typename Type2>
> class TemplateClass {
>
   ...

> };
>
> #endif
>
>
> Now, if I parse it with the following statements:
> loggers.gccxml.setLevel(logging.WARNING)
> config = parser.config_t(gccxml_path="gccxml", include_paths=includes,
> define_symbols=defines)
> #file is above header file
> decls = parser.parse([file], config)
> xml = declarations.get_global_namespace(decls)
>
> It parses OK, but xml.classes() returns nothing.  If I remove the template
> types, it works fine.  What am I doing wrong?
>
>
Nothing.

GCC-XML is not able to dump template classes, but only template
instantiations.


HTH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20101208/4a186e6f/attachment.html>


More information about the Cplusplus-sig mailing list