[pygccxml-commit] SF.net SVN: pygccxml: [1214] pyplusplus_dev
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2007-12-30 10:39:06
|
Revision: 1214 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1214&view=rev Author: roman_yakovenko Date: 2007-12-30 02:39:06 -0800 (Sun, 30 Dec 2007) Log Message: ----------- docs update Modified Paths: -------------- pyplusplus_dev/docs/documentation/multi_module_development.rest pyplusplus_dev/pyplusplus/module_builder/builder.py Modified: pyplusplus_dev/docs/documentation/multi_module_development.rest =================================================================== --- pyplusplus_dev/docs/documentation/multi_module_development.rest 2007-12-30 08:25:29 UTC (rev 1213) +++ pyplusplus_dev/docs/documentation/multi_module_development.rest 2007-12-30 10:39:06 UTC (rev 1214) @@ -126,6 +126,29 @@ As you can see "png.cpp" file doesn't contains code, which exposes ``core::image_i`` class. + +----------------------- +Semi-automatic solution +----------------------- + +``already_exposed`` solution is pretty good when you mix hand-written modules with +the Py++ generated ones. It doesn't work/scale for "true" multi-module development. +This is exactly the reason why `Py++`_ offers "semi automatic" solution. + +For every exposed module, `Py++`_ generates "exposed_decl.pypp.txt" file. This +file contains the list of all parsed declarations and whether they were included +or excluded. Later, when you work on another module, you can tell `Py++`_ that +the current module depends on the previously generated one. `Py++`_ will load +"exposed_decl.pypp.txt" file and update the declarations. + +Usage example: + +.. code-block:: Python + + mb = module_builder_t( ... ) + mb.register_module_dependency( other module generated code directory ) + + ------ Caveat ------ Modified: pyplusplus_dev/pyplusplus/module_builder/builder.py =================================================================== --- pyplusplus_dev/pyplusplus/module_builder/builder.py 2007-12-30 08:25:29 UTC (rev 1213) +++ pyplusplus_dev/pyplusplus/module_builder/builder.py 2007-12-30 10:39:06 UTC (rev 1214) @@ -107,9 +107,22 @@ def encoding( self ): return self.__encoding - def register_module_dependency( self, other_module_generate_code_dir ): + def register_module_dependency( self, other_module_generated_code_dir ): + """``already_exposed`` solution is pretty good when you mix hand-written + modules with Py++ generated. It doesn't work/scale for "true" + multi-module development. This is exactly the reason why ``Py++``_ + offers "semi automatic" solution. + + For every exposed module, ``Py++``_ generates "exposed_decl.pypp.txt" file. + This file contains the list of all parsed declarations and whether they + were included or excluded. Later, when you work on another module, you + can tell ``Py++``_ that the current module depends on the previously + generated one. ``Py++``_ will load "exposed_decl.pypp.txt" file and + update the declarations. + """ + db = utils.exposed_decls_db_t() - db.load( other_module_generate_code_dir ) + db.load( other_module_generated_code_dir ) db.update_decls( self.global_ns ) def run_query_optimizer(self): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |