Re: [pygccxml-development] templates (again)
Brought to you by:
mbaas,
roman_yakovenko
|
From: Matthias B. <ba...@ir...> - 2006-08-31 09:01:52
|
Neal Becker wrote:
> // file test.h
> #include <boost/numeric/ublas/vector.hpp>
> using namespace boost::numeric::ublas;
>
> typedef vector<int> vector_int;
>
> # File: test_setup.py
> from pypp_api import *
>
> mod = ModuleBuilder(
> headerFiles = "test.h",
> moduleName = "test"
> )
>
> root = mod.parse()
> root.Class("vector_int").expose()
>
> mod.writeModule()
>
> result:
> [...]
> raise RuntimeError, "Query produced no results (filter: %s)"%filter
> RuntimeError: Query produced no results (filter: (name=='vector_int') &
> (type==CLASS) & (parent=='::'))
Well, I have never wrapped templates so far. This part of pypp_api was
written by Allen. You are not using the Template() method, so I don't
know if this could already work or not. Or maybe the result is empty
because you are actually querying for a typedef instead of a class...?
Try Decl() instead of Class():
root.Decl("vector_int").expose()
- Matthias -
|