Revision: 1215
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1215&view=rev
Author: roman_yakovenko
Date: 2007-12-31 01:27:13 -0800 (Mon, 31 Dec 2007)
Log Message:
-----------
adding docs for file writers
Modified Paths:
--------------
pyplusplus_dev/docs/documentation/www_configuration.py
Added Paths:
-----------
pyplusplus_dev/docs/documentation/split_module.rest
Added: pyplusplus_dev/docs/documentation/split_module.rest
===================================================================
--- pyplusplus_dev/docs/documentation/split_module.rest (rev 0)
+++ pyplusplus_dev/docs/documentation/split_module.rest 2007-12-31 09:27:13 UTC (rev 1215)
@@ -0,0 +1,71 @@
+=================================
+Splitting generated code to files
+=================================
+
+.. contents:: Table of contents
+
+------------
+Introduction
+------------
+
+`Py++`_ provides 4 different strategies for splitting the generated code into files:
+
+* single file
+
+* multiple files
+
+* fixed set of multiple files
+
+* multiple files, where single class code is split to few files
+
+-----------
+Single file
+-----------
+
+If you just start with `Py++`_ or you are developing small module, than you should
+start with this strategy. It is simple - all source code generated to single file.
+
+Of course this solution has it's price - every time you change the code you will
+have to recompile it. If you expose 2 or more declarations this is annoying and
+time-consuming operation.
+
+Usage example
+-------------
+
+.. code-block:: Python
+
+ from pyplusplus import module_builder
+
+ mb = module_builder.module_builder_t(...)
+ mb.build_code_creator( ... )
+ mb.write_module( file name )
+
+--------------
+Multiple files
+--------------
+
+I believe this is the most widely used strategy. `Py++`_ splits generated code
+as follows:
+
+* every class has it's own source & header file
+* all free enumerations are written to a single source file
+* all free functions are written to a single source file
+* all global variables are written to a single source file
+* source file, which contains complete code for module registration
+
+The main advantage of this mode is that you don't have to recompile the whole
+project if only single declaration was changed. Thus this mode suites well huge
+projects.
+
+There are few problems with this mode:
+
+1. There are use cases, when the generated file names are too long.
+
+
+
+
+.. _`Py++` : ./../pyplusplus.html
+.. _`pygccxml` : ./../../pygccxml/pygccxml.html
+.. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html
+.. _`Python`: http://www.python.org
+.. _`GCC-XML`: http://www.gccxml.org
Modified: pyplusplus_dev/docs/documentation/www_configuration.py
===================================================================
--- pyplusplus_dev/docs/documentation/www_configuration.py 2007-12-30 10:39:06 UTC (rev 1214)
+++ pyplusplus_dev/docs/documentation/www_configuration.py 2007-12-31 09:27:13 UTC (rev 1215)
@@ -7,4 +7,5 @@
, 'inserting_code' : 'inserting code'
, 'best_practices' : 'best practices'
, 'multi_module_development' : 'multi-module development'
+ , 'split_module' : 'splitting generated code to files'
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|