Revision: 999
http://svn.sourceforge.net/pygccxml/?rev=999&view=rev
Author: roman_yakovenko
Date: 2007-04-18 11:51:07 -0700 (Wed, 18 Apr 2007)
Log Message:
-----------
adding documentation about "include" functionality
Modified Paths:
--------------
pyplusplus_dev/docs/documentation/index.rest
pyplusplus_dev/docs/documentation/inserting_code.rest
Modified: pyplusplus_dev/docs/documentation/index.rest
===================================================================
--- pyplusplus_dev/docs/documentation/index.rest 2007-04-18 06:22:31 UTC (rev 998)
+++ pyplusplus_dev/docs/documentation/index.rest 2007-04-18 18:51:07 UTC (rev 999)
@@ -30,7 +30,7 @@
Overview
--------
-* `API docs`_ - contains API documentation, including source code, generated by `epydoc`_
+* `API docs`_ - contains API documentation, including source code, generated by `epydoc`_
.. _`API docs` : ./apidocs/index.html
.. _`epydoc` : http://epydoc.sourceforge.net/
@@ -43,26 +43,26 @@
.. _`architecture` : ./architecture.html
-* `best practices`_ - `Py++`_ is huge, this document will explain you how to
+* `best practices`_ - `Py++`_ is huge, this document will explain you how to
effectively use it
.. _`best practices`: ./best_practices.html
-* `documentation string`_ - explains how to automaticly extract a documentation
+* `documentation string`_ - explains how to automaticly extract a documentation
from the source files and put it as Python documentation string
.. _`documentation string` : ./doc_string.html
-* `feedback`_ - `Py++`_ could be used as some kind of validator. It checks the
- exposed declarations and reports the potential errors. Thus you are able to
- create high quality Python bindings from the beginning. This document also
+* `warnings`_ - `Py++`_ could be used as some kind of validator. It checks the
+ exposed declarations and reports the potential errors. Thus you are able to
+ create high quality Python bindings from the beginning. This document also
describes how to supress the errors\\warnings.
-.. _`feedback` : ./feedback.html
+.. _`warnings` : ./warnings.html
* `functions & operators`_ - contains a complete guide to exposing functions and
operators, including "call policies" and description of different caveats
-
+
.. _`functions & operators` : ../functions/functions.html
* `hints`_ - describes few techinques, which will help you with exposing template
@@ -70,28 +70,28 @@
.. _`hints`: ./hints.html
-* `how to ... ?`_ - contains answers for different frequently asked questions
+* `how to ... ?`_ - contains answers for different frequently asked questions
.. _`how to ... ?` : ./how_to.html
* `inserting code`_ - a complete guide for insert your code into the generated one
-.. _`inserting code` : ./inserting_code.html
+.. _`inserting code` : ./inserting_code.html
-* `multi-module development`_ - describes how expose hierarchy of classes, which
+* `multi-module development`_ - describes how expose hierarchy of classes, which
is spread few different libraries
.. _`multi-module development`: ./multi_module_development.html
-* `properties`_ - describes how to create class properties using `Py++`_ and
+* `properties`_ - describes how to create class properties using `Py++`_ and
built-in algorithm for automatic properties recognition
.. _`properties`: ./properties.html
* `tutorials`_ - don't know where to start? Start here. Small and simple example
- will help you to start with `Py++`_. If you want to evaluate `Py++`_ you will
+ will help you to start with `Py++`_. If you want to evaluate `Py++`_ you will
find here small and handy GUI program.
-
+
.. _`tutorials` : ./tutorials/tutorials.html
.. _`Epydoc` : http://epydoc.sourceforge.net/
Modified: pyplusplus_dev/docs/documentation/inserting_code.rest
===================================================================
--- pyplusplus_dev/docs/documentation/inserting_code.rest 2007-04-18 06:22:31 UTC (rev 998)
+++ pyplusplus_dev/docs/documentation/inserting_code.rest 2007-04-18 18:51:07 UTC (rev 999)
@@ -194,8 +194,48 @@
for cls in mb.classes( relevant classes only ):
inject_code( cls )
+------------
+Header files
+------------
+Now, when you know how to add your code to a generated one, I think you also should
+now how to add your own set of include directives to the generated files. There
+are few ways to do this.
+1. The easiest and the most effective one - tell to `Py++`_ that generated code
+ for the declaration should include additional files:
+
+ .. code-block:: Python
+
+ mb = module_builder_t( ... )
+ my_class = mb.class_( ... )
+ my_class.include_files.append( "vector" )
+
+ Every declaration has ``include_files`` property. This is a list of header files,
+ you want to include from the generated file(s).
+
+2. Other approach is a little bit low level, but it allows you to add your header
+ files to every generated file:
+
+ .. code-block:: Python
+
+ mb = module_builder_t( ... )
+ ...
+ mb.build_code_creator( ... )
+ mb.code_creator.add_include( "iostream" )
+
+ You can also replace all (to be) generated header files with your own set:
+
+ .. code-block:: Python
+
+ mb.code_creator.replace_included_headers( ["stdafx.h"] )
+
+Of course you can, and may be should, use both approaches.
+
+I suggest you to spend some time and to tweak `Py++`_ to generate source code
+with as little as possible include directives. This will save you huge amount of
+time later.
+
.. _`Py++` : ./../pyplusplus.html
.. _`pygccxml` : ./../../pygccxml/pygccxml.html
.. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|