[pygccxml-commit] source/pyplusplus/experimental pypp_api.py,1.5,1.6
Brought to you by:
mbaas,
roman_yakovenko
From: Matthias B. <mb...@us...> - 2006-03-10 10:56:08
|
Update of /cvsroot/pygccxml/source/pyplusplus/experimental In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20609 Modified Files: pypp_api.py Log Message: 1) Removed the filtering in buildCreators() as this is now managed by pyplusplus. Now expose()/ignore() actually works again. 2) Fixed some typos Index: pypp_api.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/experimental/pypp_api.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pypp_api.py 9 Mar 2006 10:55:50 -0000 1.5 --- pypp_api.py 10 Mar 2006 10:56:05 -0000 1.6 *************** *** 60,64 **** """ Wrapper for a module (or part of a module). Captures handling of parsing and writing out bindings. ! Note: The pubic namespace '::' is the root decl for the Module. By default all declarations are ignored. --- 60,64 ---- """ Wrapper for a module (or part of a module). Captures handling of parsing and writing out bindings. ! Note: The public namespace '::' is the root decl for the Module. By default all declarations are ignored. *************** *** 92,96 **** self.mCacheFile = cacheFile # File to use for caching gccxml output self.mVerbose = verbose # Should there be verbose output during processing ! self.mDeclRoot = None # Root of the parsed decls self.mFinalDecls = None # Final list of decls to export self.mTemplates = [] # List of (templateType, typedefName) to instantiate --- 92,97 ---- self.mCacheFile = cacheFile # File to use for caching gccxml output self.mVerbose = verbose # Should there be verbose output during processing ! self.mDeclRoot = None # Root of the parsed decls (as declaration_t object) ! self.mDeclRootWrapper = None # The wrapper around mDeclRoot self.mFinalDecls = None # Final list of decls to export self.mTemplates = [] # List of (templateType, typedefName) to instantiate *************** *** 115,118 **** --- 116,121 ---- if self.mVerbose: print "Parsing headers: ", self.mHeaderFiles + + # Create and initialize the config object parser_cfg = parser.config_t(self.mGccXmlPath, self.mWorkingDir, *************** *** 134,143 **** temp_file.close() if self.mVerbose: ! print " creating template instatiation file: ", temp_filename full_header_list.append(temp_filename) ! the_parser = parser.project_reader_t(config=parser_cfg, cache=self.mCacheFile, decl_factory=decl_wrappers.dwfactory_t()) parsed_decls = the_parser.read_files(full_header_list, parser.project_reader.COMPILATION_MODE.FILE_BY_FILE) --- 137,148 ---- temp_file.close() if self.mVerbose: ! print " creating template instantiation file: ", temp_filename full_header_list.append(temp_filename) ! ! # Create the parser object... the_parser = parser.project_reader_t(config=parser_cfg, cache=self.mCacheFile, decl_factory=decl_wrappers.dwfactory_t()) + # ...and parse the headers parsed_decls = the_parser.read_files(full_header_list, parser.project_reader.COMPILATION_MODE.FILE_BY_FILE) *************** *** 189,204 **** # Filter the exposed decl list to create a final decl list. ! def filter(decl): ! expose = getattr(decl, "_expose_flag", False) ! return expose ! if self.mVerbose: ! print "Filtering module..." ! self.mFinalDecls = declarations.filtering.user_defined( self.mDeclRoot, filter) # Create creator.module_t for the module # - override the header files in create since we already know what files we used. ! maker = module_creator.creator_t(self.mFinalDecls, module_name=moduleName) extmodule = maker.create(decl_headers=self.mHeaderFiles) --- 194,213 ---- # Filter the exposed decl list to create a final decl list. ! # def filter(decl): ! # expose = getattr(decl, "_expose_flag", False) ! # return expose ! # if self.mVerbose: ! # print "Filtering module..." ! # self.mFinalDecls = declarations.filtering.user_defined( self.mDeclRoot, filter) ! ! # The above filtering is already done in pyplusplus as it stores ! # the "ignore" flag itself. [mbaas] # Create creator.module_t for the module # - override the header files in create since we already know what files we used. ! maker = module_creator.creator_t(self.mDeclRoot, module_name=moduleName) ! # maker = module_creator.creator_t(self.mFinalDecls, module_name=moduleName) extmodule = maker.create(decl_headers=self.mHeaderFiles) |