Update of /cvsroot/pygccxml/source/pyplusplus/docs/tutorials
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1480/pyplusplus/docs/tutorials
Modified Files:
module_builder.rest
Added Files:
pyplusplus_demo.png tutorials.rest
Log Message:
I hope those are last big changes in the project to this release.
Those changes give us an ability to create "setups" in one click
cd release_manager
python release_builder.py
Enjoy
Index: module_builder.rest
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/docs/tutorials/module_builder.rest,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** module_builder.rest 6 Apr 2006 06:20:06 -0000 1.1
--- module_builder.rest 9 Apr 2006 05:17:15 -0000 1.2
***************
*** 5,10 ****
.. contents:: Table of contents
- **All written here is relevant to CVS version.**
-
-------------------
What is pyplusplus?
--- 5,8 ----
***************
*** 14,75 ****
--------
! Concepts
--------
- `pyplusplus`_ introduces few concepts:
! **code creator**
----------------
- Class, that is responsible to create some specific code. For example,
- ``include_t`` code creator is responsible to create C++ include directive.
! **compound code creator**
-------------------------
! Code creator, that contains an ordered set of other code creators. For example,
! ``module_t`` is compaund code creator, because it keeps all code creators.
- **code creators tree**
- ----------------------
- Good definition is needed, meanwhile I can make next anology of code creators
- with XML DOM
- 1) code creators - DOM nodes
- 2) code creators tree - XML DOM
- 3) module - DOM Document
- **module creator**
- ------------------
- Factory, that is repososible to create all necessary code creators, for a
- given set of C++ declarations.
-
- **file writer(s)**
- ------------------
- Classes, that are responsible for writing all code produced by ``module_t``
- into file(s).
- --------
- Overview
- --------
- Code generation process using `pyplusplus`_ consists from few steps:
- 1. Read C++ declarations.
- 2. Create code creators tree.
- 3. Customize code creators.
- 4. Write code to files.
- Later, in this article I am going to explain every step. Before doing this, I
- would like to give you small advice: please `download`_ `pyplusplus`_ `GUI`_ and run
- it. There is one good reason for doing this: code generator wizard. `pyplusplus`_
- GUI contains small and simple wizard that will generate `pyplusplus`_ code from
- your settings. You have to know nothing about API - just few clicks with you
- mouse and you will get the code. Enjoy.
- .. _`download`: ./download.html
- .. _`GUI`: ./examples/pyplusplus_demo.png
- To do: add reference to the code!!!
-----------------------------
--- 12,59 ----
--------
! Preamble
--------
! I guess you decided to try to use `pyplusplus`_ API. Good! So lets start.
! First of all take a look on two files:
! * `hello_world.hpp`_ - C++ source code, that we want to export to Python
! * `generate_code.py`_ - Python code, that uses `pyplusplus`_ to export
! declarations from the source file
!
! .. _`hello_world.hpp` : ./module_builder_hello_world.html
! .. _`generate_code.py` : ./module_builder_generate_code.html
!
! ----------------
! module_builder_t
----------------
! `pyplusplus`_ is built from a few packages, but there is only one package you
! should realy to be familiar with - ``module_builder``. The main purpose of this
! package is to provide simple and user friendly interface to `pyplusplus`_
! internals. The main class within this package is ``module_builder_t``. The
! instance of this class will guide you through the whole process. Next few
! paragraphs will tell you more about this class.
!
-------------------------
! module_builder_t.__init__
! -------------------------
! ``module_builder_t.__init__`` methods takes few arguments:
!
! 1. files - list of all C++ source files, that declarations from them you want
! to export.
!
!
-----------------------------
--- NEW FILE: tutorials.rest ---
=========
tutorials
=========
.. contents:: Table of contents
-------------------
What is pyplusplus?
-------------------
.. include:: ./../definition.rest
-------------------
Graphical interface
-------------------
`pyplusplus`_ includes a `graphical interface`_. `Graphical interface`_
is invoked with the ``pyplusplus_gui`` command, or with ``pyplusplus_gui.pyw`` in
the scripts subdirectory of the `Python`_ installation directory.
My advise to you is to start with `graphical interface`_, because:
* you don't have to learn new API
* few clicks with mouse and you have `boost.python`_ code for your file(s)
* it is very easy to evaluate `pyplusplus`_ using it
* you can check whether `GCC-XML`_ is able to compile your code or not
* you can use it as a guide to `boost.python`_ library
* you can use it as a wizard to `pyplusplus`_ package
.. _`graphical interface` : ./pyplusplus_demo.png
.. _`Graphical interface` : ./pyplusplus_demo.png
---------------
Getting started
---------------
I suppose you decided to do some coding with `pyplusplus`_. `Module builder`_
tutorials will help you.
.. _`Module builder` : ./module_builder.html
--------
Advanced
--------
To be written. I think I should cover here the usage of code creators and code
creator's tree. Meanwhile you can take a look on the content of
``examples/custom_code_creator`` directory. It contains example how to create
your own code creator. To be more specific it exposes ``get*`` and ``set*``
methods as a property.
.. _`pyplusplus` : ./pyplusplus.html
.. _`pygccxml` : ./../pygccxml/pygccxml.html
.. _`boost.python`: http://www.boost.org/libs/python/doc/index.html
.. _`SourceForge`: http://sourceforge.net/index.php
.. _`Python`: http://www.python.org
.. _`GCC-XML`: http://www.gccxml.org
..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
End:
--- NEW FILE: pyplusplus_demo.png ---
(This appears to be a binary file; contents omitted.)
|