Re: [Fwd: [pygccxml-development] Updated status]
Brought to you by:
mbaas,
roman_yakovenko
From: Matthias B. <ba...@ir...> - 2006-03-07 16:47:19
|
Roman Yakovenko wrote: >> - Calling parser changed a bit. >> >> There seems to be a new interface to calling the project parser. I >> think I just need to add a decl wrapper factory but I am not for sure. >> Roman? > > Yes > >> - How am I supposed to use the decl_wrappers? >> >> I am trying to parse with the project reader and then I was expecting >> that the returned decls would actually be the wrappers/decorators for >> the decls. Is this how it is supposed to work? > > Yes. I was confused about the above two points, but after rummaging in the code some more I also spotted the "decl_factory" argument in the constructor of project_reader_t (shouldn't this also be an argument to the parse() function?). And now the fog is actually clearing and I see what the new implementation gave us.... So when we parse the headers for pyplusplus, we actually don't get a declaration tree that is made of declaration_t objects as provided by pygccxml but of specialized decl_wrapper_t objects that are part of pyplusplus, right? The factory function is required because pygccxml cannot know about those decl_wrappers because they are specific to pyplusplus and pygccxml is an independent standalone package. All right, now I see and this really looks like an improvement to me. But maybe the names *_wrapper is really a bit unfortunate as in my view, they do not "wrap" the declarations, but they *are* the declarations. And I think they are not quite the same than the corresponding objects in our API versions as they cannot serve as a container for declarations. But they are the same insofar that they provide the decoration interface, correct? - Matthias - |