Thread: [pygccxml-commit] SF.net SVN: pygccxml: [21]
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2006-04-30 05:36:03
|
Revision: 21 Author: roman_yakovenko Date: 2006-04-29 22:35:49 -0700 (Sat, 29 Apr 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=21&view=rev Log Message: ----------- general clean up: renaming release_manager directory to developer_scripts For more explanation please read "developer_scripts/readme.txt" file Added Paths: ----------- developer_scripts/ developer_scripts/readme.txt Removed Paths: ------------- developer_scripts/release_builder.py developer_scripts/sf-how-to.txt developer_scripts/thanks_to.txt developer_scripts/tools.txt Copied: developer_scripts (from rev 17, release_manager) Added: developer_scripts/readme.txt =================================================================== --- developer_scripts/readme.txt (rev 0) +++ developer_scripts/readme.txt 2006-04-30 05:35:49 UTC (rev 21) @@ -0,0 +1,4 @@ +This directory contains few Python scripts, that are useful for maintenance +of source tree: + +clean_source_dir.py - remove binaries files from the source tree \ No newline at end of file Deleted: developer_scripts/release_builder.py =================================================================== --- release_manager/release_builder.py 2006-04-28 16:31:23 UTC (rev 17) +++ developer_scripts/release_builder.py 2006-04-30 05:35:49 UTC (rev 21) @@ -1,164 +0,0 @@ -# Copyright 2004 Roman Yakovenko. -# Distributed under the Boost Software License, Version 1.0. (See -# accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -import os -import sys -import shutil -from sets import Set as set -from file_system_iter import files_iterator, folders_iterator - -class release_builder_t( object ): - def __init__( self ): - object.__init__( self ) - - #source code root directory - self.scroot_dir, curr_dir = os.path.split( os.path.abspath( os.curdir ) ) - #This file should be run from release_manager directory - if curr_dir != 'release_manager': - raise RuntimeError( 'Current working directory should be release_manager' ) - #next release root dir - self.nrroot_dir = os.path.join( self.scroot_dir, '__next_release__' ) - - if not os.environ.has_key( 'PYTHONPATH' ): - os.environ['PYTHONPATH'] = '' - if sys.platform == 'win32': - environment_var_delimiter = ';' - else: # sys.platform == 'linux2' - environment_var_delimiter = ':' - - - self.packages = {} - for pkg in ('pygccxml', 'pyplusplus'): - package_path = os.path.join( self.nrroot_dir, pkg + self.get_version( pkg ) ) - self.packages[ pkg ] = package_path - os.environ[ 'PYTHONPATH' ] = os.environ[ 'PYTHONPATH' ] \ - + environment_var_delimiter \ - + package_path - - def get_version( self, package_name ): - init_file_path = os.path.join( self.scroot_dir, package_name, '__init__.py' ) - init_file = file( init_file_path ) - for line in init_file: - if line.startswith( '__version__' ): - version = line.split( '=' )[1] - return version.strip().strip("'") - raise RuntimeError( "Unable to find version for package %s!" % package_name ) - - - def log( self, message ): - print '[release builder]', message - - #def run_unitests( self ): - #self.log( 'running unittests' ) - #for package in self.__packages: - #self.log( 'running unittests for package "%s"' % package.__name__ ) - #sys_snapshot = self.__take_sys_snapshot() - #sys.path.append( os.path.join( package.__path__[0], 'unittests' ) ) - #test_all = __import__( 'test_all' ) - #was_successful = test_all.run_suite() - #self.__restore_sys_snapshot( sys_snapshot ) - #if not was_successful: - #raise RuntimeError( '%s unittest failed' % package.__name__) - #self.log( 'running unittests - done' ) - - def create_dist_packages( self ): - self.log( 'creating next release directory "%s" ' % self.nrroot_dir ) - if os.path.exists( self.nrroot_dir ): - shutil.rmtree( self.nrroot_dir ) - os.mkdir( self.nrroot_dir ) - map( os.mkdir, self.packages.values() ) - - for pkg, pkg_nr_dir in self.packages.items(): - self.log( 'creating target directory for package "%s"' % pkg ) - - shutil.copy( os.path.join( self.scroot_dir, 'release_manager', 'setup_%s.py' % pkg ) - , os.path.join( pkg_nr_dir, 'setup.py' ) ) - - pkg_nr_sc_dir = os.path.join( pkg_nr_dir, pkg ) - shutil.copytree( os.path.join( self.scroot_dir, pkg ), pkg_nr_sc_dir ) - - pkg_nr_docs_dir = os.path.join( pkg_nr_dir, 'docs' ) - shutil.copytree( os.path.join( self.scroot_dir, pkg, 'docs' ), pkg_nr_docs_dir ) - - shutil.rmtree( os.path.join( pkg_nr_sc_dir, 'docs' ) ) - - shutil.move( os.path.join( pkg_nr_sc_dir, 'unittests' ) - , os.path.join( pkg_nr_dir, 'unittests' ) ) - if pkg == 'pyplusplus': - shutil.move( os.path.join( pkg_nr_sc_dir, 'examples' ) - , os.path.join( pkg_nr_dir, 'examples' ) ) - shutil.rmtree( os.path.join( pkg_nr_sc_dir, 'experimental' ) ) - shutil.rmtree( os.path.join( pkg_nr_docs_dir, 'ConferenceIsrael2006' ) ) - shutil.rmtree( os.path.join( pkg_nr_dir, 'examples', 'tnfox' ) ) - - self.log( 'removing special directories') - - def generate_docs(self): - self.log( 'generating documentation' ) - - options = [ '--output="%(output)s"' - , '--docformat=epytext' - , '--url=http://www.language-binding.net' - #, '--graph=all' - , '--name=%(name)s' - , '--verbose' - , ' %(packages)s' ] - cmd_line = "epydoc " + ' '.join( options ) - cmd = cmd_line % { - 'output' : os.path.join( self.packages['pygccxml'], 'docs', 'apidocs' ) - , 'name' : 'pygccxml' - , 'packages' : os.path.join( self.packages['pygccxml'], 'pygccxml' ) } - self.log( 'running epydoc: ' + cmd ) - os.system( cmd ) - - cmd = cmd_line % { - 'output' : os.path.join( self.packages['pyplusplus'], 'docs', 'apidocs' ) - , 'name' : 'pyplusplus' - , 'packages' : ' '.join( [ os.path.join( self.packages['pyplusplus'], 'pyplusplus' ) - , os.path.join( self.packages['pygccxml'], 'pygccxml' ) ] ) } - self.log( 'running epydoc: ' + cmd ) - os.system(cmd) - - self.log( 'generating documentation - done' ) - - def clean_directories(self): - dir_names = [ 'cvs', 'temp', 'debug', 'release' ] - file_exts = [ - '*.pyc', '*.so', '*.os', '*.cpp~', '*.hpp~', '*.dll', '*.obj', '*.a' - , '*.def', '*.vsd', '*.sxd', '*.exp', '*.lib', '*.scons', '*.bak' - , '*.pdb', '*.idb', '*.pdb', '*.dat', '*.ncb', '*.suo' ] - files = [ '.sconsign', 'place_holder', 'www_configuration.py' ] - - self.log( 'creaning target directory' ) - - self.log( 'removing special directories') - tmp = [] - for dir_ in folders_iterator( self.nrroot_dir ): - if os.path.split( dir_ )[1].lower() in dir_names: - tmp.append( dir_ ) - tmp.sort() - tmp.reverse() - map( shutil.rmtree, tmp ) - self.log( 'removing special directories - done') - - self.log( 'removing special files') - map( os.remove, files_iterator( self.nrroot_dir, file_exts ) ) - - for file_ in files_iterator( self.nrroot_dir ): - if os.path.split( file_ )[1] in files: - os.remove( file_ ) - self.log( 'removing special files - done') - - self.log( 'creaning target directory - done' ) - - -if __name__ == "__main__": - rb = release_builder_t() - #srb.run_unitests() - rb.create_dist_packages() - rb.generate_docs() - rb.clean_directories() - - \ No newline at end of file Deleted: developer_scripts/sf-how-to.txt =================================================================== --- release_manager/sf-how-to.txt 2006-04-28 16:31:23 UTC (rev 17) +++ developer_scripts/sf-how-to.txt 2006-04-30 05:35:49 UTC (rev 21) @@ -1,31 +0,0 @@ -How to load web pages on SF ? - Phil Schwartz wrote: - I will add it shortly. As for the SF website interface, perhaps I can - help a bit. It took me some time to figure it out, but I've been a SF - user for several years so I know a lot about their interface. - - Basically, you need to ssh into your shell acount on SF. The easiest - way to do it is: - - $ ssh rom...@py... - - Once you're logged in (after supplying your password, of course). - You can then cd to your website directory: - - $ cd /home/groups/p/py/pygccxml/htdocs - - You can verify the existence of your web directory as such: - - $ l -d /home/groups/p/py/pygccxml - - You can then simply edit the index.html page with your favorite editor - (vi, emacs, pico, etc). - - Additionally, you can edit the files on your local system and use scp to - transfer them to your project's homepage. This is the method that I use - to update my websites (kodos, releaseforge, scratchy, denyhosts, faqtor, - etc...). - - cd www - scp * rom...@py...:/home/groups/p/py/pygccxml/htdocs - \ No newline at end of file Deleted: developer_scripts/thanks_to.txt =================================================================== --- release_manager/thanks_to.txt 2006-04-28 16:31:23 UTC (rev 17) +++ developer_scripts/thanks_to.txt 2006-04-30 05:35:49 UTC (rev 21) @@ -1,8 +0,0 @@ -Yulia -- my wife for patience -Brad King -- the author of GCCXML -Thomas Heller -- good SAX example -Detlev Offenbach -- eric3 - Python IDE \ No newline at end of file Deleted: developer_scripts/tools.txt =================================================================== --- release_manager/tools.txt 2006-04-28 16:31:23 UTC (rev 17) +++ developer_scripts/tools.txt 2006-04-30 05:35:49 UTC (rev 21) @@ -1,5 +0,0 @@ -AdBlock -Add Bookmark Here -fireFTP -LinkChecker -Linky \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-13 08:27:17
|
Revision: 395 Author: roman_yakovenko Date: 2006-08-13 01:27:03 -0700 (Sun, 13 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=395&view=rev Log Message: ----------- renaming 'boost.xxx' to 'Boost.Xxx' Modified Paths: -------------- index.rest pyplusplus_dev/docs/examples/boost/boost.rest pyplusplus_dev/docs/examples/examples.rest pyplusplus_dev/docs/quotes.rest Modified: index.rest =================================================================== --- index.rest 2006-08-13 06:36:07 UTC (rev 394) +++ index.rest 2006-08-13 08:27:03 UTC (rev 395) @@ -36,11 +36,11 @@ `Boost`_ provides free peer-reviewed portable C++ source libraries. `pyboost`_ package export next libraries to Python: - * `boost.date_time`_ - date time library designed to provide a basis for + * `Boost.Date_Time`_ - date time library designed to provide a basis for performing efficient time calculations - * `boost.crc`_ - cyclic redundancy code computation objects - * `boost.rational`_ - rational number class - * `boost.random`_ - a complete system for random number generation + * `Boost.CRC`_ - cyclic redundancy code computation objects + * `Boost.Rational`_ - rational number class + * `Boost.Random`_ - a complete system for random number generation Python bindings for `boost.graph`_ library is also available from http://www.osl.iu.edu/~dgregor/bgl-python . Modified: pyplusplus_dev/docs/examples/boost/boost.rest =================================================================== --- pyplusplus_dev/docs/examples/boost/boost.rest 2006-08-13 06:36:07 UTC (rev 394) +++ pyplusplus_dev/docs/examples/boost/boost.rest 2006-08-13 08:27:03 UTC (rev 395) @@ -39,10 +39,10 @@ flexible. `pyplusplus`_ is a new tool and in my opinion I should prove its usefulness. Using `pyplusplus`_, I exposed next libraries to Python: - * `boost.date_time`_ - * `boost.crc`_ - * `boost.rational`_ - * `boost.random`_ + * `Boost.Date_Time`_ + * `Boost.CRC`_ + * `Boost.Rational`_ + * `Boost.Random`_ There are few reasons I choose to expose those libraries. @@ -55,11 +55,11 @@ * clear concepts * comprehensive unit tests -3. I think, that Python is missing functionality provided by `boost.date_time`_ - and `boost.random`_ libraries. +3. I think, that Python is missing functionality provided by `Boost.Date_Time`_ + and `Boost.Random`_ libraries. I spent different amount of time on each library. It took me one week, to expose -the `boost.date_time`_ library. I added few missing features to `pyplusplus`_, +the `Boost.Date_Time`_ library. I added few missing features to `pyplusplus`_, polished the existing ones. Most of the time I spent translating tests from C++ to `Python`_. It took me 3 days to expose all other libraries. Modified: pyplusplus_dev/docs/examples/examples.rest =================================================================== --- pyplusplus_dev/docs/examples/examples.rest 2006-08-13 06:36:07 UTC (rev 394) +++ pyplusplus_dev/docs/examples/examples.rest 2006-08-13 08:27:03 UTC (rev 395) @@ -32,10 +32,10 @@ Using `pyplusplus`_ I created Python bindings for few libraries: - * `boost.date_time`_ - * `boost.crc`_ - * `boost.rational`_ - * `boost.random`_ + * `Boost.Date_Time`_ + * `Boost.CRC`_ + * `Boost.Rational`_ + * `Boost.Random`_ This is not "just another example". I went father and created new package: `pyboost`_. This is fully working Python package, with almost all unit test from Modified: pyplusplus_dev/docs/quotes.rest =================================================================== --- pyplusplus_dev/docs/quotes.rest 2006-08-13 06:36:07 UTC (rev 394) +++ pyplusplus_dev/docs/quotes.rest 2006-08-13 08:27:03 UTC (rev 395) @@ -51,10 +51,10 @@ * I am :-). I created Python bindings for next libraries: - * `boost.date_time`_ - * `boost.crc`_ - * `boost.rational`_ - * `boost.random`_ + * `Boost.Date_Time`_ + * `Boost.CRC`_ + * `Boost.Rational`_ + * `Boost.Random`_ .. _`boost.date_time` : http://boost.org/doc/html/date_time.html .. _`boost.crc` : http://boost.org/libs/crc/index.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-14 10:11:45
|
Revision: 400 Author: roman_yakovenko Date: 2006-08-14 03:10:54 -0700 (Mon, 14 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=400&view=rev Log Message: ----------- renaming pyplusplus to Py++ Modified Paths: -------------- index.rest pygccxml_dev/docs/download.rest pygccxml_dev/docs/history/history.rest pygccxml_dev/docs/pygccxml.rest pygccxml_dev/docs/query_interface.rest pyplusplus_dev/docs/comparisons/compare_to.rest pyplusplus_dev/docs/comparisons/pyste.rest pyplusplus_dev/docs/definition.rest pyplusplus_dev/docs/documentation/architecture.rest pyplusplus_dev/docs/documentation/best_practices.rest pyplusplus_dev/docs/documentation/containers.rest pyplusplus_dev/docs/documentation/doc_string.rest pyplusplus_dev/docs/documentation/feedback.rest pyplusplus_dev/docs/documentation/hints.rest pyplusplus_dev/docs/documentation/how_to.rest pyplusplus_dev/docs/documentation/index.rest pyplusplus_dev/docs/documentation/inserting_code.rest pyplusplus_dev/docs/documentation/tutorials/module_builder/module_builder.rest pyplusplus_dev/docs/documentation/tutorials/tutorials.rest pyplusplus_dev/docs/download.rest pyplusplus_dev/docs/examples/boost/boost.rest pyplusplus_dev/docs/examples/easybmp/easybmp.rest pyplusplus_dev/docs/examples/examples.rest pyplusplus_dev/docs/history/history.rest pyplusplus_dev/docs/links.rest pyplusplus_dev/docs/osdc2006/presentation-talk.rest pyplusplus_dev/docs/peps/call_wrapper_policies.rest pyplusplus_dev/docs/peps/indexing_suite.rest pyplusplus_dev/docs/peps/peps_index.rest pyplusplus_dev/docs/pyplusplus.rest pyplusplus_dev/docs/quotes.rest pyplusplus_dev/docs/www_configuration.py Modified: index.rest =================================================================== --- index.rest 2006-08-14 07:05:16 UTC (rev 399) +++ index.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -16,17 +16,17 @@ .. __: `pygccxml`_ ------------------- -pyplusplus package ------------------- +------------ +Py++ package +------------ "I love deadlines. I love the whooshing noise they make as they go by." -- Douglas Adams -Meet your deadlines with powerful code generator engine - `pyplusplus`_. +Meet your deadlines with powerful code generator engine - `Py++`_. -`pyplusplus`_ package and `Boost.Python`_ library provide a complete solution for +`Py++`_ package and `Boost.Python`_ library provide a complete solution for interfacing Python and C++. --------------- @@ -73,7 +73,7 @@ .. _`Boost`: http://boost.org/ .. _`Python`: http://www.python.org .. _`pygccxml`: ./pygccxml/pygccxml.html -.. _`pyplusplus`: ./pyplusplus/pyplusplus.html +.. _`Py++`: ./pyplusplus/pyplusplus.html .. _`pydsc`: ./pydsc/pydsc.html .. _`EasyBMP`: http://easybmp.sourceforge.net/ Modified: pygccxml_dev/docs/download.rest =================================================================== --- pygccxml_dev/docs/download.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pygccxml_dev/docs/download.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -12,7 +12,7 @@ can: 1) get access to source code -2) get access to latest release version of pyplusplus +2) get access to latest release version of `pygccxml`_ ----------------- Modified: pygccxml_dev/docs/history/history.rest =================================================================== --- pygccxml_dev/docs/history/history.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pygccxml_dev/docs/history/history.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -1,6 +1,6 @@ -============================== -pyplusplus development history -============================== +============================ +pygccxml development history +============================ .. contents:: Table of contents Modified: pygccxml_dev/docs/pygccxml.rest =================================================================== --- pygccxml_dev/docs/pygccxml.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pygccxml_dev/docs/pygccxml.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -24,7 +24,7 @@ * parse C++ source code * build a code generator - + `pyplusplus`_ is heavily based on `pygccxml`_ + + `Py++`_ is heavily based on `pygccxml`_ + generate `WSDL`_ file from sources + ... @@ -126,7 +126,7 @@ strategy. .. _`WSDL`: http://www.w3.org/TR/wsdl -.. _`pyplusplus`: ./../pyplusplus/pyplusplus.html +.. _`Py++`: ./../pyplusplus/pyplusplus.html .. _`pygccxml`: ./pygccxml.html .. _`SourceForge`: http://sourceforge.net/index.php .. _`Docutils`: http://docutils.sourceforge.net Modified: pygccxml_dev/docs/query_interface.rest =================================================================== --- pygccxml_dev/docs/query_interface.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pygccxml_dev/docs/query_interface.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -175,7 +175,7 @@ Return value of ``member_functions`` is not Python list or set, but instance of ``mdecl_wrapper_t`` class. This class allows you to work on all selected -objects at once. I will give an example from another project - `pyplusplus`_. +objects at once. I will give an example from another project - `Py++`_. In order to help `Boost.Python`_ to manage objects life time, all functions should have `call policies`_. For example: :: @@ -200,7 +200,7 @@ clone.call_policies = return_value_policy( manage_new_object ) -Another example, from `pyplusplus`_ project. Sometimes it is desirable to +Another example, from `Py++`_ project. Sometimes it is desirable to exclude declaration, from being exported to Python. Next code will exclude ``clone`` member function from being exported: @@ -270,7 +270,7 @@ .. _`call policies`: http://boost.org/libs/python/doc/tutorial/doc/html/python/functions.html#python.call_policies .. _`Call policies`: http://boost.org/libs/python/doc/tutorial/doc/html/python/functions.html#python.call_policies .. _`pygccxml`: ./pygccxml.html -.. _`pyplusplus`: ./../pyplusplus/pyplusplus.html +.. _`Py++`: ./../pyplusplus/pyplusplus.html .. _`SourceForge`: http://sourceforge.net/index.php .. _`Python`: http://www.python.org .. _`GCC-XML`: http://www.gccxml.org Modified: pyplusplus_dev/docs/comparisons/compare_to.rest =================================================================== --- pyplusplus_dev/docs/comparisons/compare_to.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/comparisons/compare_to.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -1,6 +1,6 @@ -========================= -Compare pyplusplus to ... -========================= +=================== +Compare Py++ to ... +=================== .. contents:: Table of contents @@ -9,7 +9,7 @@ ----- `Pyste`_ is the Boost.Python code generator, that is not under active development -any more. Nevertheless, users request to compare `pyplusplus`_ and `Pyste`_. You +any more. Nevertheless, users request to compare `Py++`_ and `Pyste`_. You can read `here`_ the comparison. .. _`here` : ./Pyste.html @@ -18,7 +18,7 @@ SWIG & SIP ---------- -The document, that compares SIP, SWIG and `pyplusplus`_ is under construction. +The document, that compares SIP, SWIG and `Py++`_ is under construction. May be you are editing it right now, by evaluating these tools :-). I did not use SWIG and SIP, so I can not provide you with fair comparison. I will let the open source project(s) "to talk": @@ -26,7 +26,7 @@ * `Python-OGRE`_: The impression of Lakin Wecker, after spending 30 hours working working with - `pyplusplus`_: http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=1478&sid=4d77585146aabbc54f4b31ec50874d86 + `Py++`_: http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=1478&sid=4d77585146aabbc54f4b31ec50874d86 .. _`Python-OGRE` : http://lakin.weckers.net/index_ogre_python.html @@ -42,7 +42,7 @@ -.. _`pyplusplus` : ./../pyplusplus.html +.. _`Py++` : ./../pyplusplus.html .. _`Pyste`: http://www.boost.org/libs/python/doc/index.html Modified: pyplusplus_dev/docs/comparisons/pyste.rest =================================================================== --- pyplusplus_dev/docs/comparisons/pyste.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/comparisons/pyste.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -1,11 +1,11 @@ -============================== -Pyste & pyplusplus comparison -============================== +======================== +Pyste & Py++ comparison +======================== .. contents:: Table of contents ---------------------- -What is `pyplusplus`_? +What is `Py++`_? ---------------------- .. include:: ../definition.rest @@ -25,7 +25,7 @@ -------- If you are reading this document, I can assume that you know what `Boost.Python`_, -`Pyste`_ and `pyplusplus`_ are. This document compares `Pyste`_ and `pyplusplus`_. +`Pyste`_ and `Py++`_ are. This document compares `Pyste`_ and `Py++`_. I am going to compare: * user interface @@ -55,7 +55,7 @@ I tried to fix `Pyste`_. At first, I developed `pygccxml`_ and tried to replace relevant `Pyste`_ functionality. I did not like the result. After this, I dropped -the idea to fix `Pyste`_ and decided to develop new code generator - `pyplusplus`_. +the idea to fix `Pyste`_ and decided to develop new code generator - `Py++`_. Later you will find few points, that explains, why I decided not to fix `Pyste`_. Have a nice reading. @@ -98,17 +98,17 @@ I have more examples, but I think you've got the idea. -pyplusplus ----------- +Py++ +---- -`pyplusplus`_ has 2 user interfaces: +`Py++`_ has 2 user interfaces: 1. GUI - small and simple graphic user interface, that does not request from - user any knowledge about `Boost.Python`_ or `pyplusplus`_. You can see + user any knowledge about `Boost.Python`_ or `Py++`_. You can see its `screenshot`_. 2. API - object-oriented framework, that helps you to create code generator, - that suites your needs. `pyplusplus`_ framework consists 3 packages: + that suites your needs. `Py++`_ framework consists 3 packages: 1. Code creators package. The only responsibility of classes in this package is to create code. Those classes do not care where code is @@ -121,7 +121,7 @@ 3. File writers package. This package contains classes that write generated code to file(s). -The good news: it is very easy to evaluate `pyplusplus`_, using GUI. The bad +The good news: it is very easy to evaluate `Py++`_, using GUI. The bad news is that you should learn an other set of API's in order to complete your task. It is not as awful as it sounds, but still there is some learning curve. @@ -152,12 +152,12 @@ 2. to control the order of written code -pyplusplus ----------- +Py++ +---- One of the biggest weaknesses of `Pyste`_ is a lack of good `GCC-XML`_ front-end and this fact cause `Pyste`_ to generate not optimal code. I will prove this -later. In order to avoid such weakness, before I have created `pyplusplus`_, +later. In order to avoid such weakness, before I have created `Py++`_, I created `pygccxml`_. `pygccxml`_ is a stand alone project, that provides few things: @@ -172,14 +172,14 @@ + every file will be parsed alone, after this, duplicated declarations and types will be removed -`pygccxml`_ contributes in few ways to `pyplusplus`_: +`pygccxml`_ contributes in few ways to `Py++`_: - + `pyplusplus`_ has nothing to do with code parsing. Theoretically + + `Py++`_ has nothing to do with code parsing. Theoretically an other back-end could be added to `pygccxml`_ without changing even one - line of code within `pyplusplus`_. + line of code within `Py++`_. + `pygccxml`_ has type traits. A lot of type traits algorithms from - `boost.type_traits`_ library has been implemented. `pyplusplus`_ makes + `boost.type_traits`_ library has been implemented. `Py++`_ makes an extensive use of them: * identify "call policies" algorithm @@ -195,7 +195,7 @@ do_smth(expensive_to_copy* x, const expensive_to_copy& y){ //Pyste generates next code //call_method< void >(self, "do_smth", x, y); - //pyplusplus generates next code + //Py++ generates next code *this->get_override("do_smth")( boost::python::ptr(x), boost::ref(y) ); //------------------------------^^^^^^^^^^^^^^^^^^-----^^^^^^^^^^ } @@ -232,7 +232,7 @@ what is going on, in "ClassExporter.py" file. Class *ClassExporter* knows everything about internal exporters, more over *ClassExporter* is responsible to export all its base classes before it exports itself. This is just wrong. -`pyplusplus`_ implements better solution. `pyplusplus`_ has code creators class +`Py++`_ implements better solution. `Py++`_ has code creators class hierarchy and factory, that creates those code creators based on given declarations. The questions like: @@ -246,7 +246,7 @@ solved by the factory. The only thing that left to code creators is to create code. By the way, it is not an easy task to fix this specific problem in `Pyste`_. -Serious re-factoring should be done. `pyplusplus`_ defines *compound_t* code +Serious re-factoring should be done. `Py++`_ defines *compound_t* code creator. *module_t*, *module_body_t*, *class_t* - are typical examples of compound code creators. They do know few code creators, but that is all. @@ -257,7 +257,7 @@ protocol and may be to modify code unit. Try to add *Exporter* that exposes get\\set functions as property. It is not an easy task. An other problem, I see here, is that code unit is some kind of *Exporter*. Code unit also creates code. -I did not fill good with this design. So I decided, that in `pyplusplus`_ code +I did not fill good with this design. So I decided, that in `Py++`_ code should be created only by code creators. This decision simplifies a lot of things: @@ -277,29 +277,29 @@ ------------ Dependencies ------------ -Both `Pyste`_ and `pyplusplus`_ introduce one external dependency. In order to -parse XML `Pyste`_ uses `elementtree`_. On the other side `pyplusplus`_ +Both `Pyste`_ and `Py++`_ introduce one external dependency. In order to +parse XML `Pyste`_ uses `elementtree`_. On the other side `Py++`_ depends on `pygccxml`_ project. ------------- Features list ------------- -`pyplusplus`_ supports almost all features `Pyste`_ implements. `pyplusplus`_, +`Py++`_ supports almost all features `Pyste`_ implements. `Py++`_, version 0.8.0, does not implements next functionality, implemented by `Pyste`_: * *pow* operator * good documentation -Here you can find the complete features list of `pyplusplus`_. +Here you can find the complete features list of `Py++`_. -Features unique to `pyplusplus`_: +Features unique to `Py++`_: - * `pyplusplus`_ exposes protected member functions + * `Py++`_ exposes protected member functions - * `pyplusplus`_, in most cases, will automatically detect class held type + * `Py++`_, in most cases, will automatically detect class held type - * `pyplusplus`_ creates implicit conversion code for: + * `Py++`_ creates implicit conversion code for: + casting constructors @@ -313,13 +313,13 @@ * operators defined in base class could be redefined/exposed in derived class - * `pyplusplus`_ exposes bit fields member variables + * `Py++`_ exposes bit fields member variables Nice features list ------------------ -Both `Pyste`_ and `pyplusplus`_ generate working code. As we already saw in some -cases `pyplusplus`_ do better job. `pyplusplus`_ allows next customization on +Both `Pyste`_ and `Py++`_ generate working code. As we already saw in some +cases `Py++`_ do better job. `Py++`_ allows next customization on generated code: * To define std and user directories. *include_t* code creator will take @@ -331,7 +331,7 @@ namespace dt = boost::date_time; All code, that is generated after this statement, will use ``dt`` instead of - ``boost::date_time``. This allows `pyplusplus`_ to create user friendly code. + ``boost::date_time``. This allows `Py++`_ to create user friendly code. * Classes and functions support 2 modes of code generation. Example: :: @@ -369,13 +369,13 @@ 2. If in future a developer decide to create overload to some function, this code will continue to compile. - * `pyplusplus`_ has small nice future - "license". User can specify the + * `Py++`_ has small nice future - "license". User can specify the license and it will appear in every generated file. - * `pyplusplus`_ allows user to define custom call policies resolver. See + * `Py++`_ allows user to define custom call policies resolver. See boost.date_time example - * `pyplusplus`_ allows user to create custom code creators. See + * `Py++`_ allows user to create custom code creators. See "custom_code_creator" example. * real world examples: @@ -390,9 +390,9 @@ Conclusion ---------- -If I were you I would choose `pyplusplus`_ to create bindings for your project. -For very small projects or for educational reasons you may use `pyplusplus`_.GUI. -For big projects, you need flexibility and power of `pyplusplus`_. +If I were you I would choose `Py++`_ to create bindings for your project. +For very small projects or for educational reasons you may use `Py++`_.GUI. +For big projects, you need flexibility and power of `Py++`_. ---- P.S. @@ -401,22 +401,22 @@ This comparison was a little unfair. First of all `Pyste`_ is no more under active development\\support. Second, `Pyste`_ has been written 2 years ago and had different goal. Next definitions will help you to understand the main -difference between `Pyste`_ and `pyplusplus`_. +difference between `Pyste`_ and `Py++`_. `Pyste`_ `Pyste`_ is `Boost.Python`_ code generator. - `pyplusplus`_ + `Py++`_ .. include:: ../definition.rest -`Pyste`_ and `pyplusplus`_ have been created to handle different tasks, hence +`Pyste`_ and `Py++`_ have been created to handle different tasks, hence the difference in design, user interface and complexity. Bruno da Silva de Oliveira, the `Pyste`_ author, understands the problems, I raised here. He -thought about them, long before I created `pyplusplus`_. But unfortunately, lack +thought about them, long before I created `Py++`_. But unfortunately, lack of time and motivation prevents him to work on `Pyste`_. .. _`screenshot` : ./../tutorials/pyplusplus_demo.png -.. _`pyplusplus` : ./../pyplusplus.html +.. _`Py++` : ./../pyplusplus.html .. _`pygccxml` : ./../../pygccxml/pygccxml.html .. _`Pyste`: http://www.boost.org/libs/python/doc/index.html .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html Modified: pyplusplus_dev/docs/definition.rest =================================================================== --- pyplusplus_dev/docs/definition.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/definition.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -1,4 +1,4 @@ -`pyplusplus`_ is an object-oriented framework for creating a code generator for +`Py++`_ is an object-oriented framework for creating a code generator for `Boost.Python`_ library. .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html \ No newline at end of file Modified: pyplusplus_dev/docs/documentation/architecture.rest =================================================================== --- pyplusplus_dev/docs/documentation/architecture.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/documentation/architecture.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -8,7 +8,7 @@ Introduction ------------ -This document will describe an architecture behind `pyplusplus`_. +This document will describe an architecture behind `Py++`_. --- C++ @@ -31,7 +31,7 @@ * C++ source files parsing and caching functionality -`pyplusplus`_ uses those services to: +`Py++`_ uses those services to: * extract declarations from source files and to provide powerful query interface @@ -46,17 +46,17 @@ * ... -pyplusplus & pygccxml integration ---------------------------------- +Py++ & pygccxml integration +--------------------------- -`pyplusplus`_ uses different approaches to expose these services to the user. +`Py++`_ uses different approaches to expose these services to the user. Parsing integration ------------------- -`pyplusplus`_ provides it's own "API" to configure and run `pygccxml`_ parsing +`Py++`_ provides it's own "API" to configure and run `pygccxml`_ parsing services. The "API" I am talking about, is arguments to ``module_builder.__init__`` method. The method takes all arguments, needed to envoke parsing services. It -has been done this way to simplify the usage of `pyplusplus`_. +has been done this way to simplify the usage of `Py++`_. Declarations tree integration @@ -98,7 +98,7 @@ What you see here, is a common pattern, that will appear in all projects, that -use `pyplusplus`_: +use `Py++`_: * find the declaration(s) @@ -108,7 +108,7 @@ good, it makes a lot of sence to configure the code generation engine, using the declarations tree. Now, the desired solution is clear: we should use declarations tree to configure the engine. So, let me to re-formulate the -question: how does `pyplusplus`_ add missinig functionality to +question: how does `Py++`_ add missinig functionality to ``pygccxml.declarations`` classes? There were few possible solutions to the problem. The next one was implemented: @@ -157,7 +157,7 @@ * How it should be written to files? - Remember, `pyplusplus`_ is targeting big projects. It can not generate all code + Remember, `Py++`_ is targeting big projects. It can not generate all code in one file - this will not work, not at all. Code creators and file writers provides solution to this problem. @@ -204,7 +204,7 @@ As you can see, there are primary 2 kinds of ``code creator``'s: declaration based and others. Declaration based creator generates code, that is needed to export the declaration. There a lot of use cases, where in order to export a -declaration, `pyplusplus`_ builds more then one ``code creator``. For example: +declaration, `Py++`_ builds more then one ``code creator``. For example: in order to export virtual function 2 ``code creator``'s are built: ( I will reuse example from `Boost.Python`_ `tutorials`__.) @@ -287,11 +287,11 @@ variables. Thus it knows that class ``X`` is used with ``boost::shared_ptr``, so it will set ``class_<X>`` ``HeldType`` to be ``boost::shared_ptr`` or will register its usage. Another interesting example is std containers. You don't have -to say to `pyplusplus`_ to export them, it will do it by itself. You may ask +to say to `Py++`_ to export them, it will do it by itself. You may ask why this detail is so interesting? Because the user does not have to specify all -set of declarations he wants to export! Because, in near future, `pyplusplus`_ +set of declarations he wants to export! Because, in near future, `Py++`_ will analize declarations dependency graph of exported declarations. If some -declaration should be exported and it is not, then `pyplusplus`_ will warn the +declaration should be exported and it is not, then `Py++`_ will warn the user. @@ -317,7 +317,7 @@ -.. _`pyplusplus` : ./../pyplusplus.html +.. _`Py++` : ./../pyplusplus.html .. _`pygccxml` : ./../../pygccxml/pygccxml.html .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html .. _`Python`: http://www.python.org Modified: pyplusplus_dev/docs/documentation/best_practices.rest =================================================================== --- pyplusplus_dev/docs/documentation/best_practices.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/documentation/best_practices.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -8,9 +8,9 @@ Introduction ------------ -`pyplusplus`_ has reach interface and a lot of functionality. Sometimes reach +`Py++`_ has reach interface and a lot of functionality. Sometimes reach interface helps, but sometimes it can confuse. This document will describe how -effectivly to use `pyplusplus`_. +effectivly to use `Py++`_. ------------ Big projects @@ -20,9 +20,9 @@ ---------- First of all, let me to define "big project". "Big project" is a project with -few handred of header files. `pyplusplus`_ was born to create `Python`_ bindings +few handred of header files. `Py++`_ was born to create `Python`_ bindings for such projects. If you take a look `here`__ you will find few such projects, -that use `pyplusplus`_. +that use `Py++`_. .. __ : ./../../pygccxml/quotes.html @@ -49,7 +49,7 @@ * Single header file, will also improve performance compiling the generated bindings. - When `pyplusplus`_ generated the bindings, you have a lot of .cpp files to + When `Py++`_ generated the bindings, you have a lot of .cpp files to compile. The project you are working on is big. I am sure it takes a lot of time to compile projects that depend on it. Generated code also depend on it, more over this code contains a lot of template isnstantiations. So it could @@ -71,12 +71,12 @@ ``precompiled_header`` argument could be ``None`` or string, that contains name of precompiled header file, that will be created in the directory. - `pyplusplus`_ will add to it header files from `Boost.Python`_ library and + `Py++`_ will add to it header files from `Boost.Python`_ library and your header files. What is ``huge_classes`` argument for? ``huge_classes`` could be ``None`` or list of references to class declarations. It is there to provide a solution to - `this error`_. ``pyplusplus`` will automaticly split generated code for the + `this error`_. `Py++`_ will automaticly split generated code for the huge classes to few files: :: @@ -92,7 +92,7 @@ -.. _`pyplusplus` : ./../pyplusplus.html +.. _`Py++` : ./../pyplusplus.html .. _`pygccxml` : ./../../pygccxml/pygccxml.html .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html .. _`Python`: http://www.python.org Modified: pyplusplus_dev/docs/documentation/containers.rest =================================================================== --- pyplusplus_dev/docs/documentation/containers.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/documentation/containers.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -52,10 +52,10 @@ .. _`documentation` : ./indexing_suite_v2.html .. _`post` : http://mail.python.org/pipermail/c++-sig/2003-October/005802.html ------------------------------- -pyplusplus and indexing suites ------------------------------- -`pyplusplus`_ implements support for both indexing suites. More over, you can +------------------------ +Py++ and indexing suites +------------------------ +`Py++`_ implements support for both indexing suites. More over, you can freely mix indexing suites. For example you can expose ``std::vector<int>`` using `Boost.Python`_ built-in indexing suite and ``std::map< int, std::string>`` using Raoul Gough's indexing suite. @@ -64,9 +64,9 @@ How does it work? ----------------- -In both cases, `pyplusplus`_ provides almost "hands free" solution. `pyplusplus`_ +In both cases, `Py++`_ provides almost "hands free" solution. `Py++`_ keeps track of all exported functions and variables, and if it sees that there is -a usage of stl container, it exports the container. In both cases, `pyplusplus`_ +a usage of stl container, it exports the container. In both cases, `Py++`_ analizes the container ``value_type`` ( or in case of mapping container ``mapped_type`` ), in order to set reasonable defaults, when it generates the code. @@ -74,7 +74,7 @@ Indexing suites API ------------------- -By default, `pyplusplus`_ works with built-in indexing suite. If you want to use +By default, `Py++`_ works with built-in indexing suite. If you want to use next version of indexing suite, you should tell this to the ``module_builder_t.__init__`` method: :: @@ -86,7 +86,7 @@ of ``indexing_suite1_t`` or ``indexing_suite2_t`` class. -How does `pyplusplus`_ know, that a class represents stl container instantiation? +How does `Py++`_ know, that a class represents stl container instantiation? Well, it uses ``pygccxml.declarations.container_traits`` to find out this. ``pygccxml.declarations.container_traits`` class, provides all functionality needed to identify container and to find out its ``value_type`` @@ -96,7 +96,7 @@ Built-in indexing suite API --------------------------- -`pyplusplus`_ defines ``indexing_suite1_t`` class. This class allows configure +`Py++`_ defines ``indexing_suite1_t`` class. This class allows configure any detail of generated code: * ``no_proxy`` - a boolean, if ``value_type`` is one of the next types @@ -136,19 +136,19 @@ }; -`pyplusplus`_ declarations tree will contains ``item``, ``my_data``, +`Py++`_ declarations tree will contains ``item``, ``my_data``, ``vector<item>`` and ``map<string,item>`` class declarations. If ``value_type`` does not support "equal" or "less than" functionality, sort and search functionality could not be exported. -`pyplusplus`_ class declaration has two properties: ``equality_comparable`` and +`Py++`_ class declaration has two properties: ``equality_comparable`` and ``less_than_comparable``. The value of those properties is calculated on first -invocation. If `pyplusplus`_ can find ``operator==``, that works on ``value_type``, +invocation. If `Py++`_ can find ``operator==``, that works on ``value_type``, then, ``equality_comparable`` property value will be set to ``True``, otherwise to ``False``. Same process is applied on ``less_than_comparable`` property. -In our case, `pyplusplus`_ will set both properties to ``False``, thus sort and +In our case, `Py++`_ will set both properties to ``False``, thus sort and search functionality will not be exported. It is the time to introduce ``indexing_suite2_t`` class: @@ -163,13 +163,13 @@ * ``element_type`` - is a reference to container ``value_type`` or ``mapped_type``. * ``call_policies`` - read/write property, in near future I will add code to - `pyplusplus`_ that will analize container ``value_type`` and will decide about + `Py++`_ that will analize container ``value_type`` and will decide about default call policies. Just an example: for non copy constructable classes ``call_policies`` should be set to ``return_internal_reference``. * ``[disable|enable]_method`` - new indexing suite, allows to configure functionality exported to Python, using simple bitwise operations on predefined - flags. `pyplusplus`_ allows you to specify what methods you want to disable + flags. `Py++`_ allows you to specify what methods you want to disable or enable. ``indexing_suite2_t.METHODS`` containes names of all supported methods. * ``[disable|enable]_methods_group`` - almost same as above, but allows you @@ -184,11 +184,11 @@ explicitly to disable method or mothods group. 2. The documentation of new indexing suite containes few small mistakes. - I hope, I will have time to fix them. Any way, `pyplusplus`_ generates + I hope, I will have time to fix them. Any way, `Py++`_ generates correct code. -.. _`pyplusplus` : ./../pyplusplus.html +.. _`Py++` : ./../pyplusplus.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/doc_string.rest =================================================================== --- pyplusplus_dev/docs/documentation/doc_string.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/documentation/doc_string.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -8,7 +8,7 @@ Introduction ------------ -`pyplusplus`_ provides a convenient way to export documentation from C++ source +`Py++`_ provides a convenient way to export documentation from C++ source files as `Python`_ `documentation string`_ --------------- @@ -23,11 +23,11 @@ my_class.member_function( "do_nothing" ).documentation = \ '"This function does nothing."' -In `pyplusplus`_ every class, that describes C++ declarations has ``documentation`` +In `Py++`_ every class, that describes C++ declarations has ``documentation`` property. This property should contain valid C++ string or ``None``. `Boost.Python`_ not always provides functionality, that exports documentation string. -In those cases, `pyplusplus`_ will not generate documentation string. +In those cases, `Py++`_ will not generate documentation string. Also the previous method is pretty clear, it is not practical. There should be a better way, to complete the task. Lets take a look on @@ -50,10 +50,10 @@ * ``decl.location.line`` - line number. So, you can go to the source file and to extract declaration from it. -`pyplusplus`_ will call ``doc_extractor`` on every exported declaration. +`Py++`_ will call ``doc_extractor`` on every exported declaration. -Now, when I think you understand what functionality `pyplusplus`_ provides. -It is a time to say what functionality is missing. `pyplusplus`_ does not +Now, when I think you understand what functionality `Py++`_ provides. +It is a time to say what functionality is missing. `Py++`_ does not provide any documentation extractor. It is not completely true. You can find document extractor for `doxygen`_ format in ``contrib/doc_extractors`` directory. It has been contributed by Georgiy Dernovoy. @@ -61,7 +61,7 @@ .. _`doxygen` : http://www.stack.nl/~dimitri/doxygen/ .. _`documentation string` : http://docs.python.org/tut/node6.html#SECTION006760000000000000000 -.. _`pyplusplus` : ./../pyplusplus.html +.. _`Py++` : ./../pyplusplus.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/feedback.rest =================================================================== --- pyplusplus_dev/docs/documentation/feedback.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/documentation/feedback.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -1,6 +1,6 @@ -===================== -pyplusplus feedback -===================== +============= +Py++ feedback +============= .. contents:: Table of contents @@ -8,7 +8,7 @@ Introduction ------------ -`pyplusplus`_ has been created with few goals in mind: +`Py++`_ has been created with few goals in mind: * to allow users create `Python`_ bindings for large projects using the `Boost.Python`_ library @@ -18,8 +18,8 @@ * to serve as a user's guide for `Boost.Python`_ library -Those goals all have something in common. In order to achive them, `pyplusplus`_ must -give useful feedback to the user. Because `pyplusplus`_ understands the +Those goals all have something in common. In order to achive them, `Py++`_ must +give useful feedback to the user. Because `Py++`_ understands the declarations it exports, it can scan declarations for potential problems, report them and in some cases provide hints about how to resolve the problem. Few examples: @@ -50,21 +50,21 @@ * In order to expose free/member function that takes more than 10 arguments user should define ``BOOST_PYTHON_MAX_ARITY`` macro. -For these problems and many other `pyplusplus`_ gives a nice explanation +For these problems and many other `Py++`_ gives a nice explanation and sometimes a link to the relevant information on the Internet. -I hope, that from now you will find it helpful to read every `pyplusplus`_ message :-). +I hope, that from now you will find it helpful to read every `Py++`_ message :-). ------------- How it works? ------------- In previous paragraph, I described some pretty useful functionality but what should you -do to enable it? - *Nothing!* By default, `pyplusplus`_ only prints the +do to enable it? - *Nothing!* By default, `Py++`_ only prints the important messages to ``stdout``. More over it prints them onle for declarations that are going to be exported. -`pyplusplus`_ uses the python `logging`_ package to write all user messages. By +`Py++`_ uses the python `logging`_ package to write all user messages. By default, messages with ``DEBUG`` level will be skipped, all other messages will be reported. @@ -91,12 +91,12 @@ 2. But what if you want to disable some messages and leave others? This is also possible. - `pyplusplus`_ and `pygccxml`_ do not use a single logger. Almost every internal + `Py++`_ and `pygccxml`_ do not use a single logger. Almost every internal package has its own logger. So you can enable one logger and disable another one. The `pygccxml`_ package defines all loggers in the ``pygccxml.utils`` package. - The `pyplusplus`_ package defines all logers in the ``pyplusplus._logging_`` package. + The `Py++`_ package defines all logers in the ``pyplusplus._logging_`` package. Both packages define a ``loggers`` class. Those classes keep references to different loggers. The ``loggers`` classes look very similar to the next class: @@ -125,7 +125,7 @@ You can use these references in the ``logging`` package to complete your task of adjusting individual loggers. - One more thing, `pyplusplus`_ automatically splits long message, where line + One more thing, `Py++`_ automatically splits long message, where line length defaults to 70 characters. Thus it is very convinient to read them on your screen. If you want to use different tools to monitor those messages, consider to use standard `Formatter`_ class, instead of ``multi_line_formatter_t`` one. @@ -146,7 +146,7 @@ * ``readme( self )`` - This method gives you access to all tips/hints/warnings `pyplusplus`_ has about + This method gives you access to all tips/hints/warnings `Py++`_ has about the declaration. This methods returns a list of strings. If the declaration is not exportable, than first message within the list is an explanation, why it is not exportable. @@ -154,7 +154,7 @@ .. _`Formatter` : http://docs.python.org/lib/node357.html .. _`logging` : http://docs.python.org/lib/module-logging.html -.. _`pyplusplus` : ./../pyplusplus.html +.. _`Py++` : ./../pyplusplus.html .. _`pygccxml` : ./../../pygccxml/pygccxml.html .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html .. _`Python`: http://www.python.org Modified: pyplusplus_dev/docs/documentation/hints.rest =================================================================== --- pyplusplus_dev/docs/documentation/hints.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/documentation/hints.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -8,8 +8,8 @@ Class template instantiation alias ---------------------------------- -`pyplusplus`_ has nice feature. If you define ``typedef`` for instantiated class -template, than `pyplusplus`_ will use it as a `Python`_ class name. +`Py++`_ has nice feature. If you define ``typedef`` for instantiated class +template, than `Py++`_ will use it as a `Python`_ class name. For example: :: @@ -26,7 +26,7 @@ ... } -`pyplusplus`_ will use "numbers" as Python class name: +`Py++`_ will use "numbers" as Python class name: :: @@ -38,7 +38,7 @@ This feature will work only in case there is only one such ``typedef``. Using class property ``aliases`` you can get access to all ``typedef``'s of the class. -.. _`pyplusplus` : ./../pyplusplus.html +.. _`Py++` : ./../pyplusplus.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/how_to.rest =================================================================== --- pyplusplus_dev/docs/documentation/how_to.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/documentation/how_to.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -41,7 +41,7 @@ Small usage advice. ------------------- -`pyplusplus`_ allows you to define a query that will return you all exception classes: +`Py++`_ allows you to define a query that will return you all exception classes: :: @@ -82,7 +82,7 @@ ; Now, after you know how this problem is solved. I will show how this solution -could be integrated with `pyplusplus`_. +could be integrated with `Py++`_. :: @@ -115,14 +115,14 @@ ------------------------------------------------------------ If you get this error, that the generated file is too big. You will have to split -it to few files. Well, not you but `pyplusplus`_ you will only have to tell that +it to few files. Well, not you but `Py++`_ you will only have to tell that to it. If you are using ``module_builder_t.write_module`` method, consider to switch to ``module_builder_t.split_module``. If you are using ``split_method``, but still generated code for some specific -class could not be compiled because of error, you can ask `pyplusplus`_ to split +class could not be compiled because of error, you can ask `Py++`_ to split class registration code to few cpp files. For more information, please read the documentation. @@ -227,7 +227,7 @@ mb.namespace( 'py_details' ).exclude() -`pyplusplus`_ allows you to extract declarations from string, that contains +`Py++`_ allows you to extract declarations from string, that contains valid C++ code. It creates temporal header file and compiles it. At the end of the compilation process it will remove it. You can read mode about ``create_text_fc`` function `here`__. @@ -246,7 +246,7 @@ -.. _`pyplusplus` : ./../pyplusplus.html +.. _`Py++` : ./../pyplusplus.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/index.rest =================================================================== --- pyplusplus_dev/docs/documentation/index.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/documentation/index.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -1,6 +1,6 @@ -======================== -pyplusplus documentation -======================== +================== +Py++ documentation +================== .. contents:: Table of contents @@ -8,13 +8,13 @@ Help needed! ------------ -`pyplusplus`_ documentation is always under active development. It is not an easy +`Py++`_ documentation is always under active development. It is not an easy task to create and maintain it. I will appriciate any help! How can you help? -* Lets face it: today it is not possible to use `pyplusplus`_ without eventually - looking into source code. `pyplusplus`_ uses `Epydoc`_ to generate documentation +* Lets face it: today it is not possible to use `Py++`_ without eventually + looking into source code. `Py++`_ uses `Epydoc`_ to generate documentation from source files. So, if you found some undocumented piece of code and you understand what it does, please write documentation string. @@ -26,7 +26,7 @@ just point me to the place. .. _`Epydoc` : http://epydoc.sourceforge.net/ -.. _`pyplusplus` : ./../pyplusplus.html +.. _`Py++` : ./../pyplusplus.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/inserting_code.rest =================================================================== --- pyplusplus_dev/docs/documentation/inserting_code.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/documentation/inserting_code.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -8,7 +8,7 @@ Introduction ------------ -`pyplusplus`_ is not a magician! Sometimes there is a need to add code to +`Py++`_ is not a magician! Sometimes there is a need to add code to generated file(s). This document will describe how you can insert your code to almost any place. @@ -71,7 +71,7 @@ ``int`` is immutable type in Python. So you can not expose ``get_size`` member function as is. You need to create a wrapper and expose it. -In the near future ``pyplusplus`` will eliminate the need of creating hand +In the near future `Py++`_ will eliminate the need of creating hand written wrapper for this use case. :: @@ -92,14 +92,14 @@ ... ; -How it could be achieved with `pyplusplus`_? Class declaration, has also two +How it could be achieved with `Py++`_? Class declaration, has also two functions: * ``add_declaration_code( self, code )`` This method will add the code to the declaration section within the module. - If you split your module to few files, `pyplusplus`_ will add this code to the + If you split your module to few files, `Py++`_ will add this code to the cpp file, class registration code will be written in. Attention: there is no defined order between wrapper code and declaration section @@ -143,7 +143,7 @@ window = mb.class_( 'window_t' ) window.add_declaration_code( get_window_size definition ) window.add_registration_code( 'def( "get_size", &::get_window_size )' ) - #pyplusplus will add ';' if needed + #Py++ will add ';' if needed ---------------------------- Insert code to class wrapper @@ -193,7 +193,7 @@ -.. _`pyplusplus` : ./../pyplusplus.html +.. _`Py++` : ./../pyplusplus.html .. _`pygccxml` : ./../../pygccxml/pygccxml.html .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html .. _`Python`: http://www.python.org Modified: pyplusplus_dev/docs/documentation/tutorials/module_builder/module_builder.rest =================================================================== --- pyplusplus_dev/docs/documentation/tutorials/module_builder/module_builder.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/documentation/tutorials/module_builder/module_builder.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -1,12 +1,12 @@ -==================== -pyplusplus tutorials -==================== +============== +Py++ tutorials +============== .. contents:: Table of contents -------------------- -What is pyplusplus? -------------------- +------------- +What is Py++? +------------- .. include:: ./../../../definition.rest @@ -14,12 +14,12 @@ Preamble -------- -I guess you decided to try `pyplusplus`_ API. Good! Lets start. First of all, +I guess you decided to try `Py++`_ API. Good! Lets start. First of all, please 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 +* `generate_code.py`_ - Python code, that uses `Py++`_ to export declarations from the source file .. _`hello_world.hpp` : ./hello_world.html @@ -29,7 +29,7 @@ module_builder_t ---------------- -`pyplusplus`_ is built from a few packages, but there is only one package, you +`Py++`_ is built from a few packages, but there is only one package, you should really to be familiar with - ``module_builder``. This package is some kind of facade to low level API. It provides simple and intuitive API. The main class within this package is ``module_builder_t``. The instance of this class will @@ -65,7 +65,7 @@ Declarations customization -------------------------- Not all declarations should be exported! Not every declaration could be exported -without human invocation! As you already saw from example, `pyplusplus`_ provides +without human invocation! As you already saw from example, `Py++`_ provides simple and powerful declarations query interface. By default, only declarations that belongs to files, you have asked to parse, and to files, that lies in the same directories as parsed files, will be exported: @@ -88,7 +88,7 @@ ``include`` methods, on declarations. Basically, this is a second step of code generation process. During this step -you could/should/may change `pyplusplus`_ defaults: +you could/should/may change `Py++`_ defaults: * to rename exposed declarations * to include/exclude declarations @@ -104,7 +104,7 @@ ----------------------------------- Now it is a time to create module code creator. Do you remember, in inroduction -to `pyplusplus`_, I told you that before writing code to disc, `pyplusplus`_ will +to `Py++`_, I told you that before writing code to disc, `Py++`_ will create some kind of `AST`_. Well this is done by calling ``module_builder_t.build_code_creator`` function. Right now, the only important argument to the function is ``module_name``. Self explained, is it? @@ -136,7 +136,7 @@ will be written in. * ``module_builder_t.split_module`` - you should provide directory name. - For big projects it is a must to minimize compilation time. So `pyplusplus`_ + For big projects it is a must to minimize compilation time. So `Py++`_ splits your module source code to different files within the directory. @@ -151,7 +151,7 @@ That's all. I hope you enjoyed. -.. _`pyplusplus` : ./../../../pyplusplus.html +.. _`Py++` : ./../../../pyplusplus.html .. _`pygccxml` : ./../../../../pygccxml/pygccxml.html .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html .. _`SourceForge`: http://sourceforge.net/index.php Modified: pyplusplus_dev/docs/documentation/tutorials/tutorials.rest =================================================================== --- pyplusplus_dev/docs/documentation/tutorials/tutorials.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/documentation/tutorials/tutorials.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -4,9 +4,9 @@ .. contents:: Table of contents -------------------- -What is pyplusplus? -------------------- +------------- +What is Py++? +------------- .. include:: ./../../definition.rest @@ -14,17 +14,17 @@ Graphical interface ------------------- -`pyplusplus`_ includes a `graphical interface`_. `Graphical interface`_ +`Py++`_ includes a `graphical interface`_. `Graphical interface`_ is invoked with the ``pyplusplus_gui`` command, or with ``pyplusplus_gui.pyw`` from the ``scripts`` subdirectory of the `Python`_ installation directory. My advise to you - 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 + * it is very easy to evaluate `Py++`_ 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 - * it is able to generate `pyplusplus`_ code for you + * it is able to generate `Py++`_ code for you .. _`graphical interface` : ./pyplusplus_demo.png .. _`Graphical interface` : ./pyplusplus_demo.png @@ -33,7 +33,7 @@ Getting started --------------- -I suppose you decided to do some coding with `pyplusplus`_. `Module builder`_ +I suppose you decided to do some coding with `Py++`_. `Module builder`_ tutorials will help you. .. _`Module builder` : ./module_builder/module_builder.html @@ -48,7 +48,7 @@ to create your own code creator. To be more specific, it exposes ``get*`` and ``set*`` methods as a single property. -.. _`pyplusplus` : ./../../pyplusplus.html +.. _`Py++` : ./../../pyplusplus.html .. _`pygccxml` : ./../....//pygccxml/pygccxml.html .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html .. _`SourceForge`: http://sourceforge.net/index.php Modified: pyplusplus_dev/docs/download.rest =================================================================== --- pyplusplus_dev/docs/download.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/download.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -1,18 +1,18 @@ -=================== -pyplusplus download -=================== +============= +Py++ download +============= .. contents:: Table of contents -------------------------- -pyplusplus on SourceForge -------------------------- +------------------- +Py++ on SourceForge +------------------- -`pyplusplus`_ project is hosted on SourceForge. Using SourceForge services you +`Py++`_ project is hosted on SourceForge. Using SourceForge services you can: 1) get access to source code -2) get access to latest release version of pyplusplus +2) get access to latest release version of `Py++`_ ----------------- @@ -32,11 +32,11 @@ ------------ In command prompt or shell change current directory to be "pyplusplus-X.Y.Z". -"X.Y.Z" is version of `pyplusplus`_. Type next command: +"X.Y.Z" is version of `Py++`_. Type next command: | ``python setup.py install`` -After this command complete, you should have installed `pyplusplus`_ package. +After this command complete, you should have installed `Py++`_ package. ------------ Dependencies @@ -45,7 +45,7 @@ * `pygccxml`_ -.. _`pyplusplus` : ./pyplusplus.html +.. _`Py++` : ./pyplusplus.html .. _`pygccxml` : ./../pygccxml/pygccxml.html .. Modified: pyplusplus_dev/docs/examples/boost/boost.rest =================================================================== --- pyplusplus_dev/docs/examples/boost/boost.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/examples/boost/boost.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -8,7 +8,7 @@ Introduction -------------- -What is the `pyplusplus`_? +What is the `Py++`_? -------------------------- .. include:: ./../../definition.rest @@ -35,9 +35,9 @@ .. _`TR2` : http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1810.html -I believe that `pyplusplus`_ is ready for hard work. It is quick, stable and -flexible. `pyplusplus`_ is a new tool and in my opinion I should prove its -usefulness. Using `pyplusplus`_, I exposed next libraries to Python: +I believe that `Py++`_ is ready for hard work. It is quick, stable and +flexible. `Py++`_ is a new tool and in my opinion I should prove its +usefulness. Using `Py++`_, I exposed next libraries to Python: * `Boost.Date_Time`_ * `Boost.CRC`_ @@ -59,7 +59,7 @@ and `Boost.Random`_ libraries. I spent different amount of time on each library. It took me one week, to expose -the `Boost.Date_Time`_ library. I added few missing features to `pyplusplus`_, +the `Boost.Date_Time`_ library. I added few missing features to `Py++`_, polished the existing ones. Most of the time I spent translating tests from C++ to `Python`_. It took me 3 days to expose all other libraries. @@ -301,7 +301,7 @@ .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html .. _`boost.operators`: http://www.boost.org/ .. _`GCC-XML`: http://www.gccxml.org -.. _`pyplusplus` : ./../../pyplusplus.html +.. _`Py++` : ./../../pyplusplus.html .. Local Variables: Modified: pyplusplus_dev/docs/examples/easybmp/easybmp.rest =================================================================== --- pyplusplus_dev/docs/examples/easybmp/easybmp.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/examples/easybmp/easybmp.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -15,7 +15,7 @@ for easily reading, writing, and modifying Windows bitmap (BMP) image files. In this example I am referring to version 0.70. -What is `pyplusplus`_? +What is `Py++`_? ---------------------- .. include:: ./../../definition.rest @@ -24,10 +24,10 @@ Description ----------- -`pyplusplus`_ has been used to create `Python`_ bindings for `EasyBMP`_ +`Py++`_ has been used to create `Python`_ bindings for `EasyBMP`_ library. Before proceeding with this example, I should say, that I did not work with `EasyBMP`_ at all. I have seen it's announcement on www.freshmeat.org site -and decided to test `pyplusplus`_ with "real world" project. It took me 30 +and decided to test `Py++`_ with "real world" project. It took me 30 minutes to create full working python version of this library. This examples consist few files and directories: @@ -52,12 +52,12 @@ |target.bmp| .. |source.bmp| image:: ./source.bmp - :alt: pyplusplus logo + :alt: Py++ logo :align: middle .. :border: 0 .. |target.bmp| image:: ./target.bmp - :alt: pyplusplus logo + :alt: Py++ logo :align: middle .. :border: 0 @@ -67,7 +67,7 @@ http://sourceforge.net/project/showfiles.php?group_id=118209. -.. _`pyplusplus` : ./../../pyplusplus.html +.. _`Py++` : ./../../pyplusplus.html .. _`environment.py`: http://cvs.sourceforge.net/viewcvs.py/pygccxml/source/pyplusplus/examples/py_easybmp/environment.py?view=markup .. _`sconstruct`: http://cvs.sourceforge.net/viewcvs.py/pygccxml/source/pyplusplus/examples/py_easybmp/sconstruct?view=markup .. _`grayscale.py`: http://cvs.sourceforge.net/viewcvs.py/pygccxml/source/pyplusplus/examples/py_easybmp/grayscale.py?view=markup Modified: pyplusplus_dev/docs/examples/examples.rest =================================================================== --- pyplusplus_dev/docs/examples/examples.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/examples/examples.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -8,7 +8,7 @@ Graphical interface ------------------- -`pyplusplus`_ has nice, small and simple `graphical interface`_. Please, read +`Py++`_ has nice, small and simple `graphical interface`_. Please, read `tutorials`_ for more information. .. _`graphical interface` : ./../tutorials/pyplusplus_demo.png @@ -30,7 +30,7 @@ Boost provides free peer-reviewed portable C++ source libraries. -Using `pyplusplus`_ I created Python bindings for few libraries: +Using `Py++`_ I created Python bindings for few libraries: * `Boost.Date_Time`_ * `Boost.CRC`_ @@ -51,7 +51,7 @@ .. _`GUI`: ./../tutorials/pyplusplus_demo.png .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html -.. _`pyplusplus` : ./../pyplusplus.html +.. _`Py++` : ./../pyplusplus.html .. _`EasyBMP`: http://easybmp.sourceforge.net/ .. Modified: pyplusplus_dev/docs/history/history.rest =================================================================== --- pyplusplus_dev/docs/history/history.rest 2006-08-14 07:05:16 UTC (rev 399) +++ pyplusplus_dev/docs/history/history.rest 2006-08-14 10:10:54 UTC (rev 400) @@ -1,6 +1,6 @@ -============================== -pyplusplus development history -============================== +======================== +Py++ development history +======================== .. contents:: Table of contents @@ -22,10 +22,10 @@ 0.8.1 ----- -1. Georgiy Dernovoy contributed a patch, that allows `pyplusplus`_ GUI to +1. Georgiy Dernovoy contributed a patch, that allows `Py++`_ GUI to save\\load last used header file. -2. `pyplusplus`_ improved a lot functionality related to providing feedback to user: +2. `Py++`_ improved a lot functionality related to providing feedback to user: * every package has its own logger @@ -42,10 +42,10 @@ 5. Generated code for member and free functions was changed. This changed was introduced to fix compilation errors on msvc 7.1 compiler. -6. `pyplusplus`_ generates "stable" code. If header files were not changed, - `pyplusplus`_ will not change any file. +6. `Py++`_ generates "stable" code. If header files were not changed, + `Py++`_ will not change any file. -7. Support for huge classes was added. `pyplusplus`_ is able to split registration +7. Support for huge classes was added. `Py++`_ is able to split registration code for the class to multiple cpp files. 8. User code could be added almost anywhere, without use of low level API. @@ -61,19 +61,19 @@ Version 0.8.0 ------------- -1. `pyplusplus`_ "user guide" functionality has been improved. Now `pyplusplus`_ +1. `Py++`_ "user guide" functionality has been improved. Now `Py++`_ can answer few questions: * why this declaration could not be exported * why this function could not be overriden from Python -2. `pyplusplus`_ can suggest an alias for exported classes. +2. `Py++`_ can suggest an alias for exported classes. 3. Small redesign has been done - now it is much easier to understand and maintain code creators, that creates code for C++ functions. ... [truncated message content] |
From: <rom...@us...> - 2006-08-15 10:41:49
|
Revision: 405 Author: roman_yakovenko Date: 2006-08-15 03:41:00 -0700 (Tue, 15 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=405&view=rev Log Message: ----------- fix spelling errors Modified Paths: -------------- index.rest pydsc_dev/docs/pydsc.rest pygccxml_dev/docs/definition.rest pygccxml_dev/docs/design.rest pygccxml_dev/docs/history/history.rest pygccxml_dev/docs/pygccxml.rest pygccxml_dev/docs/query_interface.rest pyplusplus_dev/docs/comparisons/compare_to.rest pyplusplus_dev/docs/comparisons/pyste.rest pyplusplus_dev/docs/documentation/architecture.rest pyplusplus_dev/docs/documentation/best_practices.rest pyplusplus_dev/docs/documentation/containers.rest pyplusplus_dev/docs/documentation/doc_string.rest pyplusplus_dev/docs/documentation/feedback.rest pyplusplus_dev/docs/documentation/how_to.rest pyplusplus_dev/docs/documentation/index.rest pyplusplus_dev/docs/documentation/inserting_code.rest pyplusplus_dev/docs/documentation/tutorials/module_builder/module_builder.rest pyplusplus_dev/docs/documentation/tutorials/tutorials.rest pyplusplus_dev/docs/examples/boost/boost.rest pyplusplus_dev/docs/examples/easybmp/easybmp.rest pyplusplus_dev/docs/examples/examples.rest pyplusplus_dev/docs/history/history.rest pyplusplus_dev/docs/links.rest pyplusplus_dev/docs/peps/call_wrapper_policies.rest pyplusplus_dev/docs/peps/indexing_suite.rest pyplusplus_dev/docs/peps/peps_index.rest pyplusplus_dev/docs/pyplusplus.rest Modified: index.rest =================================================================== --- index.rest 2006-08-15 08:44:45 UTC (rev 404) +++ index.rest 2006-08-15 10:41:00 UTC (rev 405) @@ -1,86 +1,89 @@ -=========================== -C++ Python language binding -=========================== - -.. contents:: Table of contents - ----------------- -pygccxml package ----------------- - -* Do you need to parse C++ code? -* Do you need to build code generator? -* Do you need to create UML diagram? - -`pygccxml`_ is the way to go! `Learn more`__. - -.. __: `pygccxml`_ - ------------- -Py++ package ------------- +=========================== +C++ Python language binding +=========================== -"I love deadlines. I love the whooshing noise they make as they go by." +.. contents:: Table of contents - -- Douglas Adams +---------------- +pygccxml package +---------------- -Meet your deadlines with powerful code generator engine - `Py++`_. +* Do you need to parse C++ code? +* Do you need to build code generator? +* Do you need to create UML diagram? -`Py++`_ package and `Boost.Python`_ library provide a complete solution for -interfacing Python and C++. - ---------------- -pyboost package ---------------- - -`Boost`_ provides free peer-reviewed portable C++ source libraries. `pyboost`_ -package export next libraries to Python: - - * `Boost.Date_Time`_ - date time library designed to provide a basis for - performing efficient time calculations - * `Boost.CRC`_ - cyclic redundancy code computation objects - * `Boost.Rational`_ - rational number class - * `Boost.Random`_ - a complete system for random number generation - -Python bindings for `boost.graph`_ library is also available from -http://www.osl.iu.edu/~dgregor/bgl-python . - -------------- -pydsc package -------------- - -Documentation strings contain spelling errors? `Fix them in a minute`_. - -.. _`Fix them in a minute` : `pydsc`_ - ------------------ -pyeasybmp package ------------------ - -`EasyBMP`_ could be easier? Yes of course! Learn more about `EasyBMP Python bindings`_. - -.. _`EasyBMP Python bindings`: ./pyplusplus/examples/easybmp/easybmp.html +`pygccxml`_ is the way to go! `Learn more`__. -.. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html - -.. _`pyboost` : ./pyplusplus/examples/boost/boost.html -.. _`boost.graph` : http://www.boost.org/libs/graph/doc/table_of_contents.html -.. _`boost.date_time` : http://boost.org/doc/html/date_time.html -.. _`boost.crc` : http://boost.org/libs/crc/index.html -.. _`boost.rational` : http://boost.org/libs/rational/index.html -.. _`boost.random` : http://boost.org/libs/random/index.html - -.. _`Boost`: http://boost.org/ -.. _`Python`: http://www.python.org -.. _`pygccxml`: ./pygccxml/pygccxml.html -.. _`Py++`: ./pyplusplus/pyplusplus.html -.. _`pydsc`: ./pydsc/pydsc.html -.. _`EasyBMP`: http://easybmp.sourceforge.net/ - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - End: +.. __: `pygccxml`_ + +------------ +Py++ package +------------ + +"I love deadlines. I love the whooshing noise they make as they go by." + + -- Douglas Adams + +Meet your deadlines with powerful code generator engine - `Py++`_. + +`Py++`_ package and `Boost.Python`_ library provide a complete solution for +interfacing Python and C++. `Learn more`_. + +.. _`Learn more` : `Py++`_ + +--------------- +pyboost package +--------------- + +`Boost`_ provides free peer-reviewed portable C++ source libraries. `pyboost`_ +package export next libraries to Python: + + * `Boost.Date_Time`_ - date time library designed to provide a basis for + performing efficient time calculations + * `Boost.CRC`_ - cyclic redundancy code computation objects + * `Boost.Rational`_ - rational number class + * `Boost.Random`_ - a complete system for random number generation + +Python bindings for `boost.graph`_ library is also available from +http://www.osl.iu.edu/~dgregor/bgl-python . + +------------- +pydsc package +------------- + +Documentation strings contain spelling errors? `Fix them in a minute`_. + +.. _`Fix them in a minute` : `pydsc`_ + +----------------- +pyeasybmp package +----------------- + +`EasyBMP`_ could be easier? Yes of course! Learn more about `EasyBMP Python bindings`_. + +.. _`EasyBMP Python bindings`: ./pyplusplus/examples/easybmp/easybmp.html + +.. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html + +.. _`pyboost` : ./pyplusplus/examples/boost/boost.html +.. _`boost.graph` : http://www.boost.org/libs/graph/doc/table_of_contents.html +.. _`boost.date_time` : http://boost.org/doc/html/date_time.html +.. _`boost.crc` : http://boost.org/libs/crc/index.html +.. _`boost.rational` : http://boost.org/libs/rational/index.html +.. _`boost.random` : http://boost.org/libs/random/index.html + +.. _`Boost`: http://boost.org/ +.. _`Python`: http://www.python.org +.. _`pygccxml`: ./pygccxml/pygccxml.html +.. _`Py++`: ./pyplusplus/pyplusplus.html +.. _`pydsc`: ./pydsc/pydsc.html +.. _`EasyBMP`: http://easybmp.sourceforge.net/ + +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + End: + Modified: pydsc_dev/docs/pydsc.rest =================================================================== --- pydsc_dev/docs/pydsc.rest 2006-08-15 08:44:45 UTC (rev 404) +++ pydsc_dev/docs/pydsc.rest 2006-08-15 10:41:00 UTC (rev 405) @@ -1,34 +1,33 @@ -================== -pydsc introduction -================== - -.. contents:: Table of contents - -.. meta:: - :description: Python documentation string spell checker +================== +pydsc introduction +================== + +.. contents:: Table of contents + +.. meta:: + :description: Python documentation string spell checker :keywords: Python, docstring, documentation, spell, check - , документация, спеллер, орфографическая коррекция, - --------------- -What is pydsc? --------------- - -.. include:: ./definition.rest - ----------------------- -What it is useful for? ----------------------- - -Well, this project was born to solve real problem - I made a lot of mistakes, -while writing documentation for my projects. I needed some way to check all -Python documentation strings, before I generate documentation from source files. -My goal was simplicity + easy customization. I achieved it. Here is example of -usage of pydsc: - + , документация, спеллер, орфографическая коррекция, + +-------------- +What is pydsc? +-------------- + +.. include:: ./definition.rest + +---------------------- +What it is useful for? +---------------------- + +Well, this project was born to solve real problem - I made a lot of mistakes, +when I write source code documentation for my projects. I needed some way to +check all the documentation strings. My goal was simplicity + easy customization. +I achieved it. Here is example of usage of pydsc: + | ``import pydsc`` -| ``#every module that will be imported after pydsc will be checked`` -| ``#all errors will be printed to stdout`` -| ``import readline`` +| ``#every module that will be imported after pydsc will be checked`` +| ``#all errors will be printed to stdout`` +| ``import readline`` -------------- Spell checking @@ -42,7 +41,7 @@ Usage example ------------- -Basic usage is really simple, but sometimes there is a need to: +Basic usage is really simple, but sometimes there is a need to: * skip\\exclude some words from checking * redefine error messages destination, for example to print to some file * exclude(include) files from(to) spell checking process by file location @@ -62,14 +61,15 @@ http://sourceforge.net/project/showfiles.php?group_id=118209 - -.. _`pydsc`: ./pydsc.html + +.. _`pydsc`: ./pydsc.html .. _`PyEnchant`: http://pyenchant.sourceforge.net/ - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - End: + +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + End: + Modified: pygccxml_dev/docs/definition.rest =================================================================== --- pygccxml_dev/docs/definition.rest 2006-08-15 08:44:45 UTC (rev 404) +++ pygccxml_dev/docs/definition.rest 2006-08-15 10:41:00 UTC (rev 405) @@ -1,11 +1,11 @@ -"...The purpose of the `GCC-XML`_ extension is to generate an XML description -of a C++ program from GCC's internal representation. Since XML is easy to parse, -other development tools will be able to work with C++ programs without the -burden of a complicated C++ parser..." - --- Introduction to `GCC-XML`_ - -The purpose of `pygccxml`_ is to read a generated file and provide a simple -framework to navigate C++ declarations using Python classes. - -.. _`GCC-XML` : http://www.gccxml.org \ No newline at end of file +"...The purpose of the `GCC-XML`_ extension is to generate an XML description +of a C++ program from GCC's internal representation. Since XML is easy to parse, +other development tools will be able to work with C++ programs without the +burden of a complicated C++ parser..." + +-- Introduction to `GCC-XML`_ + +The purpose of `pygccxml`_ is to read a generated file and provide a simple +framework to navigate C++ declarations, using Python classes. + +.. _`GCC-XML` : http://www.gccxml.org Modified: pygccxml_dev/docs/design.rest =================================================================== --- pygccxml_dev/docs/design.rest 2006-08-15 08:44:45 UTC (rev 404) +++ pygccxml_dev/docs/design.rest 2006-08-15 10:41:00 UTC (rev 405) @@ -1,296 +1,295 @@ -=============== -pygccxml design -=============== - -.. contents:: Table of contents - ------------------------- -The view from 10000 fits ------------------------- - -`pygccxml`_ has 3 packages: - -* ``declarations`` package defines classes that describe C++ declarations and types - -* ``parser`` package defines classes that parse `GCC-XML`_ generared files. Also - it defines few classes that will help you to eliminate unnecessary parsing of - C++ source files. - -* ``utils`` package defines few functions, I found useful in the whole project. - -------------------------- -``declarations`` package -------------------------- - -Please take a look on `UML diagram`_. This `UML diagram`_ describes almost all -classes defined in the package and their relationship. ``declarations`` package -defines two hierarchies of class: - -1. types hierarchy - used to represent a C++ type - -2. declarations hierarchy - used to represent a C++ declaration. - - -Types hierarchy ---------------- - -Types hierarchy is used to represent an arbitrary type in C++. class ``type_t`` -is the base class. - -``type_traits`` -~~~~~~~~~~~~~~~ - -Are you aware of `boost::type_traits`_ library? The `boost::type_traits`_ -library has been developed by John Maddock, Steve Cleary and others. The -`boost::type_traits`_ library contains a set of very specific traits classes, -each of which encapsulate a single trait from the C++ type system; for example, -is a type a pointer or a reference type? Or does a type have a trivial constructor, -or a const-qualifier? - -`pygccxml`_ implements a lot of functionality from the library: - -* a lot of algorithms has been implemented - - + ``is_same`` - - + ``is_enum`` - - + ``is_void`` - - + ``is_const`` - - + ``is_array`` - - + ``is_pointer`` - - + ``is_volatile`` - - + ``is_integral`` - - + ``is_reference`` - - + ``is_arithmetic`` - - + ``is_convertible`` - - + ``is_fundamental`` - - + ``is_floating_point`` - - + ``is_base_and_derived`` - - + ``is_unary_operator`` - - + ``is_binary_operator`` - - + ``remove_cv`` - - + ``remove_const`` - - + ``remove_alias`` - - + ``remove_pointer`` - - + ``remove_volatile`` - - + ``remove_reference`` - - + ``has_trivial_copy`` - - + ``has_trivial_constructor`` - - + ``has_any_non_copyconstructor`` - - For a full list of implemented algorithms, please consult API documentation. - -* a lot of unit tests has been written base on unit tests from the - `boost::type_traits`_ library. - - -If you are going to build code generator, you will find ``type_traits`` very handy. - -Declarations hierarchy ----------------------- - -A declaration hierarchy is used to represent an arbitrary C++ declaration. -Basically, most of the classes defined in this package are just "set of properties". - -``declaration_t`` is the base class of the declaration hierarchy. Every declaration -has ``parent`` property. This property keeps a reference to the scope declaration -instance, in which this declaration is defined. - -The ``scopedef_t`` class derives from ``declaration_t``. This class is used to -say - "I may have other declarations inside". The "composite" design pattern is -used here. ``class_t`` and ``namespace_t`` declaration classes derive from the -``scopedef_t`` class. - ------------------- -``parser`` package ------------------- - -Please take a look on `parser package UML diagram`_ . Classes defined in this -package implement parsing and linking functionality. There are few kind of -classes defined by the package: - -* classes, that implements parsing algorithms of `GCC-XML`_ generated XML file - -* classes, that configure "parser" - -* cache - classes, those one will help you to eliminate unnecessary parsing - -* patchers - classes, that fix `GCC-XML`_ generated declarations. ( Yes, sometimes - GCC-XML generates wrong description of C++ declaration. ) - -Parser classes --------------- - -``source_reader_t`` - the only class that have an detailed knowledge about `GCC-XML`_. -It has only one responsibility: it calls `GCC-XML`_ with a source file specified -by user and creates declarations tree. The implementation of this class is split -to 2 classes: - -1. ``scanner_t`` - this class scans the "XML" file, generated by `GCC-XML`_ and - creates `pygccxml`_ declarations and types classes. After the xml file has - been processed declarations and type class instances keeps references to - each other using `GCC-XML`_ generated id's. - -2. ``linker_t`` - this class contains logic for replacing `GCC-XML`_ generated - ids with references to declarations or type class instances. - -Both those classes are implementation details and should not be used by user. -Performance note: ``scanner_t`` class uses Python ``xml.sax`` package in order -to parse XML. As a result, ``scanner_t`` class is able to parse even big XML files -pretty quick. - -``project_reader_t`` - think about this class as a linker. In most cases you work -with few source files. GCC-XML does not supports this mode of work. So, `pygccxml`_ -implements all functionality needed to parse few source files at once. -``project_reader_t`` implements 2 different algorithms, that solves the problem: - -1. ``project_reader_t`` creates temporal source file, that includes all the source - files. - -2. ``project_reader_t`` parse separately every source file, using ``source_reader_t`` - class and then joins the resulting declarations tree into single declarations - tree. - -Both approaches have different trades-off. The first approach does not allow you -to reuse information from already parsed source files. While the second one -allows you to setup cache. - -Parser configuration classes ----------------------------- - -``config_t`` - a class, that accumulates all the settings needed to invoke `GCC-XML`_: - - -``file_configuration_t`` - a class, that contains some data and description how -to treat the data. ``file_configuration_t`` can contain reference to the next types -of data: - -(1) path to C++ source file - -(2) path to `GCC-XML`_ generated XML file - -(3) path to C++ source file and path to `GCC-XML`_ generated XML file - - In this case, if XML file does not exists, it will be created. Next time - you will ask to parse the source file, the XML file will be used instead. - - Small tip: you can setup your makefile to delete XML files every time, - the relevant source file has changed. - -(4) Python string, that contains valid C++ code - -There are few functions, that will help you to construct ``file_configuration_t`` -object: - -* ``def create_source_fc( header )`` - - ``header`` contains path to C++ source file - -* ``def create_gccxml_fc( xml_file )`` - - ``xml_file`` contains path to `GCC-XML`_ generated XML file - -* ``def create_cached_source_fc( header, cached_source_file )`` - - - ``header`` contains path to C++ source file - - ``xml_file`` contains path to `GCC-XML`_ generated XML file - -* ``def create_text_fc( text )`` - - ``text`` - Python string, that contains valid C++ code - - -Cache classes -------------- - -There are few cache classes, that implements different cache strategies. - -1. ``file_configuration_t`` class, that keeps pass to C++ source file and path to - `GCC-XML`_ generated XML file. This class is not a cache class, but it also - allows you to save your time. - -2. ``file_cache_t`` class, will save all declarations from all files within single - binary file. - -3. ``directory_cache_t`` class will store one index file called "index.dat" which - is always read by the cache when the cache object is created. Each header file - will have its corresponding \*.cache file that stores the declarations found - in the header file. The index file is used to determine whether a \*.cache file - is still valid or not (by checking if one of the dependent files - (i.e. the header file itself and all included files) have been modified since - the last run). - -In some cases, ``directory_cache_t`` class gives much better performance, than -``file_cache_t``. Many thanks to Matthias Baas for its implemention. - -**Warning**: when `pygccxml`_ writes information to files, using cache classes, -it does not write any version information. It means, that when you upgrade -`pygccxml`_ you have to delete all your cache files. Otherwise you will get very -strange errors. For example: missing attribute. - - -Patchers --------- - -Well, `GCC-XML`_ has few bugs, that could not be fixed from it. For example -:: - - namespace ns1{ namespace ns2{ - enum fruit{ apple, orange }; - } } - - void fix_enum( ns1::ns2::fruit arg=ns1::ns2::apple ); - -`GCC-XML`_ will report the default value of ``arg`` as ``apple``. Obviously -this in an error. `pygccxml`_ knows how to fix this bug. - -This is not the only bug, that could be fixed, there are few of them. `pygccxml`_ -introduces few classes, that knows how to deal with specific bug. More over, those -bugs are fixed, only if I am 101% sure, that this is the right thing to do. - -------- -Summary -------- - -Thats all. I hope I was clear, at least I tried. Any way, `pygccxml`_ is an open -source project. You always can take a look on the source code. If you need more -information please read API documentation. - -.. _`pygccxml`: ./pygccxml.html -.. _`SourceForge`: http://sourceforge.net/index.php -.. _`Python`: http://www.python.org -.. _`GCC-XML`: http://www.gccxml.org -.. _`UML diagram` : ./declarations_uml.png -.. _`parser package UML diagram` : ./parser_uml.png -.. _`ReleaseForge` : http://releaseforge.sourceforge.net -.. _`boost::type_traits` : http://www.boost.org/libs/type_traits/index.html -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - End: \ No newline at end of file +=============== +pygccxml design +=============== + +.. contents:: Table of contents + +------------------------ +The view from 10000 fits +------------------------ + +`pygccxml`_ has 3 packages: + +* ``declarations`` package defines classes that describe C++ declarations and types + +* ``parser`` package defines classes that parse `GCC-XML`_ generated files. Also + it defines few classes that will help you to eliminate unnecessary parsing of + C++ source files. + +* ``utils`` package defines few functions, I found useful in the whole project. + +------------------------- +``declarations`` package +------------------------- + +Please take a look on `UML diagram`_. This `UML diagram`_ describes almost all +classes defined in the package and their relationship. ``declarations`` package +defines two hierarchies of class: + +1. types hierarchy - used to represent a C++ type + +2. declarations hierarchy - used to represent a C++ declaration + + +Types hierarchy +--------------- + +Types hierarchy is used to represent an arbitrary type in C++. class ``type_t`` +is the base class. + +``type_traits`` +~~~~~~~~~~~~~~~ + +Are you aware of `boost::type_traits`_ library? The `boost::type_traits`_ +library contains a set of very specific traits classes, each of which +encapsulate a single trait from the C++ type system; for example, is a type +a pointer or a reference? Or does a type have a trivial constructor, or a +const-qualifier? + +`pygccxml`_ implements a lot of functionality from the library: + +* a lot of algorithms were implemented + + + ``is_same`` + + + ``is_enum`` + + + ``is_void`` + + + ``is_const`` + + + ``is_array`` + + + ``is_pointer`` + + + ``is_volatile`` + + + ``is_integral`` + + + ``is_reference`` + + + ``is_arithmetic`` + + + ``is_convertible`` + + + ``is_fundamental`` + + + ``is_floating_point`` + + + ``is_base_and_derived`` + + + ``is_unary_operator`` + + + ``is_binary_operator`` + + + ``remove_cv`` + + + ``remove_const`` + + + ``remove_alias`` + + + ``remove_pointer`` + + + ``remove_volatile`` + + + ``remove_reference`` + + + ``has_trivial_copy`` + + + ``has_trivial_constructor`` + + + ``has_any_non_copyconstructor`` + + For a full list of implemented algorithms, please consult API documentation. + +* a lot of unit tests has been written base on unit tests from the + `boost::type_traits`_ library. + + +If you are going to build code generator, you will find ``type_traits`` very handy. + +Declarations hierarchy +---------------------- + +A declaration hierarchy is used to represent an arbitrary C++ declaration. +Basically, most of the classes defined in this package are just "set of properties". + +``declaration_t`` is the base class of the declaration hierarchy. Every declaration +has ``parent`` property. This property keeps a reference to the scope declaration +instance, in which this declaration is defined. + +The ``scopedef_t`` class derives from ``declaration_t``. This class is used to +say - "I may have other declarations inside". The "composite" design pattern is +used here. ``class_t`` and ``namespace_t`` declaration classes derive from the +``scopedef_t`` class. + +------------------ +``parser`` package +------------------ + +Please take a look on `parser package UML diagram`_ . Classes defined in this +package, implement parsing and linking functionality. There are few kind of +classes defined by the package: + +* classes, that implements parsing algorithms of `GCC-XML`_ generated XML file + +* parser configuration classes + +* cache - classes, those one will help you to eliminate unnecessary parsing + +* patchers - classes, that fix `GCC-XML`_ generated declarations. ( Yes, sometimes + GCC-XML generates wrong description of C++ declaration. ) + +Parser classes +-------------- + +``source_reader_t`` - the only class that have a detailed knowledge about `GCC-XML`_. +It has only one responsibility: it calls `GCC-XML`_ with a source file specified +by user and creates declarations tree. The implementation of this class is split +to 2 classes: + +1. ``scanner_t`` - this class scans the "XML" file, generated by `GCC-XML`_ and + creates `pygccxml`_ declarations and types classes. After the xml file has + been processed declarations and type class instances keeps references to + each other using `GCC-XML`_ generated ids. + +2. ``linker_t`` - this class contains logic for replacing `GCC-XML`_ generated + ids with references to declarations or type class instances. + +Both those classes are implementation details and should not be used by user. +Performance note: ``scanner_t`` class uses Python ``xml.sax`` package in order +to parse XML. As a result, ``scanner_t`` class is able to parse even big XML files +pretty quick. + +``project_reader_t`` - think about this class as a linker. In most cases you work +with few source files. GCC-XML does not supports this mode of work. So, `pygccxml`_ +implements all functionality needed to parse few source files at once. +``project_reader_t`` implements 2 different algorithms, that solves the problem: + +1. ``project_reader_t`` creates temporal source file, which includes all the source + files. + +2. ``project_reader_t`` parse separately every source file, using ``source_reader_t`` + class and then joins the resulting declarations tree into single declarations + tree. + +Both approaches have different trades-off. The first approach does not allow you +to reuse information from already parsed source files. While the second one +allows you to setup cache. + +Parser configuration classes +---------------------------- + +``config_t`` - a class, that accumulates all the settings needed to invoke `GCC-XML`_: + + +``file_configuration_t`` - a class, that contains some data and description how +to treat the data. ``file_configuration_t`` can contain reference to the next types +of data: + +(1) path to C++ source file + +(2) path to `GCC-XML`_ generated XML file + +(3) path to C++ source file and path to `GCC-XML`_ generated XML file + + In this case, if XML file does not exists, it will be created. Next time + you will ask to parse the source file, the XML file will be used instead. + + Small tip: you can setup your makefile to delete XML files every time, + the relevant source file has changed. + +(4) Python string, that contains valid C++ code + +There are few functions that will help you to construct ``file_configuration_t`` +object: + +* ``def create_source_fc( header )`` + + ``header`` contains path to C++ source file + +* ``def create_gccxml_fc( xml_file )`` + + ``xml_file`` contains path to `GCC-XML`_ generated XML file + +* ``def create_cached_source_fc( header, cached_source_file )`` + + - ``header`` contains path to C++ source file + - ``xml_file`` contains path to `GCC-XML`_ generated XML file + +* ``def create_text_fc( text )`` + + ``text`` - Python string, that contains valid C++ code + + +Cache classes +------------- + +There are few cache classes, which implements different cache strategies. + +1. ``file_configuration_t`` class, that keeps pass to C++ source file and path to + `GCC-XML`_ generated XML file. This class is not a cache class, but it also + allows you to save your time. + +2. ``file_cache_t`` class, will save all declarations from all files within single + binary file. + +3. ``directory_cache_t`` class will store one index file called "index.dat" which + is always read by the cache when the cache object is created. Each header file + will have its corresponding \*.cache file that stores the declarations found + in the header file. The index file is used to determine whether a \*.cache file + is still valid or not (by checking if one of the dependent files + (i.e. the header file itself and all included files) have been modified since + the last run). + +In some cases, ``directory_cache_t`` class gives much better performance, than +``file_cache_t``. Many thanks to Matthias Baas for its implementation. + +**Warning**: when `pygccxml`_ writes information to files, using cache classes, +it does not write any version information. It means, that when you upgrade +`pygccxml`_ you have to delete all your cache files. Otherwise you will get very +strange errors. For example: missing attribute. + + +Patchers +-------- + +Well, `GCC-XML`_ has few bugs, which could not be fixed from it. For example +:: + + namespace ns1{ namespace ns2{ + enum fruit{ apple, orange }; + } } + + void fix_enum( ns1::ns2::fruit arg=ns1::ns2::apple ); + +`GCC-XML`_ will report the default value of ``arg`` as ``apple``. Obviously +this in an error. `pygccxml`_ knows how to fix this bug. + +This is not the only bug, which could be fixed, there are few of them. `pygccxml`_ +introduces few classes, which knows how to deal with specific bug. More over, those +bugs are fixed, only if I am 101% sure, that this is the right thing to do. + +------- +Summary +------- + +Thats all. I hope I was clear, at least I tried. Any way, `pygccxml`_ is an open +source project. You always can take a look on the source code. If you need more +information please read API documentation. + +.. _`pygccxml`: ./pygccxml.html +.. _`SourceForge`: http://sourceforge.net/index.php +.. _`Python`: http://www.python.org +.. _`GCC-XML`: http://www.gccxml.org +.. _`UML diagram` : ./declarations_uml.png +.. _`parser package UML diagram` : ./parser_uml.png +.. _`ReleaseForge` : http://releaseforge.sourceforge.net +.. _`boost::type_traits` : http://www.boost.org/libs/type_traits/index.html +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + End: Modified: pygccxml_dev/docs/history/history.rest =================================================================== --- pygccxml_dev/docs/history/history.rest 2006-08-15 08:44:45 UTC (rev 404) +++ pygccxml_dev/docs/history/history.rest 2006-08-15 10:41:00 UTC (rev 405) @@ -1,289 +1,289 @@ -============================ -pygccxml development history -============================ - -.. contents:: Table of contents - ------------- -Contributors ------------- - -Thanks to all the people that have contributed patches, bug reports and suggestions: - - * My wife - Yulia - * John Pallister - * Matthias Baas - * Allen Bierbaum - * Georgiy Dernovoy - * Darren Garnier - ------ -0.8.1 ------ - -1. `pygccxml`_ has been ported to MacOS X. Many thanks to Darren Garnier! +============================ +pygccxml development history +============================ -2. New type traits have been added: - - * ``enum_traits`` - * ``class_traits`` - * ``class_declaration_traits`` - * ``is_std_string`` - * ``is_std_wstring`` - * ``remove_declarated`` - * ``has_public_less`` - * ``has_public_equal`` - * ``has_public_binary_operator`` - * ``smart_pointer_traits`` - * ``list_traits`` - * ``deque_traits`` - * ``queue_traits`` - * ``priority_queue`` - * ``vector_traits`` - * ``stack_traits`` - * ``map_traits`` - * ``multimap_traits`` - * ``hash_map_traits`` - * ``hash_multimap_traits`` - * ``set_traits`` - * ``hash_set_traits`` - * ``multiset_traits`` - * ``hash_multiset_traits`` - -3. ``enumeration_t`` class interface was changed. Enumeration values are kept - in a list, instead of a dictionary. ``get_name2value_dict`` will build for - you dictionary, where key is an enumeration name, and value is an enumeration - value. - - This has been done in order to provide stable order of enumeration values. - -4. Now you can pass operator symbol, as a name to query functions: +.. contents:: Table of contents - :: +------------ +Contributors +------------ - cls = global_namespace.class_( 'my_class' ) - op = cls.operator( '<' ) - #instead of - op = cls.operator( symbol='<' ) +Thanks to all the people that have contributed patches, bug reports and suggestions: -5. `pygccxml`_ improved a lot functionality related to providing feedback to user: - - * every package has its own logger - - * only important user messages are written to ``stdout`` - - * user messages are clear + * My wife - Yulia + * John Pallister + * Matthias Baas + * Allen Bierbaum + * Georgiy Dernovoy + * Darren Garnier -6. Support to Java native types has been added. +----- +0.8.1 +----- -7. It is possible to pass an arbitrary string as a parameter to `GCC-XML`_. +1. `pygccxml`_ has been ported to MacOS X. Many thanks to Darren Garnier! + +2. New type traits have been added: + + * ``enum_traits`` + * ``class_traits`` + * ``class_declaration_traits`` + * ``is_std_string`` + * ``is_std_wstring`` + * ``remove_declarated`` + * ``has_public_less`` + * ``has_public_equal`` + * ``has_public_binary_operator`` + * ``smart_pointer_traits`` + * ``list_traits`` + * ``deque_traits`` + * ``queue_traits`` + * ``priority_queue`` + * ``vector_traits`` + * ``stack_traits`` + * ``map_traits`` + * ``multimap_traits`` + * ``hash_map_traits`` + * ``hash_multimap_traits`` + * ``set_traits`` + * ``hash_set_traits`` + * ``multiset_traits`` + * ``hash_multiset_traits`` + +3. ``enumeration_t`` class interface was changed. Enumeration values are kept + in a list, instead of a dictionary. ``get_name2value_dict`` will build for + you dictionary, where key is an enumeration name, and value is an enumeration + value. + + This has been done in order to provide stable order of enumeration values. + +4. Now you can pass operator symbol, as a name to query functions: + + :: + + cls = global_namespace.class_( 'my_class' ) + op = cls.operator( '<' ) + #instead of + op = cls.operator( symbol='<' ) + +5. `pygccxml`_ improved a lot functionality related to providing feedback to user: + + * every package has its own logger + + * only important user messages are written to ``stdout`` + + * user messages are clear + +6. Support to Java native types has been added. + +7. It is possible to pass an arbitrary string as a parameter to `GCC-XML`_. + +8. Native java types has been added to fundamental types. + +9. Cache classes implementation was improved. + +10. Few bug were fixed. + +11. Documentation was improved. + + +----------- +Version 0.8 +----------- -8. Native java types has been added to fundamental types. +1. `pygccxml`_ now has power "select" interface. Read more about this cool feature + in tutorials. -9. Cache classes implementation was improved. +2. Improved support for template instantiations. `pygccxml`_ now take into + account demangled name of declarations. Please refer to documentation for + more explanantion. -10. Few bug were fixed. +3. ``dummy_type_t`` - new type in types hierarchy. This is a very useful class + for code generation projects. -11. Documentation was improved. +4. New function - ``get_global_namespace``. As you can guess, it will find and + return reference to global namespace. +5. New functionality in ``type_traits`` - ``has_public_assign``. This function + will return True, if class has public assign operator. ------------ -Version 0.8 ------------ - -1. `pygccxml`_ now has power "select" interface. Read more about this cool feature - in tutorials. - -2. Improved support for template instantiations. `pygccxml`_ now take into - account demangled name of declarations. Please refer to documentation for - more explanantion. - -3. ``dummy_type_t`` - new type in types hierarchy. This is a very useful class - for code generation projects. - -4. New function - ``get_global_namespace``. As you can guess, it will find and - return reference to global namespace. - -5. New functionality in ``type_traits`` - ``has_public_assign``. This function - will return True, if class has public assign operator. - -6. ``declarations.class_t`` has new property - ``aliases``. This is a list of - all class aliases. - -7. Bug fixes. - -8. Documentation has been updated/written/improved. - -------------- -Version 0.7.1 -------------- - -**Attention - this going to be last version that is tested with Python 2.3** - -1. New fundamental types has been added - - * complex float - - * complex double - - * complex long double - -2. **Attention - non backward compatible change** - - ``declarations.filtering.user_defined`` and ``declarations.filtering.by_location`` - implementation has been changed. In previous version of those functions, - ``decls`` list has been changed in place. This was wrong behaviour. Now, - those functions will return new list, that contains all desired declarations. - -3. Few new type traits has been added - - * *type_traits.has_destructor* - - * *type_traits.has_public_destructor* - - * *type_traits.has_public_constructor* - - * *type_traits.is_noncopyable* - -4. ``decl_printer_t`` class and ``print_declarations`` function have been added. - Now you can print in a nice way your declaration tree or part of it. - Thanks to Allen Bierbaum! - -5. New class ``declarations.decl_factory_t`` has been added. This is a default - factory for all declarations. From now all relevant parser classes takes as - input instance of this class or ``Null``. In case of ``Null`` instance of - ``declarations.decl_factory_t`` will be created. Using this class you can - easily extend functionality provided by built-in declarations. - -6. Sometimes, there is a need to find a declaration that match some criteria. - The was such functionality in `pygccxml`_, but it was too limited. This - release fix the situation. `pygccxml`_ adds a set of classes that will help - you to deal with this problem. - -7. New cache - ``parser.directory_cache_t`` has been implemented. - ``parser.directory_cache_t`` uses individual files stored in a dedicated - cache directory to store the cached contents. - Thanks to Matthias Baas! - -8. ``parser.file_cache_t`` has been improved a lot. - Thanks to Allen Bierbaum! - -9. New file configuration is available: "cached source file". - ``parser.project_reader_t`` class will check for existence of `GCC-XML`_ - generated file. If it does not exist it will create one. If it do exist, - then that file will be used by the parser. - -10. Few helper functions has been added in order to make construction of - configuration file to be as easy as possible: - - * ``parser.create_text_fc`` - creates file configuration, that contains text - * ``parser.create_source_fc`` - creates file configuration, that contains - reference to regular source file - * ``parser.create_gccxml_fc`` - creates file configuration, that contains - reference to `GCC-XML`_ generated file - * ``parser.create_cached_source_fc`` - creates file configuration, that - contains reference to 2 files: `GCC-XML`_ generated file and regular source - file - -11. Small bug fixes. - -12. Documentation. Allen Bierbaum and Matthias Baas contributed so much in this - area. Almost every public function/class has now documentation string. - -13. Logging functionality has been added. `pygccxml`_ creates new logger - "pygccxml". Now it is possible to see what `pygccxml`_ is doing right now. - -14. I am sure I forgot something. - - -------------- -Version 0.6.9 -------------- - -1. New functions: - - * *type_traits.is_void_pointer* - - * *type_traits.array_size* - - * *type_traits.array_item_type* - -2. Class *declarations.variable_t* has new property - *bit_fields* - -3. Now it is possible to specify "undefined" directives using - *parser.config_t* class. - -4. *patch* functionality has been introduced. `GCC-XML`_ generates wrong - default values for function arguments. *patch* functionality tries to fix - this. - -5. Small bug fixes - -------------- -Version 0.6.8 -------------- - -1. Small bug has been fixed. - -------------- -Version 0.6.7 -------------- - -1. New functions: - - * *type_traits.remove_pointer* - - * *type_traits.base_type* - - * *type_traits.is_convertible* - -2. A lot of small bug fixes. - -3. Few English mistakes have been fixed. - - .. attention:: - - There are 2 none backward compatible changes: - - * class with name **compaund_t** has been renamed to **compound_t** - - * word **pathes** has been replaced with **paths** - -4. There are new properties on - - * *declarations.declaration_t.top_parent* - - * *declarations.class_t.recursive_bases* returns all base classes of the - class - - * *declarations.class_t.recursive_derived* returns all derived classes of - the class - - * *member_calldef_t.access_type* - -5. New type has been introduced: *unknown_t*. There are use cases when - `GCC-XML`_ does not returns function return type. - -6. New implementation of *make_flatten* algorithm using generators. - By default old implementation will be used. - -7. *parser.file_configuration_t* interface has been changed. Now it is able - to keep: source file, text or `GCC-XML`_ generated file. If you are doing - something with code that is not changing you'd better use `GCC-XML`_ - generated file as content of the *parser.file_configuration_t*. Save your - time. - -8. There are some cases when `GCC-XML`_ reports *"restricted"*. In this case - `pygccxml`_ replaces *"restricted"* with *"volatile"*. - - -.. _`pygccxml`: ./../pygccxml.html -.. _`SourceForge`: http://sourceforge.net/index.php -.. _`GCC-XML`: http://www.gccxml.org -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - End: \ No newline at end of file +6. ``declarations.class_t`` has new property - ``aliases``. This is a list of + all class aliases. + +7. Bug fixes. + +8. Documentation has been updated/written/improved. + +------------- +Version 0.7.1 +------------- + +**Attention - this going to be last version that is tested with Python 2.3** + +1. New fundamental types has been added + + * complex float + + * complex double + + * complex long double + +2. **Attention - non backward compatible change** + + ``declarations.filtering.user_defined`` and ``declarations.filtering.by_location`` + implementation has been changed. In previous version of those functions, + ``decls`` list has been changed in place. This was wrong behavior. Now, + those functions will return new list, which contains all desired declarations. + +3. Few new type traits has been added + + * *type_traits.has_destructor* + + * *type_traits.has_public_destructor* + + * *type_traits.has_public_constructor* + + * *type_traits.is_noncopyable* + +4. ``decl_printer_t`` class and ``print_declarations`` function have been added. + Now you can print in a nice way your declaration tree or part of it. + Thanks to Allen Bierbaum! + +5. New class ``declarations.decl_factory_t`` has been added. This is a default + factory for all declarations. From now all relevant parser classes takes as + input instance of this class or ``Null``. In case of ``Null`` instance of + ``declarations.decl_factory_t`` will be created. Using this class you can + easily extend functionality provided by built-in declarations. + +6. Sometimes, there is a need to find a declaration that match some criteria. + The was such functionality in `pygccxml`_, but it was too limited. This + release fix the situation. `pygccxml`_ adds a set of classes that will help + you to deal with this problem. + +7. New cache - ``parser.directory_cache_t`` has been implemented. + ``parser.directory_cache_t`` uses individual files stored in a dedicated + cache directory to store the cached contents. + Thanks to Matthias Baas! + +8. ``parser.file_cache_t`` has been improved a lot. + Thanks to Allen Bierbaum! + +9. New file configuration is available: "cached source file". + ``parser.project_reader_t`` class will check for existence of `GCC-XML`_ + generated file. If it does not exist it will create one. If it do exist, + then the parser will use that file. + +10. Few helper functions has been added in order to make construction of + configuration file to be as easy as possible: + + * ``parser.create_text_fc`` - creates file configuration, that contains text + * ``parser.create_source_fc`` - creates file configuration, that contains + reference to regular source file + * ``parser.create_gccxml_fc`` - creates file configuration, that contains + reference to `GCC-XML`_ generated file + * ``parser.create_cached_source_fc`` - creates file configuration, that + contains reference to 2 files: `GCC-XML`_ generated file and regular source + file + +11. Small bug fixes. + +12. Documentation. Allen Bierbaum and Matthias Baas contributed so much in this + area. Almost every public function/class has now documentation string. + +13. Logging functionality has been added. `pygccxml`_ creates new logger + "pygccxml". Now it is possible to see what `pygccxml`_ is doing right now. + +14. I am sure I forgot something. + + +------------- +Version 0.6.9 +------------- + +1. New functions: + + * *type_traits.is_void_pointer* + + * *type_traits.array_size* + + * *type_traits.array_item_type* + +2. Class *declarations.variable_t* has new property - *bit_fields* + +3. Now it is possible to specify "undefined" directives using + *parser.config_t* class. + +4. *patch* functionality has been introduced. `GCC-XML`_ generates wrong + default values for function arguments. *patch* functionality tries to fix + this. + +5. Small bug fixes + +------------- +Version 0.6.8 +------------- + +1. Small bug has been fixed. + +------------- +Version 0.6.7 +------------- + +1. New functions: + + * *type_traits.remove_pointer* + + * *type_traits.base_type* + + * *type_traits.is_convertible* + +2. A lot of small bug fixes. + +3. Few English mistakes have been fixed. + + .. attention:: + + There are 2 none backward compatible changes: + + * class with name **compaund_t** has been renamed to **compound_t** + + * word **pathes** has been replaced with **paths** + +4. There are new properties on + + * *declarations.declaration_t.top_parent* + + * *declarations.class_t.recursive_bases* returns all base classes of the + class + + * *declarations.class_t.recursive_derived* returns all derived classes of + the class + + * *member_calldef_t.access_type* + +5. New type has been introduced: *unknown_t*. There are use cases when + `GCC-XML`_ does not returns function return type. + +6. New implementation of *make_flatten* algorithm using generators. + By default old implementation will be used. + +7. *parser.file_configuration_t* interface has been changed. Now it is able + to keep: source file, text or `GCC-XML`_ generated file. If you are doing + something with code that is not changing you'd better use `GCC-XML`_ + generated file as content of the *parser.file_configuration_t*. Save your + time. + +8. There are some cases when `GCC-XML`_ reports *"restricted"*. In this case + `pygccxml`_ replaces *"restricted"* with *"volatile"*. + + +.. _`pygccxml`: ./../pygccxml.html +.. _`SourceForge`: http://sourceforge.net/index.php +.. _`GCC-XML`: http://www.gccxml.org +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + End: Modified: pygccxml_dev/docs/pygccxml.rest =================================================================== --- pygccxml_dev/docs/pygccxml.rest 2006-08-15 08:44:45 UTC (rev 404) +++ pygccxml_dev/docs/pygccxml.rest 2006-08-15 10:41:00 UTC (rev 405) @@ -1,144 +1,144 @@ -====================== -pygccxml documentation -====================== - -.. contents:: Table of contents - -.. meta:: - :description: C++ declarations parser - :keywords: C++, source code, header file, parser, UML, free, declarations - , XML, class hierarchy, analize, AST, code generator, - , синтаксический анализатор, исходный текст, исходная программа - , описание, определение, иерархия классов, генератор кода - ------------- -Introduction ------------- -.. include:: ./definition.rest - ----------------------- -What can I do with it? ----------------------- -Using `pygccxml`_ you can: - -* parse C++ source code -* build a code generator - - + `Py++`_ is heavily based on `pygccxml`_ - + generate `WSDL`_ file from sources - + ... - -* create UML diagrams -* build code analyzer -* ... - -------------- -Usage example -------------- -First of all let's see a small and simple `example`_. This example prints all -declarations, reported by `GCC-XML`_ after parsing `core_class_hierarchy.hpp`_ -file. Also it prints all clasess, and for every class it will print it's base -and derived classes. It was simple task, right? If you are still curious how it -looks "in the real life", I mean how xml file is look like, you may look at the -`original XML file`_ generated by `GCC-XML`_. - -.. _`original XML file` : ./example/core_class_hierarchy.hpp.xml -.. _`core_class_hierarchy.hpp` : ./example/core_class_hierarchy.hpp -.. _`example` : ./example/example.py - --------- -Features --------- - -Caching -------- - -Consider the following situation: you have to parse the same set of files every -day. There are 2 possibile ways to complete the task: - -* create a header file that includes all files you need to parse - -* parse each file separately and then join the results - -The difference between these approaches is the caching algorithm used in the -second case. `pygccxml`_ supports both of them. - -Type traits ------------ - -`pygccxml`_ provides a lot of functionality to analize C++ types and relationship -between them. For more information please refer to `design`__ document or API -documentation. Just a few names of algorithms: - -* ``is_convertible( from, to )`` - - returns ``True`` if there is a conversion from type ``from`` to type ``to``, - otherwise ``False`` - -* ``is_unary_operator( oper )`` - - returns ``True`` if ``oper`` describes unary operator - -.. __: ./design.html - - -Query interface ---------------- - -`pygccxml`_ provides simple and powerful API to query declarations tree. I will -try to give small example, that will prove my point. If you want to know more -about provided API please read `query interface`__ document or API documentation. -Examples: -:: - - #global_ns is the reference to declarations that describes C++ namespace. - #In our case, instance of that declarations describes global ( :: ) namespace. - global_ns.free_functions( "do_smth", return_type='void', arg_types=[None,'int'] ) - - -Small explanation. Assume that ``None`` means "any type". Now the code is pretty -readable: -:: - - select all free functions - where - name equal to "do_smth" - return type is void - function has two arguments - second argument type is int - -.. __: ./query_interface.html - -------- -License -------- - -`Boost Software License`_. - ------------------ -Test environments ------------------ - -`pygccxml`_ comes with comprehensive unit tests. It is running on Windows XP and -`Ubuntu`_. I am using `Python`_ 2.4 and `GCC-XML`_ CVS. -Right now I am running more then 100 tests. They test almost every piece of code. -Also I have performance tests. Most of the time I am using "white box" testing -strategy. - -.. _`WSDL`: http://www.w3.org/TR/wsdl -.. _`Py++`: ./../pyplusplus/pyplusplus.html -.. _`pygccxml`: ./pygccxml.html -.. _`SourceForge`: http://sourceforge.net/index.php -.. _`Docutils`: http://docutils.sourceforge.net -.. _`Python`: http://www.python.org -.. _`GCC-XML`: http://www.gccxml.org -.. _`Boost Software License`: http://boost.org/more/license_info.html -.. _`Ubuntu`: http://www.ubuntu.com/ -.. _`boost::type_traits` : http://www.boost.org/libs/type_traits/index.html -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - End: \ No newline at end of file +====================== +pygccxml documentation +====================== + +.. contents:: Table of contents + +.. meta:: + :description: C++ declarations parser + :keywords: C++, source code, header file, parser, UML, free, declarations + , XML, class hierarchy, analyze, AST, code generator, + , синтаксический анализатор, исходный текст, исходная программа + , описание, определение, иерархия классов, генератор кода + +------------ +Introduction +------------ +.. include:: ./definition.rest + +---------------------- +What can I do with it? +---------------------- +Using `pygccxml`_ you can: + +* parse C++ source code +* build a code generator + + + `Py++`_ is heavily based on `pygccxml`_ + + generate `WSDL`_ file from sources + + ... + +* create UML diagrams +* build code analyzer +* ... + +------------- +Usage example +------------- +First of all let's see a small and simple `example`_. This example prints all +declarations, reported by `GCC-XML`_ after parsing `core_class_hierarchy.hpp`_ +file. Also it prints all classes, and for every class it will print it's base +and derived classes. It was simple task, right? If you are still curious how it +looks "in the real life", I mean how xml file is look like, you may look at the +`original XML file`_ generated by `GCC-XML`_. + +.. _`original XML file` : ./example/core_class_hierarchy.hpp.xml +.. _`core_class_hierarchy.hpp` : ./example/core_class_hierarchy.hpp +.. _`example` : ./example/example.py + +-------- +Features +-------- + +Caching +------- + +Consider the following situation: you have to parse the same set of files every +day. There are 2 possible ways to complete the task: + +* create a header file that includes all files you need to parse + +* parse each file separately and then join the results + +The difference between these approaches is the caching algorithm used in the +second case. `pygccxml`_ supports both of them. + +Type traits +----------- + +`pygccxml`_ provides a lot of functionality to analyze C++ types and relationship +between them. For more information please refer to `design`__ document or API +documentation. Just a few names of algorithms: + +* ``is_convertible( from, to )`` + + returns ``True`` if there is a conversion from type ``from`` to type ``to``, + otherwise ``False`` + +* ``is_unary_operator( oper )`` + + returns ``True`` if ``oper`` describes unary operator + +.. __: ./design.html + + +Query interface +--------------- + +`pygccxml`_ provides simple and powerful API to query declarations tree. I will +try to give small example, that will prove my point. If you want to know more +about provided API please read `query interface`__ document or API documentation. +Examples: +:: + + #global_ns is the reference to declarations that describes C++ namespace. + #In our case, instance of that declarations describes global ( :: ) namespace. + global_ns.free_functions( "do_smth", return_type='void', arg_types=[None,'int'] ) + + +Small explanation. Assume that ``None`` means "any type". Now the code is pretty +readable: +:: + + select all free functions + where + name equal to "do_smth" + return type is void + function has two arguments + second argument type is int + +.. __: ./query_interface.html + +------- +License +------- + +`Boost Software License`_. + +----------------- +Test environments +----------------- + +`pygccxml`_ comes with comprehensive unit tests. It is running on Windows XP and +`Ubuntu`_. I am using `Python`_ 2.4 and `GCC-XML`_ CVS. +Right now I am running more then 150 tests. They test almost every piece of code. +Also I have performance tests. Most of the time I am using "white box" testing +strategy. + +.. _`WSDL`: http://www.w3.org/TR/wsdl +.. _`Py++`: ./../pyplusplus/pyplusplus.html +.. _`pygccxml`: ./pygccxml.html +.. _`SourceForge`: http://sourceforge.net/index.php +.. _`Docutils`: http://docutils.sourceforge.net +.. _`Python`: http://www.python.org +.. _`GCC-XML`: http://www.gccxml.org +.. _`Boost Software License`: http://boost.org/more/license_info.html +.. _`Ubuntu`: http://www.ubuntu.com/ +.. _`boost::type_traits` : http://www.boost.org/libs/type_traits/index.html +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + End: Modified: pygccxml_dev/docs/query_interface.rest =================================================================== --- pygccxml_dev/docs/query_interface.rest 2006-08-15 08:44:45 UTC (rev 404) +++ pygccxml_dev/docs/query_interface.rest 2006-08-15 10:41:00 UTC (rev 405) @@ -1,287 +1,287 @@ -=============================== -pygccxml.declarations query API -=============================== - -.. contents:: Table of contents - ------------- -Introduction ------------- -You parsed the source files. Now you have to do some real work with the extracted -information, right? `pygccxml`_ provides very powerful and simple interface to -query about extracted declarations. - -Just an example. I want to select all member functions, that have 2 arguments. -I don't care about first argument type, but I do want second argument type to be -a reference to an integer. More over, I want those functions names to end with -"impl" string and they should be protected or private. -:: - - #global_ns is the reference to an instance of namespace_t object, that - #represents global namespace - query = declarations.custom_matcher_t( lambda mem_fun: mem_fun.name.endswith( 'impl' ) - query = query & ~declarations.access_type_matcher_t( 'public' ) - global_ns.member_functions( function=query, arg_types=[None, 'int &'] ) - -The example is complex, but still readable. In many cases you will find your -self looking for one or many declarations using one or two properties of that -declaration(s). For example: -:: - - global_ns.namespaces( 'details' ) - -This call will return all namespaces with name 'details'. - --------------- -User interface --------------- - -As you already know, ``pygccxml.declarations`` package defines next classes: - -* ``scopedef_t`` - base class for all classes, that can contain other declarations - -* ``namespace_t`` - derives from ``scopedef_t`` class, represents C++ namespace - -* ``class_t`` - derives from ``scopedef_t`` class, represents C++ class/struct/union. - -So, the query methods defined on ``scopedef_t`` class could be used on instances -of ``class_t`` and ``namespace_t`` classes. I am sure you knew that. - -Usage examples --------------- - -I will explain the usage of ``member_function`` and ``member_functions`` methods. -The usage of other methods is very similar to them. Here is definition of those -methods: -:: - - def member_function( self, - ... [truncated message content] |
From: <rom...@us...> - 2006-10-18 14:53:52
|
Revision: 668 http://svn.sourceforge.net/pygccxml/?rev=668&view=rev Author: roman_yakovenko Date: 2006-10-18 07:53:36 -0700 (Wed, 18 Oct 2006) Log Message: ----------- changing version in history.rest files Modified Paths: -------------- pygccxml_dev/docs/history/history.rest pyplusplus_dev/docs/history/history.rest Modified: pygccxml_dev/docs/history/history.rest =================================================================== --- pygccxml_dev/docs/history/history.rest 2006-10-18 14:46:11 UTC (rev 667) +++ pygccxml_dev/docs/history/history.rest 2006-10-18 14:53:36 UTC (rev 668) @@ -19,7 +19,7 @@ * Gottfried Ganssauge ------------- -Version 0.8.* +Version 0.8.2 ------------- 1. Few small bug fix and unit tests have been introduced on 64 Bit platform. Modified: pyplusplus_dev/docs/history/history.rest =================================================================== --- pyplusplus_dev/docs/history/history.rest 2006-10-18 14:46:11 UTC (rev 667) +++ pyplusplus_dev/docs/history/history.rest 2006-10-18 14:53:36 UTC (rev 668) @@ -33,7 +33,7 @@ ------------- -Version 0.8.* +Version 0.8.2 ------------- 1. Interface changes: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-10-18 21:23:28
|
Revision: 672 http://svn.sourceforge.net/pygccxml/?rev=672&view=rev Author: roman_yakovenko Date: 2006-10-18 14:23:08 -0700 (Wed, 18 Oct 2006) Log Message: ----------- changing the way project works with manifest files Modified Paths: -------------- developer_scripts/clean_source_dir.py Added Paths: ----------- developer_scripts/create_manifests.py pydsc_dev/MANIFEST.readme pygccxml_dev/MANIFEST.readme pyplusplus_dev/MANIFEST.readme Removed Paths: ------------- pydsc_dev/MANIFEST.in pygccxml_dev/MANIFEST.in pyplusplus_dev/MANIFEST.in Modified: developer_scripts/clean_source_dir.py =================================================================== --- developer_scripts/clean_source_dir.py 2006-10-18 21:22:05 UTC (rev 671) +++ developer_scripts/clean_source_dir.py 2006-10-18 21:23:08 UTC (rev 672) @@ -8,7 +8,7 @@ to_be_deleted_file_exts = [ '*.pyc' - , '*.py~' + , '*.py~' , '*.so' , '*.os' , '*.cpp~' Added: developer_scripts/create_manifests.py =================================================================== --- developer_scripts/create_manifests.py (rev 0) +++ developer_scripts/create_manifests.py 2006-10-18 21:23:08 UTC (rev 672) @@ -0,0 +1,85 @@ +import os +from file_system_iter import files_iterator, folders_iterator +from clean_source_dir import to_be_deleted_file_exts, to_be_deleted_files + +CURRENT_DIR = os.path.abspath( os.getcwd() ) +if 'developer_scripts' != os.path.split( CURRENT_DIR )[1]: + raise RuntimeError( "This script should be run from developer_scripts directory!" ) + +class manifest_creator_t: + def __init__( self, root ): + self.root = root + + def include_dir( self, dir_path ): + raise NotImplementedError() + + def __proceed_files( self, dir_path, manifest ): + for file_path in files_iterator( dir_path, is_recursive=False ): + file_name = os.path.split( file_path )[1] + if file_name in to_be_deleted_files: + continue + if file_name in [ 'www_configuration.py', 'MANIFEST.readme' ]: + continue + file_ext = os.path.splitext( file_name )[1] + if file_ext in to_be_deleted_file_exts: + continue + if file_ext.endswith( '~' ): + continue + manifest.write( file_path[ len( self.root ) + 1 : ] + os.linesep ) + + def __call__( self ): + manifest = file( os.path.join( self.root, 'MANIFEST' ), 'w+' ) + self.__proceed_files( self.root, manifest ) + for dir_path in folders_iterator( self.root ): + dir_name = os.path.split( dir_path )[1] + if '.svn' in dir_path: + continue + if dir_path == os.path.join( self.root, 'dist' ): + continue #exlude directory built by distutils + if not self.include_dir( dir_path ): + continue + self.__proceed_files( dir_path, manifest ) + manifest.close() + +class pydsc_creator_t( manifest_creator_t ): + def __init__( self ): + global CURRENT_DIR + root = os.path.normpath( os.path.join( CURRENT_DIR, '..', 'pydsc_dev' ) ) + manifest_creator_t.__init__( self, root ) + + def include_dir( self, dir_path ): + return True + +class pygccxml_creator_t( manifest_creator_t ): + def __init__( self ): + global CURRENT_DIR + root = os.path.normpath( os.path.join( CURRENT_DIR, '..', 'pygccxml_dev' ) ) + manifest_creator_t.__init__( self, root ) + + def include_dir( self, dir_path ): + return os.path.split( dir_path )[1] not in [ 'temp' ] + +class pyplusplus_creator_t( manifest_creator_t ): + def __init__( self ): + global CURRENT_DIR + root = os.path.normpath( os.path.join( CURRENT_DIR, '..', 'pyplusplus_dev' ) ) + manifest_creator_t.__init__( self, root ) + + def include_dir( self, dir_path ): + if os.path.split( dir_path )[1] in [ 'temp', 'osdc2006' ]: + return False + if 'pyboost' in dir_path and 'generated' in dir_path: + return False + return True + +if __name__ == '__main__': + print 'creating pydsc manifest' + pydsc_creator_t()() + print 'creating pydsc manifest - done' + print 'creating pygccxml manifest' + pygccxml_creator_t()() + print 'creating pygccxml manifest - done' + print 'creating Py++ manifest' + pyplusplus_creator_t()() + print 'creating Py++ manifest - done' + \ No newline at end of file Deleted: pydsc_dev/MANIFEST.in =================================================================== --- pydsc_dev/MANIFEST.in 2006-10-18 21:22:05 UTC (rev 671) +++ pydsc_dev/MANIFEST.in 2006-10-18 21:23:08 UTC (rev 672) @@ -1,8 +0,0 @@ -include LICENSE_1_0.txt -include MANIFEST.in -include unittests/*.py -include unittests/do_not_check/*.py -recursive-include docs/apidocs *.css -recursive-include docs/apidocs *.html -include docs/*.rest -prune docs/*/.svn Added: pydsc_dev/MANIFEST.readme =================================================================== --- pydsc_dev/MANIFEST.readme (rev 0) +++ pydsc_dev/MANIFEST.readme 2006-10-18 21:23:08 UTC (rev 672) @@ -0,0 +1 @@ +In order to create MANIFEST file you should run create_manifests.py script. \ No newline at end of file Deleted: pygccxml_dev/MANIFEST.in =================================================================== --- pygccxml_dev/MANIFEST.in 2006-10-18 21:22:05 UTC (rev 671) +++ pygccxml_dev/MANIFEST.in 2006-10-18 21:23:08 UTC (rev 672) @@ -1,13 +0,0 @@ -include LICENSE_1_0.txt -include MANIFEST.in -include unittests/*.py -include unittests/data/*.hpp -include unittests/data/*.xml -include unittests/data/*.txt -recursive-include docs/apidocs *.css -recursive-include docs/apidocs *.html -include docs/*.rest -include docs/*.png -include docs/example/* -include docs/history/* -prune docs/*/.svn \ No newline at end of file Added: pygccxml_dev/MANIFEST.readme =================================================================== --- pygccxml_dev/MANIFEST.readme (rev 0) +++ pygccxml_dev/MANIFEST.readme 2006-10-18 21:23:08 UTC (rev 672) @@ -0,0 +1 @@ +In order to create MANIFEST file you should run create_manifests.py script. \ No newline at end of file Deleted: pyplusplus_dev/MANIFEST.in =================================================================== --- pyplusplus_dev/MANIFEST.in 2006-10-18 21:22:05 UTC (rev 671) +++ pyplusplus_dev/MANIFEST.in 2006-10-18 21:23:08 UTC (rev 672) @@ -1,54 +0,0 @@ -include LICENSE_1_0.txt -include MANIFEST.in -include unittests/*.py -include unittests/data/*.hpp -include unittests/data/*.cpp -recursive-include docs/apidocs *.css -recursive-include docs/apidocs *.html -include docs/*.rest -include docs/*.png -include docs/*.html -include docs/comparisons/* -recursive-include docs/examples * -include docs/history/* -include docs/logos/* -include docs/tutorials/* -prune docs/*/.svn -prune docs/*/*/.svn - -prune examples/custom_code_creator/*/.svn -prune examples/custom_code_creator/generated/*/.svn -prune examples/custom_code_creator/unittests/*/.svn -prune examples/pyboost_dev/*/.svn -prune examples/pyboost_dev/dev/*/.svn -prune examples/pyboost_dev/dev/boost_random/*/.svn -prune examples/pyboost_dev/dev/crc/*/.svn -prune examples/pyboost_dev/dev/date_time/*/.svn -prune examples/pyboost_dev/dev/date_time/include/*/.svn -prune examples/pyboost_dev/dev/rational/*/.svn -prune examples/pyboost_dev/pyboost/*/.svn -prune examples/pyboost_dev/pyboost/boost_random/*/.svn -prune examples/pyboost_dev/pyboost/crc/*/.svn -prune examples/pyboost_dev/pyboost/date_time/*/.svn -prune examples/pyboost_dev/pyboost/rational/*/.svn -prune examples/pyboost_dev/unittestst/boost_random/*/.svn -prune examples/pyboost_dev/unittestst/crc/*/.svn -prune examples/pyboost_dev/unittestst/date_time/*/.svn -prune examples/pyboost_dev/unittestst/date_time/include/*/.svn -prune examples/pyboost_dev/unittestst/rational/*/.svn -prune examples/pyeasybmp_dev/*/.svn -prune examples/pyeasybmp_dev/pyeasybmp/*/.svn -prune examples/pyeasybmp_dev/pyeasybmp/generated/*/.svn -prune examples/pyeasybmp_dev/unittests/*/.svn - -prune examples/indexing_suite_v2/*/.svn -prune examples/indexing_suite_v2/docs/*/.svn -prune examples/indexing_suite_v2/docs/indexing_suite_v2_files/*/.svn -prune examples/indexing_suite_v2/indexing/*/.svn -prune examples/indexing_suite_v2/src/*/.svn -prune examples/indexing_suite_v2/src/indexing/*/.svn -prune examples/indexing_suite_v2/unittests/*/.svn - - -recursive-include examples * -recursive-include contrib *.py *.txt Added: pyplusplus_dev/MANIFEST.readme =================================================================== --- pyplusplus_dev/MANIFEST.readme (rev 0) +++ pyplusplus_dev/MANIFEST.readme 2006-10-18 21:23:08 UTC (rev 672) @@ -0,0 +1 @@ +In order to create MANIFEST file you should run create_manifests.py script. \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-10-19 06:52:53
|
Revision: 675 http://svn.sourceforge.net/pygccxml/?rev=675&view=rev Author: roman_yakovenko Date: 2006-10-18 23:52:42 -0700 (Wed, 18 Oct 2006) Log Message: ----------- incrementing version numbers Modified Paths: -------------- pygccxml_dev/setup.py pyplusplus_dev/setup.py Modified: pygccxml_dev/setup.py =================================================================== --- pygccxml_dev/setup.py 2006-10-19 06:08:04 UTC (rev 674) +++ pygccxml_dev/setup.py 2006-10-19 06:52:42 UTC (rev 675) @@ -53,7 +53,7 @@ setup( name = "pygccxml", - version = "0.8.2", + version = "0.8.3", description = "GCC-XML generated file reader", author = "Roman Yakovenko", author_email = "rom...@gm...", Modified: pyplusplus_dev/setup.py =================================================================== --- pyplusplus_dev/setup.py 2006-10-19 06:08:04 UTC (rev 674) +++ pyplusplus_dev/setup.py 2006-10-19 06:52:42 UTC (rev 675) @@ -91,7 +91,7 @@ setup( name = "Py++", - version = "0.8.2", + version = "0.8.3", description="Py++ is a framework of components for creating C++ code generator for Boost.Python library", author="Roman Yakovenko", author_email="rom...@gm...", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-10-19 06:53:32
|
Revision: 676 http://svn.sourceforge.net/pygccxml/?rev=676&view=rev Author: roman_yakovenko Date: 2006-10-18 23:53:22 -0700 (Wed, 18 Oct 2006) Log Message: ----------- fixing few spelling errors Modified Paths: -------------- pygccxml_dev/docs/history/history.rest pyplusplus_dev/docs/history/history.rest Modified: pygccxml_dev/docs/history/history.rest =================================================================== --- pygccxml_dev/docs/history/history.rest 2006-10-19 06:52:42 UTC (rev 675) +++ pygccxml_dev/docs/history/history.rest 2006-10-19 06:53:22 UTC (rev 676) @@ -22,12 +22,12 @@ Version 0.8.2 ------------- -1. Few small bug fix and unit tests have been introduced on 64 Bit platform. +1. Few small bug fix and unit tests have been introduced on 64 Bit platforms. Many thanks to Gottfried Ganssauge! He also help me to discover and fix some important bug in ``type_traits.__remove_alias`` function, by introducing small example that reproduced the error. -2. Huge speed improvment has been achieved( x10 ). Allen Bierbaum suggested to +2. Huge speed improvement has been achieved (x10). Allen Bierbaum suggested to save and reuse results of different `pygccxml`_ algorithms: * ``declarations.remove_alias`` @@ -50,7 +50,7 @@ * ``declarations.variable_t.access_type`` property was added. -4. New type traits have been added: +4. New type traits have been added: * ``is_same_function`` Modified: pyplusplus_dev/docs/history/history.rest =================================================================== --- pyplusplus_dev/docs/history/history.rest 2006-10-19 06:52:42 UTC (rev 675) +++ pyplusplus_dev/docs/history/history.rest 2006-10-19 06:53:22 UTC (rev 676) @@ -42,29 +42,29 @@ argument ``create_castinig_constructor`` was removed and deprecation warning was introduced. -2. Performance improvments. In some cases you can get x10 performance boost. - Many thanks to Allen Bierbaum! This was achieved by saving and reusing results - of different `pygccxml`_ algorithms and type traits functions. +2. Performance improvements. In some cases you can get x10 performance boost. + Many thanks to Allen Bierbaum! Saving and reusing results of different + `pygccxml`_ algorithms and type traits functions achieved this. -3. Convinience API for registering exception translator was introduced. +3. Convenience API for registering exception translator was introduced. 4. `Py++`_ can generate code that uses ``BOOST_PYTHON_FUNCTION_OVERLOADS`` and ``BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS`` macros. 5. Treatment to previously generated and no more in-use files was added. By default `Py++`_ will delete these files, but of course you can redefine this - behaviour. + behavior. 6. Generated code changes: * ``default_call_policies`` should not be generated any more. * For functions that have ``return_value_policy< return_opaque_pointer >`` - call policy, `Py++`_ will automaticly generate ``BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID`` + call policy, `Py++`_ will automatically generate ``BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID`` macro. Thank you very much for Gottfried Ganssauge for this idea. 7. Support for Boost.Python properties was introduced. `Py++`_ implements small - algorithm, that will automaticly discover properties, base on naming conventions. + algorithm, that will automatically discover properties, base on naming conventions. 8. ``decl_wrappers.class_t`` has new function: ``is_wrapper_needed``. This function explains why `Py++`_ creates class wrapper for exposed class. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-12-01 21:19:09
|
Revision: 773 http://svn.sourceforge.net/pygccxml/?rev=773&view=rev Author: roman_yakovenko Date: 2006-12-01 13:19:09 -0800 (Fri, 01 Dec 2006) Log Message: ----------- fixing dependency manager to not report missing declarations for implementation details of a class Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/calldef.py pygccxml_dev/pygccxml/declarations/class_declaration.py pygccxml_dev/pygccxml/declarations/declaration.py pygccxml_dev/pygccxml/declarations/enumeration.py pygccxml_dev/pygccxml/declarations/namespace.py pygccxml_dev/pygccxml/declarations/typedef.py pygccxml_dev/pygccxml/declarations/variable.py pyplusplus_dev/pyplusplus/module_creator/dependencies_manager.py Modified: pygccxml_dev/pygccxml/declarations/calldef.py =================================================================== --- pygccxml_dev/pygccxml/declarations/calldef.py 2006-12-01 19:47:39 UTC (rev 772) +++ pygccxml_dev/pygccxml/declarations/calldef.py 2006-12-01 21:19:09 UTC (rev 773) @@ -271,7 +271,7 @@ demangled_name = property( _get_demangled_name , doc="returns function demangled name. It can help you to deal with function template instantiations") - def i_depend_on_them( self ): + def i_depend_on_them( self, recursive=True ): report_dependency = lambda x: dependencies.dependency_info_t( self, x ) answer = [] map( lambda arg: answer.append( report_dependency( arg.type ) ) Modified: pygccxml_dev/pygccxml/declarations/class_declaration.py =================================================================== --- pygccxml_dev/pygccxml/declarations/class_declaration.py 2006-12-01 19:47:39 UTC (rev 772) +++ pygccxml_dev/pygccxml/declarations/class_declaration.py 2006-12-01 21:19:09 UTC (rev 773) @@ -85,7 +85,7 @@ """implementation details""" return [] - def i_depend_on_them( self ): + def i_depend_on_them( self, recursive=True ): return [] class class_t( scopedef.scopedef_t ): @@ -337,21 +337,22 @@ def __find_out_member_dependencies( self, access_type ): members = self.get_members( access_type ) answer = [] - map( lambda mem: answer.extend( mem.i_depend_on_them() ), members ) + map( lambda mem: answer.extend( mem.i_depend_on_them(recursive=True) ), members ) member_ids = set( map( lambda m: id( m ), members ) ) for dependency in answer: if id( dependency.declaration ) in member_ids: dependency.access_type = access_type return answer - def i_depend_on_them( self ): + def i_depend_on_them( self, recursive=True ): report_dependency = lambda *args: dependencies.dependency_info_t( self, *args ) answer = [] map( lambda base: answer.append( report_dependency( base.related_class, base.access_type ) ) , self.bases ) - map( lambda access_type: answer.extend( self.__find_out_member_dependencies( access_type ) ) - , ACCESS_TYPES.ALL ) + if recursive: + map( lambda access_type: answer.extend( self.__find_out_member_dependencies( access_type ) ) + , ACCESS_TYPES.ALL ) return answer Modified: pygccxml_dev/pygccxml/declarations/declaration.py =================================================================== --- pygccxml_dev/pygccxml/declarations/declaration.py 2006-12-01 19:47:39 UTC (rev 772) +++ pygccxml_dev/pygccxml/declarations/declaration.py 2006-12-01 21:19:09 UTC (rev 773) @@ -245,7 +245,7 @@ """ return self._cache - def i_depend_on_them( self ): + def i_depend_on_them( self, recursive=True ): #this method should return list of all types, declarations it depends on print self raise NotImplementedError() Modified: pygccxml_dev/pygccxml/declarations/enumeration.py =================================================================== --- pygccxml_dev/pygccxml/declarations/enumeration.py 2006-12-01 19:47:39 UTC (rev 772) +++ pygccxml_dev/pygccxml/declarations/enumeration.py 2006-12-01 21:19:09 UTC (rev 773) @@ -114,5 +114,5 @@ x[val] = num return x - def i_depend_on_them( self ): + def i_depend_on_them( self, recursive=True ): return [] Modified: pygccxml_dev/pygccxml/declarations/namespace.py =================================================================== --- pygccxml_dev/pygccxml/declarations/namespace.py 2006-12-01 19:47:39 UTC (rev 772) +++ pygccxml_dev/pygccxml/declarations/namespace.py 2006-12-01 21:19:09 UTC (rev 773) @@ -135,7 +135,8 @@ , recursive=recursive , allow_empty=allow_empty) - def i_depend_on_them( self ): + def i_depend_on_them( self, recursive=True ): answer = [] - map( lambda decl: answer.extend( decl.i_depend_on_them() ), self.declarations ) + if recursive: + map( lambda decl: answer.extend( decl.i_depend_on_them() ), self.declarations ) return answer Modified: pygccxml_dev/pygccxml/declarations/typedef.py =================================================================== --- pygccxml_dev/pygccxml/declarations/typedef.py 2006-12-01 19:47:39 UTC (rev 772) +++ pygccxml_dev/pygccxml/declarations/typedef.py 2006-12-01 21:19:09 UTC (rev 773) @@ -34,5 +34,5 @@ type = property( _get_type, _set_type , doc="reference to the original L{type<type_t>}" ) - def i_depend_on_them( self ): + def i_depend_on_them( self, recursive=True ): return [ dependencies.dependency_info_t( self, self.type ) ] Modified: pygccxml_dev/pygccxml/declarations/variable.py =================================================================== --- pygccxml_dev/pygccxml/declarations/variable.py 2006-12-01 19:47:39 UTC (rev 772) +++ pygccxml_dev/pygccxml/declarations/variable.py 2006-12-01 21:19:09 UTC (rev 773) @@ -69,5 +69,5 @@ raise RuntimeError( "access_type functionality only available on member variables and not on global variables" ) return self.parent.find_out_member_access_type( self ) - def i_depend_on_them( self ): + def i_depend_on_them( self, recursive=True ): return [ dependencies.dependency_info_t( self, self.type ) ] Modified: pyplusplus_dev/pyplusplus/module_creator/dependencies_manager.py =================================================================== --- pyplusplus_dev/pyplusplus/module_creator/dependencies_manager.py 2006-12-01 19:47:39 UTC (rev 772) +++ pyplusplus_dev/pyplusplus/module_creator/dependencies_manager.py 2006-12-01 21:19:09 UTC (rev 773) @@ -47,8 +47,13 @@ def __build_dependencies( self, decl ): if self.__is_std_decl( decl ): return [] #std declarations should be exported by Py++! - return decl.i_depend_on_them() + dependencies = decl.i_depend_on_them(recursive=False) + if isinstance( decl, declarations.class_t ): + dependencies = filter( lambda d: d.access_type != declarations.ACCESS_TYPES.PRIVATE + , dependencies ) + return dependencies + def __find_out_used_but_not_exported( self ): used_not_exported = [] exported_ids = set( map( lambda d: id( d ), self.__exported_decls ) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-12-05 10:50:34
|
Revision: 775 http://svn.sourceforge.net/pygccxml/?rev=775&view=rev Author: roman_yakovenko Date: 2006-12-05 02:50:33 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Modified Paths: -------------- pygccxml_dev/unittests/autoconfig.py pyplusplus_dev/environment.py Property Changed: ---------------- pygccxml_dev/unittests/ Property changes on: pygccxml_dev/unittests ___________________________________________________________________ Name: svn:ignore - *.pyc + *.pyc temp Modified: pygccxml_dev/unittests/autoconfig.py =================================================================== --- pygccxml_dev/unittests/autoconfig.py 2006-12-03 21:55:33 UTC (rev 774) +++ pygccxml_dev/unittests/autoconfig.py 2006-12-05 10:50:33 UTC (rev 775) @@ -16,7 +16,7 @@ if 'roman' in getpass.getuser(): if sys.platform == 'win32': - gccxml_path = 'd:/gccxml_cvs/gccxml-build/bin/release/gccxml.exe' + gccxml_path = r'd:/dev/gccxml_cvs/gccxml-bin/bin/release/gccxml.exe' else: gccxml_path = '/home/roman/gccxml-build/bin/gccxml' Modified: pyplusplus_dev/environment.py =================================================================== --- pyplusplus_dev/environment.py 2006-12-03 21:55:33 UTC (rev 774) +++ pyplusplus_dev/environment.py 2006-12-05 10:50:33 UTC (rev 775) @@ -27,11 +27,11 @@ if sys.platform == 'win32': scons.suffix = '.pyd' scons.ccflags = ['/MD', '/EHsc', '/GR', '/Zc:wchar_t', '/Zc:forScope' ] - boost.libs = 'd:/boost_cvs/bin' - boost.include = 'd:/boost_cvs' + boost.libs = 'd:/dev/boost_cvs/bin' + boost.include = 'd:/dev/boost_cvs' python.libs = 'e:/python25/libs' python.include = 'e:/python25/include' - gccxml.executable = 'd:/gccxml_cvs/gccxml-build/bin/release/gccxml.exe' + gccxml.executable = r'd:/dev/gccxml_cvs/gccxml-bin/bin/release/gccxml.exe' else: scons.suffix = '.so' boost.libs = '/home/roman/boost_cvs/bin' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-12-05 10:52:19
|
Revision: 776 http://svn.sourceforge.net/pygccxml/?rev=776&view=rev Author: roman_yakovenko Date: 2006-12-05 02:52:14 -0800 (Tue, 05 Dec 2006) Log Message: ----------- editing ignore list Property Changed: ---------------- pygccxml_dev/unittests/data/ pyplusplus_dev/unittests/temp/ Property changes on: pygccxml_dev/unittests/data ___________________________________________________________________ Name: svn:ignore + *.cache Property changes on: pyplusplus_dev/unittests/temp ___________________________________________________________________ Name: svn:ignore - internal_classes.dll member_functions.dll member_variables.dll module_body.dll namespaces.dll noncopyable.dll operators.dll operators_bug.dll optional.dll optional_bug.dll pointer_as_arg.dll pointer_to_function_as_argument.dll private_assign.dll recursive.dll regression1.dll regression2.dll regression3.dll smart_pointers.dll special_operators.dll statics.dll temprorary_variable.dll unnamed_enums.dll user_text.dll abstract.cpp~ call_policies.cpp~ casting.cpp~ class_order2.cpp~ class_order3.cpp~ class_order4.cpp~ class_order.cpp~ classes.cpp~ enums.cpp~ factory.cpp~ finalizables.cpp~ free_functions.cpp~ free_operators.cpp~ global_variables.cpp~ index_operator.cpp~ internal_classes.cpp~ member_functions.cpp~ member_variables.cpp~ noncopyable.cpp~ operators_bug.cpp~ optional.cpp~ optional_bug.cpp~ pointer_as_arg.cpp~ pointer_to_function_as_argument.cpp~ private_assign.cpp~ recursive.cpp~ regression1.cpp~ regression2.cpp~ regression3.cpp~ smart_pointers.cpp~ special_operators.cpp~ statics.cpp~ temprorary_variable.cpp~ unnamed_enums.cpp~ user_text.cpp~ abstract.exp call_policies.exp casting.exp class_order2.exp class_order3.exp class_order4.exp class_order.exp classes.exp enums.exp factory.exp finalizables.exp free_function_ignore_bug.exp free_functions.exp free_operators.exp global_variables.exp index_operator.exp internal_classes.exp member_functions.exp member_variables.exp module_body.exp namespaces.exp noncopyable.exp operators.exp operators_bug.exp optional.exp optional_bug.exp pointer_as_arg.exp pointer_to_function_as_argument.exp private_assign.exp recursive.exp regression1.exp regression2.exp regression3.exp smart_pointers.exp special_operators.exp statics.exp temprorary_variable.exp unnamed_enums.exp user_text.exp abstract.lib call_policies.lib casting.lib class_order2.lib class_order3.lib class_order4.lib class_order.lib classes.lib enums.lib factory.lib finalizables.lib free_function_ignore_bug.lib free_functions.lib free_operators.lib global_variables.lib index_operator.lib internal_classes.lib member_functions.lib member_variables.lib module_body.lib namespaces.lib noncopyable.lib operators.lib operators_bug.lib optional.lib optional_bug.lib pointer_as_arg.lib pointer_to_function_as_argument.lib private_assign.lib recursive.lib regression1.lib regression2.lib regression3.lib smart_pointers.lib special_operators.lib statics.lib temprorary_variable.lib unnamed_enums.lib user_text.lib abstract.obj call_policies.obj casting.obj class_order2.obj class_order3.obj class_order4.obj class_order.obj classes.obj enums.obj factory.obj finalizables.obj free_function_ignore_bug.obj free_functions.obj free_operators.obj global_variables.obj index_operator.obj internal_classes.obj member_functions.obj member_variables.obj module_body.obj namespaces.obj noncopyable.obj operators.obj operators_bug.obj optional.obj optional_bug.obj pointer_as_arg.obj pointer_to_function_as_argument.obj private_assign.obj recursive.obj regression1.obj regression2.obj regression3.obj smart_pointers.obj special_operators.obj statics.obj temprorary_variable.obj unnamed_enums.obj user_text.obj abstract.scons call_policies.scons casting.scons class_order2.scons class_order3.scons class_order4.scons class_order.scons classes.scons enums.scons factory.scons finalizables.scons free_function_ignore_bug.scons free_functions.scons free_operators.scons global_variables.scons index_operator.scons internal_classes.scons member_functions.scons member_variables.scons module_body.scons namespaces.scons noncopyable.scons operators.scons operators_bug.scons optional.scons optional_bug.scons pointer_as_arg.scons pointer_to_function_as_argument.scons private_assign.scons recursive.scons regression1.scons regression2.scons regression3.scons smart_pointers.scons special_operators.scons statics.scons temprorary_variable.scons unnamed_enums.scons user_text.scons abstract.dll call_policies.dll casting.dll class_order2.dll class_order3.dll class_order4.dll class_order.dll classes.dll enums.dll factory.dll finalizables.dll free_function_ignore_bug.dll free_functions.dll free_operators.dll global_variables.dll index_operator.dll .sconsign.dblite __array_1.pypp.hpp classes.cpp enums.cpp free_functions.cpp module_body.cpp namespaces.cpp unnamed_enums.cpp abstract.cpp call_policies.cpp casting.cpp class_order.cpp class_order2.cpp class_order3.cpp class_order4.cpp factory.cpp finalizables.cpp free_function_ignore_bug.cpp free_operators.cpp global_variables.cpp index_operator.cpp internal_classes.cpp member_functions.cpp member_variables.cpp noncopyable.cpp operators.cpp operators_bug.cpp optional.cpp optional_bug.cpp pointer_as_arg.cpp pointer_to_function_as_argument.cpp private_assign.cpp protected.cpp recursive.cpp regression1.cpp regression2.cpp regression3.cpp smart_pointers.cpp special_operators.cpp statics.cpp temprorary_variable.cpp user_text.cpp protected.dll protected.exp protected.lib protected.obj protected.scons indexing_suites.cpp indexing_suites.cpp~ indexing_suites.dll indexing_suites.exp indexing_suites.lib indexing_suites.obj indexing_suites.scons + internal_classes.dll member_functions.dll member_variables.dll module_body.dll namespaces.dll noncopyable.dll operators.dll operators_bug.dll optional.dll optional_bug.dll pointer_as_arg.dll pointer_to_function_as_argument.dll private_assign.dll recursive.dll regression1.dll regression2.dll regression3.dll smart_pointers.dll special_operators.dll statics.dll temprorary_variable.dll unnamed_enums.dll user_text.dll abstract.cpp~ call_policies.cpp~ casting.cpp~ class_order2.cpp~ class_order3.cpp~ class_order4.cpp~ class_order.cpp~ classes.cpp~ enums.cpp~ factory.cpp~ finalizables.cpp~ free_functions.cpp~ free_operators.cpp~ global_variables.cpp~ index_operator.cpp~ internal_classes.cpp~ member_functions.cpp~ member_variables.cpp~ noncopyable.cpp~ operators_bug.cpp~ optional.cpp~ optional_bug.cpp~ pointer_as_arg.cpp~ pointer_to_function_as_argument.cpp~ private_assign.cpp~ recursive.cpp~ regression1.cpp~ regression2.cpp~ regression3.cpp~ smart_pointers.cpp~ special_operators.cpp~ statics.cpp~ temprorary_variable.cpp~ unnamed_enums.cpp~ user_text.cpp~ abstract.exp call_policies.exp casting.exp class_order2.exp class_order3.exp class_order4.exp class_order.exp classes.exp enums.exp factory.exp finalizables.exp free_function_ignore_bug.exp free_functions.exp free_operators.exp global_variables.exp index_operator.exp internal_classes.exp member_functions.exp member_variables.exp module_body.exp namespaces.exp noncopyable.exp operators.exp operators_bug.exp optional.exp optional_bug.exp pointer_as_arg.exp pointer_to_function_as_argument.exp private_assign.exp recursive.exp regression1.exp regression2.exp regression3.exp smart_pointers.exp special_operators.exp statics.exp temprorary_variable.exp unnamed_enums.exp user_text.exp abstract.lib call_policies.lib casting.lib class_order2.lib class_order3.lib class_order4.lib class_order.lib classes.lib enums.lib factory.lib finalizables.lib free_function_ignore_bug.lib free_functions.lib free_operators.lib global_variables.lib index_operator.lib internal_classes.lib member_functions.lib member_variables.lib module_body.lib namespaces.lib noncopyable.lib operators.lib operators_bug.lib optional.lib optional_bug.lib pointer_as_arg.lib pointer_to_function_as_argument.lib private_assign.lib recursive.lib regression1.lib regression2.lib regression3.lib smart_pointers.lib special_operators.lib statics.lib temprorary_variable.lib unnamed_enums.lib user_text.lib abstract.obj call_policies.obj casting.obj class_order2.obj class_order3.obj class_order4.obj class_order.obj classes.obj enums.obj factory.obj finalizables.obj free_function_ignore_bug.obj free_functions.obj free_operators.obj global_variables.obj index_operator.obj internal_classes.obj member_functions.obj member_variables.obj module_body.obj namespaces.obj noncopyable.obj operators.obj operators_bug.obj optional.obj optional_bug.obj pointer_as_arg.obj pointer_to_function_as_argument.obj private_assign.obj recursive.obj regression1.obj regression2.obj regression3.obj smart_pointers.obj special_operators.obj statics.obj temprorary_variable.obj unnamed_enums.obj user_text.obj abstract.scons call_policies.scons casting.scons class_order2.scons class_order3.scons class_order4.scons class_order.scons classes.scons enums.scons factory.scons finalizables.scons free_function_ignore_bug.scons free_functions.scons free_operators.scons global_variables.scons index_operator.scons internal_classes.scons member_functions.scons member_variables.scons module_body.scons namespaces.scons noncopyable.scons operators.scons operators_bug.scons optional.scons optional_bug.scons pointer_as_arg.scons pointer_to_function_as_argument.scons private_assign.scons recursive.scons regression1.scons regression2.scons regression3.scons smart_pointers.scons special_operators.scons statics.scons temprorary_variable.scons unnamed_enums.scons user_text.scons abstract.dll call_policies.dll casting.dll class_order2.dll class_order3.dll class_order4.dll class_order.dll classes.dll enums.dll factory.dll finalizables.dll free_function_ignore_bug.dll free_functions.dll free_operators.dll global_variables.dll index_operator.dll .sconsign.dblite __array_1.pypp.hpp classes.cpp enums.cpp free_functions.cpp module_body.cpp namespaces.cpp unnamed_enums.cpp abstract.cpp call_policies.cpp casting.cpp class_order.cpp class_order2.cpp class_order3.cpp class_order4.cpp factory.cpp finalizables.cpp free_function_ignore_bug.cpp free_operators.cpp global_variables.cpp index_operator.cpp internal_classes.cpp member_functions.cpp member_variables.cpp noncopyable.cpp operators.cpp operators_bug.cpp optional.cpp optional_bug.cpp pointer_as_arg.cpp pointer_to_function_as_argument.cpp private_assign.cpp protected.cpp recursive.cpp regression1.cpp regression2.cpp regression3.cpp smart_pointers.cpp special_operators.cpp statics.cpp temprorary_variable.cpp user_text.cpp protected.dll protected.exp protected.lib protected.obj protected.scons indexing_suites.cpp indexing_suites.cpp~ indexing_suites.dll indexing_suites.exp indexing_suites.lib indexing_suites.obj indexing_suites.scons *.pyd *.exp *.lib *.obj *.scons This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-12-15 20:11:49
|
Revision: 802 http://svn.sourceforge.net/pygccxml/?rev=802&view=rev Author: roman_yakovenko Date: 2006-12-15 12:11:48 -0800 (Fri, 15 Dec 2006) Log Message: ----------- updating docs Modified Paths: -------------- pygccxml_dev/docs/history/history.rest pyplusplus_dev/docs/history/history.rest Modified: pygccxml_dev/docs/history/history.rest =================================================================== --- pygccxml_dev/docs/history/history.rest 2006-12-14 18:41:53 UTC (rev 801) +++ pygccxml_dev/docs/history/history.rest 2006-12-15 20:11:48 UTC (rev 802) @@ -10,50 +10,50 @@ Thanks to all the people that have contributed patches, bug reports and suggestions: - * My wife - Yulia - * John Pallister - * Matthias Baas - * Allen Bierbaum - * Georgiy Dernovoy - * Darren Garnier - * Gottfried Ganssauge - * Gaetan Lehmann - +* My wife - Yulia +* John Pallister +* Matthias Baas +* Allen Bierbaum +* Georgiy Dernovoy +* Darren Garnier +* Gottfried Ganssauge +* Gaetan Lehmann + ------------- Version 0.8.5 ------------- -1. ``signed char`` and ``char`` are two different types. This bug was fixed and - now `pygccxml`_ treats them right. Many thanks to Gaetan Lehmann for reporting +1. Adding new functionality: "I depend on them". Every declarations can report + types and declarations it depends on. + +2. ``signed char`` and ``char`` are two different types. This bug was fixed and + now `pygccxml`_ treats them right. Many thanks to Gaetan Lehmann for reporting the bug. -2. Declarations, read from GCC-XML generated file, could be saved in cache. +3. Declarations, read from GCC-XML generated file, could be saved in cache. -3. New type traits have been added: - +4. New type traits have been added: + * ``is_bool`` - -4. Small improvment to algorithm, which extracts ``value_type``( ``mapped_type`` ) - from STD containers. - -5. Few aliases to long method name were introduced: +5. Small improvement to algorithm, which extracts ``value_type`` + ( ``mapped_type`` ) from "std" containers. + +6. Few aliases to long method name were introduced: + ================================= ========================== - name alias + Name Alias ================================= ========================== - ``scopedef_t.variable`` ``scopedef_t.var`` - ``scopedef_t.variables`` ``scopedef_t.vars`` - ``scopedef_t.member_function`` ``scopedef_t.mem_fun`` - ``scopedef_t.member_functions`` ``scopedef_t.mem_funs`` - ``scopedef_t.free_function`` ``scopedef_t.free_fun`` - ``scopedef_t.free_functions`` ``scopedef_t.free_funs`` + ``scopedef_t.variable`` ``scopedef_t.var`` + ``scopedef_t.variables`` ``scopedef_t.vars`` + ``scopedef_t.member_function`` ``scopedef_t.mem_fun`` + ``scopedef_t.member_functions`` ``scopedef_t.mem_funs`` + ``scopedef_t.free_function`` ``scopedef_t.free_fun`` + ``scopedef_t.free_functions`` ``scopedef_t.free_funs`` ================================= ========================== -6. Fixing bug related to array size and cache. +7. Fixing bug related to array size and cache. -7. Adding new functionality: "I depend on them". Every declarations could be asked - to report - ------------- Version 0.8.2 ------------- Modified: pyplusplus_dev/docs/history/history.rest =================================================================== --- pyplusplus_dev/docs/history/history.rest 2006-12-14 18:41:53 UTC (rev 801) +++ pyplusplus_dev/docs/history/history.rest 2006-12-15 20:11:48 UTC (rev 802) @@ -10,13 +10,13 @@ Thanks to all the people that have contributed patches, bug reports and suggestions: - * My wife - Yulia - * John Pallister - * Matthias Baas - * Allen Bierbaum - * Lakin Wecker - * Georgiy Dernovoy - * Gottfried Ganssauge +* My wife - Yulia +* John Pallister +* Matthias Baas +* Allen Bierbaum +* Lakin Wecker +* Georgiy Dernovoy +* Gottfried Ganssauge ------------ Project name @@ -31,7 +31,45 @@ 3. Users always changed the name of the projects. I saw at least 6 different names. +------------- +Version 0.8.5 +------------- +1. `Function transformation`_ feature goes live. + +.. _`Function transformation` : ../documentation/functions/transformation/transformation.html + +2. "Py++" introduces new functionality, which allows you to control messages and + warnings: `how to disable warnings?`_ . + +.. _`how to disable warnings?` : ../documentation/feedback.html#how-to-disable-warning-s + +3. Adding new algorithm, which controls the registration order of the functions. + See `registration order document`_ + +.. _`registration order document` : ../documentation/functions/registration_order.html + +4. New "Py++" defined `return_pointee_value`_ call policy was introduced. + +.. _`return_pointee_value` : ../documentation/functions/call_policies.html#py-defined-call-policies + +5. Support for opaque types was added. Read more about this feature `here`__. + +.. __ : ../documentation/functions/call_policies.html#special-case + +6. It is possible to configure "Py++" to generate faster ( compilation time ) + code for indexing suite version 2. See API documentation. + +7. The algorithm, which finds all class properties was improved. It provides + user with a better way to control properties creation. A property that would + hide another exposed declaration will not be registered\\created. + +8. Work around for "custom smart pointer as member variable" Boost.Python bug + was introduced. + +9. Bugs fixes and documentation improvement. + + ------------- Version 0.8.2 ------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-12-21 05:44:30
|
Revision: 808 http://svn.sourceforge.net/pygccxml/?rev=808&view=rev Author: roman_yakovenko Date: 2006-12-20 21:44:30 -0800 (Wed, 20 Dec 2006) Log Message: ----------- ++version Modified Paths: -------------- pygccxml_dev/setup.py pyplusplus_dev/setup.py Modified: pygccxml_dev/setup.py =================================================================== --- pygccxml_dev/setup.py 2006-12-21 05:43:08 UTC (rev 807) +++ pygccxml_dev/setup.py 2006-12-21 05:44:30 UTC (rev 808) @@ -52,7 +52,7 @@ setup( name = "pygccxml", - version = "0.8.3", + version = "0.8.5", description = "GCC-XML generated file reader", author = "Roman Yakovenko", author_email = "rom...@gm...", Modified: pyplusplus_dev/setup.py =================================================================== --- pyplusplus_dev/setup.py 2006-12-21 05:43:08 UTC (rev 807) +++ pyplusplus_dev/setup.py 2006-12-21 05:44:30 UTC (rev 808) @@ -90,7 +90,7 @@ setup( name = "Py++", - version = "0.8.3", + version = "0.8.5", description="Py++ is a framework of components for creating C++ code generator for Boost.Python library", author="Roman Yakovenko", author_email="rom...@gm...", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-01-09 06:20:09
|
Revision: 860 http://svn.sourceforge.net/pygccxml/?rev=860&view=rev Author: roman_yakovenko Date: 2007-01-08 22:20:10 -0800 (Mon, 08 Jan 2007) Log Message: ----------- improving error message Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py pyplusplus_dev/unittests/mdecl_wrapper_tester.py Modified: pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py =================================================================== --- pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py 2007-01-08 17:28:00 UTC (rev 859) +++ pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py 2007-01-09 06:20:10 UTC (rev 860) @@ -10,6 +10,8 @@ The L{class<mdecl_wrapper_t>} allows user to not write "for" loops within the code. """ +import os + class call_redirector_t( object ): """Internal class used to call some function of objects""" def __init__( self, name, decls ): @@ -65,8 +67,10 @@ def __ensure_attribute( self, name ): invalid_decls = filter( lambda d: not hasattr( d, name ), self.declarations ) + sep = os.linesep + ' ' if invalid_decls: - raise RuntimeError( "Not all declarations have '%s' attribute." % name ) + raise RuntimeError( "Next declarations don't have '%s' attribute: %s" + % ( name, sep.join( map( str, invalid_decls ) ) ) ) def __setattr__( self, name, value ): """Updates the value of attribute on all declarations. Modified: pyplusplus_dev/unittests/mdecl_wrapper_tester.py =================================================================== --- pyplusplus_dev/unittests/mdecl_wrapper_tester.py 2007-01-08 17:28:00 UTC (rev 859) +++ pyplusplus_dev/unittests/mdecl_wrapper_tester.py 2007-01-09 06:20:10 UTC (rev 860) @@ -60,7 +60,7 @@ try: mdw.call_policies = None self.fail( "Runtime error has not been raised." ) - except RuntimeError: + except RuntimeError, err: pass def test__getitem__( self ): @@ -108,4 +108,4 @@ unittest.TextTestRunner(verbosity=2).run( create_suite() ) if __name__ == "__main__": - run_suite() \ No newline at end of file + run_suite() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-02-20 11:04:53
|
Revision: 916 http://svn.sourceforge.net/pygccxml/?rev=916&view=rev Author: roman_yakovenko Date: 2007-02-20 03:04:51 -0800 (Tue, 20 Feb 2007) Log Message: ----------- updating documentation Modified Paths: -------------- pyplusplus_dev/docs/documentation/functions/call_policies.rest pyplusplus_dev/docs/documentation/functions/transformation/built_in/built_in.rest pyplusplus_dev/docs/documentation/functions/transformation/built_in/modify_type.rest pyplusplus_dev/unittests/call_policies_tester.py pyplusplus_dev/unittests/data/function_transformations_to_be_exported.hpp pyplusplus_dev/unittests/function_transformations_tester.py website/site_creator/page_creator.py Modified: pyplusplus_dev/docs/documentation/functions/call_policies.rest =================================================================== --- pyplusplus_dev/docs/documentation/functions/call_policies.rest 2007-02-19 19:33:01 UTC (rev 915) +++ pyplusplus_dev/docs/documentation/functions/call_policies.rest 2007-02-20 11:04:51 UTC (rev 916) @@ -246,13 +246,13 @@ struct vector3{ ... - float* clone_row_data() const{ + float* clone_raw_data() const{ float* values = new float[3]; //copy values return values; } - const flow* get_row_data() const{ + const flow* get_raw_data() const{ return m_values; } @@ -264,11 +264,11 @@ namespace pypp_cp = pyplusplus::call_policies; BOOST_PYTHON_MODULE(my_module){ bpl::class_< vector3 >( "vector3" ) - .def( "clone_row_data" - , &::vector3::clone_row_data + .def( "clone_raw_data" + , &::vector3::clone_raw_data , bpl::return_value_policy< pypp_cp::arrays::as_tuple< 3, pypp_cp::memory_managers::delete_ > >() ) - .def( "get_row_data" - , &::vector3::get_row_data + .def( "get_raw_data" + , &::vector3::get_raw_data , bpl::return_value_policy< pypp_cp::arrays::as_tuple< 3, pypp_cp::memory_managers::none > >() ) ); } @@ -295,14 +295,230 @@ from pyplusplus.module_builder import call_policies mb = module_builder.module_builder_t( ... ) - mb.member_function( 'clone_row_data' ).call_policies \ + mb.member_function( 'clone_raw_data' ).call_policies \ = call_policies.convert_array_to_tuple( 3, call_policies.memory_managers.delete_ ) - mb.member_function( 'get_row_data' ).call_policies \ + mb.member_function( 'get_raw_data' ).call_policies \ = call_policies.convert_array_to_tuple( 3, call_policies.memory_managers.none ) +return_range +------------ +Class ``return_range`` is a model of `CallPolicies`_, which can be used to wrap +C++ functions that return a pointer to some array. The new call policy constructs +object, which provides a regular `Python`_ `sequence`_ interface. +.. _`sequence` : http://docs.python.org/lib/typesseq.html + + +Example +~~~~~~~ + +.. code-block:: C++ + + struct image_t{ + + ... + + const unsigned char* get_data() const{ + return m_raw_data; + } + + ssize_t get_width() const{ + return m_width; + } + + ssize_t get_height() const{ + return m_height; + } + + private: + unsigned long m_width; + unsigned long m_height; + unsigned char* m_raw_data; + }; + +Before introducing the whole solution, I would like to describe "return_range" +interface. + +``return_range`` definition +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: C++ + + template < typename TGetSize + , typename TValueType + , typename TValuePolicies=boost::python::default_call_policies > + struct return_range : boost::python::default_call_policies + { ... }; + +`Boost.Python`_ call policies are stateless classes, which do not care any +information about the invoked function or object. In out case we have to pass +next information: + +* the size of array + +* array type + +* "__getitem__" call policies for array elements + + +``TGetSize`` parameter +++++++++++++++++++++++ + +``TGetSize`` is a class, which is responsible to find out the size of the returned +array. + +``TGetSize`` class must have: + +* default constructor + +* call operator with next signature: + + .. code-block:: C++ + + ssize_t operator()( boost::python::tuple args ); + + ``args`` is a tuple of arguments, the function was called with. + + Pay attention: this operator will be invoked **after** the function. This + call policy is **not thread-safe**! + +For our case, next class could be defined: + +.. code-block:: C++ + + struct image_data_size_t{ + ssize_t operator()( boost::python::tuple args ){ + namespace bpl = boost::python; + bpl::object self = args[0]; + image_t& img = bpl::extract< image_t& >( self ); + return img.get_width() * img.get_height(); + } + }; + +Passing all arguments, instead of single "self" argument gives you an ability +to treat functions, where the user asked to get access to the part of the array. + +.. code-block:: C++ + + struct image_t{ + ... + const unsigned char* get_data(ssize_t offset) const{ + //check that offset represents a legal value + ... + return &m_raw_data[offset]; + } + ... + }; + +Next "get size" class treats this situation: + +.. code-block:: C++ + + struct image_data_size_t{ + ssize_t operator()( boost::python::tuple args ){ + namespace bpl = boost::python; + bpl::object self = args[0]; + image_t& img = bpl::extract< image_t& >( self ); + bpl::object offset_obj = args[1]; + ssize_t offset = bpl::extract< ssize_t >( offset_obj ); + return img.get_width() * img.get_height() - offset; + } + }; + + +``TValueType`` parameter +++++++++++++++++++++++++ + +``TValueType`` is a type of array element. In our case it is ``unsigned char``. + +``TValuePolicies`` parameter +++++++++++++++++++++++++++++ + +``TValuePolicies`` is a "call policy" class, which will be applied when the array +element is returned to `Python`_. This is a call policy for "__getitem__" function. + +``unsigned char`` is mapped to immutable type in `Python`_, so I have to use +``default_call_policies``. ``default_call_policies`` is a default value for +``TValuePolicies`` parameter. + + +I think, now you are ready to see the whole solution: + +.. code-block:: C++ + + namespace bpl = boost::python; + namespace ppc = pyplusplus::call_policies; + + BOOST_PYTHON_MODULE(my_module){ + bpl::class_< image_t >( "image_t" ) + .def( "get_width", &image_t::get_width ) + .def( "get_height", &image_t::get_height ) + .def( "get_raw_data", ppc::return_range< image_size_t, unsigned char >() ); + } + +Py++ integration +~~~~~~~~~~~~~~~~ + +The `Py++`_ code is not that different from what you already know: + +.. code-block:: Python + + from pyplusplus import module_builder + from pyplusplus.module_builder import call_policies + + image_size_code = \ + """ + struct image_data_size_t{ + ssize_t operator()( boost::python::tuple args ){ + namespace bpl = boost::python; + bpl::object self = args[0]; + image_t& img = bpl::extract< image_t& >( self ); + return img.get_width() * img.get_height(); + } + }; + """ + + mb = module_builder.module_builder_t( ... ) + image = mb.class_( 'image_t' ) + image.add_declaration_code( image_size_code ) + get_raw_data = image.mem_fun( 'get_raw_data' ) + get_raw_data.call_policies \ + = call_policies.return_range( get_raw_data, "image_data_size_t" ) + +call_policies.return_range arguments: + +1. A reference to function. `Py++`_ will extract by itself the type of the array + element. + +2. A name of "get size" class. + +3. A call policies for "__getitem__" function. `Py++`_ will analyze the array + element type. If the type is mapped to immutable type, than ``default_call_policies`` + is used, otherwise you have to specify call policies. + + +Python usage code: + +.. code-block:: Python + + from my_module import * + + img = image_t(...) + for p in img.get_raw_data(): + print p + +Dependencies +~~~~~~~~~~~~ + +The new call policy depends on `new indexing suite`_ and `Py++`_ :-). But if you +want you can extract the relevant piece of code from `this file`_. + +.. _`new indexing suite` : ./../containers.html +.. _`this file` : http://pygccxml.svn.sourceforge.net/viewvc/pygccxml/pyplusplus_dev/pyplusplus/code_repository/call_policies.py?view=markup + .. _`ResultConverterGenerator` : http://boost.org/libs/python/doc/v2/ResultConverter.html#ResultConverterGenerator-concept +.. _`CallPolicies` : http://www.boost.org/libs/python/doc/v2/CallPolicies.html#CallPolicies-concept .. _`Py++` : ./../pyplusplus.html .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html Modified: pyplusplus_dev/docs/documentation/functions/transformation/built_in/built_in.rest =================================================================== --- pyplusplus_dev/docs/documentation/functions/transformation/built_in/built_in.rest 2007-02-19 19:33:01 UTC (rev 915) +++ pyplusplus_dev/docs/documentation/functions/transformation/built_in/built_in.rest 2007-02-20 11:04:51 UTC (rev 916) @@ -24,6 +24,8 @@ * ``input_c_buffer`` +* ``transfer_ownership`` + The set doesn't cover all common use cases, but it will grow with every new version of `Py++`_. If you created your own transformer consider to contribute it to the project. Modified: pyplusplus_dev/docs/documentation/functions/transformation/built_in/modify_type.rest =================================================================== --- pyplusplus_dev/docs/documentation/functions/transformation/built_in/modify_type.rest 2007-02-19 19:33:01 UTC (rev 915) +++ pyplusplus_dev/docs/documentation/functions/transformation/built_in/modify_type.rest 2007-02-20 11:04:51 UTC (rev 916) @@ -18,10 +18,11 @@ New in version grater than 0.8.5. -Known limits ------------- +Pay attention! +-------------- -Implicit conversion should exist between new type and the old one. +If implicit conversion between new type and the old one does not exist +"reinterpret_cast" will be used. ------- Example Modified: pyplusplus_dev/unittests/call_policies_tester.py =================================================================== --- pyplusplus_dev/unittests/call_policies_tester.py 2007-02-19 19:33:01 UTC (rev 915) +++ pyplusplus_dev/unittests/call_policies_tester.py 2007-02-20 11:04:51 UTC (rev 916) @@ -22,7 +22,8 @@ get_size_code = """ struct raw_data_size_t{ ssize_t - operator()( boost::python::object self ){ + operator()( boost::python::tuple args ){ + boost::python::object self = args[0]; call_policies::return_range_image_t& image = boost::python::extract<call_policies::return_range_image_t&>( self ); return image.raw_data.size(); Modified: pyplusplus_dev/unittests/data/function_transformations_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/function_transformations_to_be_exported.hpp 2007-02-19 19:33:01 UTC (rev 915) +++ pyplusplus_dev/unittests/data/function_transformations_to_be_exported.hpp 2007-02-20 11:04:51 UTC (rev 916) @@ -231,20 +231,21 @@ }; -struct transfer_ownership_tester_t{ - struct resources_t{ - resources_t(){ - std::cout << "created"; - } - ~resources_t(){ - std::cout << "destroyed"; - } - }; - void tester(resources_t* r){ - delete r; + +} + +struct resource_t{ + resource_t(){ + std::cout << "created"; } + ~resource_t(){ + std::cout << "destroyed"; + } }; +void do_smth(resource_t* r){ + } + #endif//__function_transformations_to_be_exported_hpp__ Modified: pyplusplus_dev/unittests/function_transformations_tester.py =================================================================== --- pyplusplus_dev/unittests/function_transformations_tester.py 2007-02-19 19:33:01 UTC (rev 915) +++ pyplusplus_dev/unittests/function_transformations_tester.py 2007-02-20 11:04:51 UTC (rev 916) @@ -85,11 +85,10 @@ write_s = cls.mem_fun( 'write_s' ) write_s.add_transformation( ft.input_c_buffer( 'buffer', 'size' ) ) - resource = mb.class_( 'resources_t' ) + resource = mb.class_( 'resource_t' ) resource.held_type = 'std::auto_ptr< %s >' % resource.decl_string - transfer_ownership_tester = mb.class_( 'transfer_ownership_tester_t' ) - tester = transfer_ownership_tester.mem_fun( 'tester' ) - tester.add_transformation( ft.transfer_ownership( 0 ) ) + do_smth = mb.free_fun( 'do_smth' ) + do_smth.add_transformation( ft.transfer_ownership( 0 ) ) def run_tests(self, module): """Run the actual unit tests. Modified: website/site_creator/page_creator.py =================================================================== --- website/site_creator/page_creator.py 2007-02-19 19:33:01 UTC (rev 915) +++ website/site_creator/page_creator.py 2007-02-20 11:04:51 UTC (rev 916) @@ -42,15 +42,20 @@ language = options['language'] if content and 'source-file' in options: - error = state_machine.reporter.error( "You cannot both specify a source-file and include code directly.", - docutils.nodes.literal_block(block_text,block_text), line=lineno) + error = state_machine.reporter.error( "You cannot both specify a source-file and include code directly." + , docutils.nodes.literal_block(block_text,block_text), line=lineno) return [error] source_code = None if content: source_code = os.linesep.join( map( lambda s: s.rstrip(), content ) ) else: - source_code = file( options['source-file'] ).read() + try: + source_code = file( options['source-file'] ).read() + except Exception, err: + error = state_machine.reporter.error( "Exception: " + str( err ) + , docutils.nodes.literal_block(block_text,block_text), line=lineno) + return [error] html = pykleur.highlight( source_code , pykleur.lexers.get_lexer_by_name( language.lower() ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-04-25 05:53:56
|
Revision: 1021 http://svn.sourceforge.net/pygccxml/?rev=1021&view=rev Author: roman_yakovenko Date: 2007-04-24 22:53:58 -0700 (Tue, 24 Apr 2007) Log Message: ----------- updating version in setup.py files Modified Paths: -------------- pygccxml_dev/setup.py pyplusplus_dev/setup.py Modified: pygccxml_dev/setup.py =================================================================== --- pygccxml_dev/setup.py 2007-04-25 05:41:44 UTC (rev 1020) +++ pygccxml_dev/setup.py 2007-04-25 05:53:58 UTC (rev 1021) @@ -52,7 +52,7 @@ setup( name = "pygccxml", - version = "0.8.6", + version = "0.9.0", description = "GCC-XML generated file reader", author = "Roman Yakovenko", author_email = "rom...@gm...", Modified: pyplusplus_dev/setup.py =================================================================== --- pyplusplus_dev/setup.py 2007-04-25 05:41:44 UTC (rev 1020) +++ pyplusplus_dev/setup.py 2007-04-25 05:53:58 UTC (rev 1021) @@ -90,7 +90,7 @@ setup( name = "Py++", - version = "0.8.6", + version = "0.9.0", description="Py++ is a framework of components for creating C++ code generator for Boost.Python library", author="Roman Yakovenko", author_email="rom...@gm...", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-06-13 07:41:57
|
Revision: 1057 http://svn.sourceforge.net/pygccxml/?rev=1057&view=rev Author: roman_yakovenko Date: 2007-06-13 00:41:59 -0700 (Wed, 13 Jun 2007) Log Message: ----------- updating documentation Modified Paths: -------------- pygccxml_dev/docs/history/history.rest pyplusplus_dev/docs/history/history.rest Modified: pygccxml_dev/docs/history/history.rest =================================================================== --- pygccxml_dev/docs/history/history.rest 2007-06-13 07:34:59 UTC (rev 1056) +++ pygccxml_dev/docs/history/history.rest 2007-06-13 07:41:59 UTC (rev 1057) @@ -20,7 +20,13 @@ * Gaetan Lehmann * Martin Preisler +----------- +SVN Version +----------- +1. Class ``free_operator_t`` is now able to provide references to the class declarations + instances it works on. + ------------- Version 0.9.0 ------------- Modified: pyplusplus_dev/docs/history/history.rest =================================================================== --- pyplusplus_dev/docs/history/history.rest 2007-06-13 07:34:59 UTC (rev 1056) +++ pyplusplus_dev/docs/history/history.rest 2007-06-13 07:41:59 UTC (rev 1057) @@ -19,7 +19,7 @@ * Gottfried Ganssauge * Andy Miller * Martin Preisler - +* Meghana Haridev ------------ Project name ------------ @@ -33,7 +33,16 @@ 3. Users always changed the name of the projects. I saw at least 6 different names. +----------- +SVN Version +----------- +1. Bug fixes: + + * Py++ will not expose free operators, if at least one of the classes, it works + on, is not exposed. + Many thanks to Meghana Haridev for reporting the bug. + ------------- Version 0.9.0 ------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2007-11-21 18:47:03
|
Revision: 1165 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1165&view=rev Author: roman_yakovenko Date: 2007-11-21 10:47:02 -0800 (Wed, 21 Nov 2007) Log Message: ----------- redirecting diagnostics to stderr, instead of stdout Modified Paths: -------------- pygccxml_dev/pygccxml/utils/__init__.py pyplusplus_dev/pyplusplus/_logging_/__init__.py Modified: pygccxml_dev/pygccxml/utils/__init__.py =================================================================== --- pygccxml_dev/pygccxml/utils/__init__.py 2007-11-20 21:30:53 UTC (rev 1164) +++ pygccxml_dev/pygccxml/utils/__init__.py 2007-11-21 18:47:02 UTC (rev 1165) @@ -16,7 +16,7 @@ def _create_logger_( name ): """implementation details""" logger = logging.getLogger(name) - handler = logging.StreamHandler(sys.stdout) + handler = logging.StreamHandler() handler.setFormatter( logging.Formatter( os.linesep + '%(levelname)s %(message)s' ) ) logger.addHandler(handler) logger.setLevel(logging.INFO) Modified: pyplusplus_dev/pyplusplus/_logging_/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/_logging_/__init__.py 2007-11-20 21:30:53 UTC (rev 1164) +++ pyplusplus_dev/pyplusplus/_logging_/__init__.py 2007-11-21 18:47:02 UTC (rev 1165) @@ -14,7 +14,7 @@ def _create_logger_( name ): """implementation details""" logger = logging.getLogger(name) - handler = logging.StreamHandler(sys.stdout) + handler = logging.StreamHandler() handler.setFormatter( multi_line_formatter_t( os.linesep + '%(levelname)s: %(message)s' ) ) logger.addHandler(handler) logger.setLevel(logging.INFO) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-07-02 11:28:41
|
Revision: 1365 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1365&view=rev Author: roman_yakovenko Date: 2008-07-02 04:28:47 -0700 (Wed, 02 Jul 2008) Log Message: ----------- update docs Modified Paths: -------------- pygccxml_dev/docs/msvc/msvc.rest website/site_creator/main.py Modified: pygccxml_dev/docs/msvc/msvc.rest =================================================================== --- pygccxml_dev/docs/msvc/msvc.rest 2008-07-01 16:55:48 UTC (rev 1364) +++ pygccxml_dev/docs/msvc/msvc.rest 2008-07-02 11:28:47 UTC (rev 1365) @@ -1,12 +1,12 @@ -========================= -MS Visual Studio backends -========================= +========================== +MS Visual Studio back-ends +========================== .. contents:: Table of contents ----------------------------------------- -Why we need other than GCC-XML backends? ----------------------------------------- +----------------------------------------- +Why we need other than GCC-XML back-ends? +----------------------------------------- It is not a secret, that Windows is not a native environment for GCC. There are cases, that it cant compile the code, "produced" for other compilers. On Windows, @@ -14,75 +14,97 @@ your source code. Sometimes, changing the source code is not an option and different solution is needed. -Recently, I started to work on another back-end for `pygccxml`_, based on free tools, -available and freely redistributable with MS Visual Studio: +-------- +The idea +-------- -* PDB - program database. A .pdb files hold debugging information about your - program. In other words, it contains information about every type and function - you use. -* BSC - browse source code. A .bsc file is a comprehensive database that contains - information about a program's symbols, including symbol references, - function calltrees, and definition tables. +The idea is the same as with `GCC-XML`_ - don't write custom C++ parser, but use +the compiler to extract the information. -Both .pdb and .bsc files contain valuable information about your source code. -I guess, you will be surprised how much information it is possible to extract -from them. +During the build process, MS Visual Studio generates few files, which contain +source code "description": ----------------------------- -How it works? ----------------------------- +* .pdb file. A "program database" file holds debugging information about your + program. It is generated automaticly during "Debug" builds. -Microsoft provides API for extracting information from the files: +* .bsc file. A "browse source code" file is a comprehensive database that contains + information about a program's symbols, including symbol references, function + calltrees, and definition tables. .bsc file is not generated by default, so + you will have to turn-on this option. -* `DIA SDK`_ - Debug Interface Access Software Development Kit is able to read and - provide more-or-less convenient access to the information stored in .pdb files. - DIA SDK exposes it functionality via "COM" technology. `pygccxml`_ uses "comtypes" - project to work with the API. +I guess, you will be surprised how much information it is possible to extract. -* `BSC Toolkit`_ comes with C API. `pygccxml`_ uses "ctypes" module, from the Python - standard library. +Microsoft provides API for working with the files: -Both toolkits comes with their own terminolgy. Unless you want to help me, to -develop this backend, you can fully ignore this fact. `pygccxml`_ bridges the -domains and provide clear and consistent API. +* `DIA SDK`_ - Debug Interface Access Software Development Kit reads and gives + more or less convenient access to the information stored in the .pdb files. + `DIA SDK`_ is an integral part of MS Visual Studio. -Both files, .pdb and .bsc, contain valuable information, but some pieces are -presented in one file and not in other one. In near future `pygccxml`_ will be able -to combine the information, extracted from the files. Hint: you can send me the -patch :-). + `DIA SDK`_ exposes its functionality via "COM" technology. `pygccxml`_ uses + `comtypes package`_ to work with the API. ------------------- -The backend status ------------------- +* `Browse Source Code Toolkit`_ comes with C API. In order to read .bsc files you + have to `install the toolkit`_. + `pygccxml`_ uses "ctypes" module, from the Python standard library. + +Both API's comes with documentation and examples. + +`pygccxml`_ is going to introduce another back-end based on these tools. Each of +these tools doesn't tell the "whole story" about your source code, but if we +merge the information, extracted from the files, you can get almost the complete +picture. + + +------------------- +The back-end status +------------------- + The short version ----------------- -I feel like this backend has "beta" state. +The back-end has "alpha" state. The long version ---------------- -`pygccxml`_ pdb backend is able to extract almost all declarations from the .pdb -file. There are few exceptions and problems, that should be solved, before I will -consider this backend as "production" ready: +`pygccxml`_ MSVC back-end will consist from few packages: -* add support for bit fields - should not be a problem -* function exception specification - this information is missing in the file -* a declaration location within source code - from the DIA API I understand the - information is there and should be available, but for some reason I can access - it. -* there is some problem with extracting the exact integral type, used in the - source code - for example I have a problem to decide whether "long long int" - or "long int" is used within the code. I believe, it should be possible to - partially solve this problem. -* unit test - `pygccxml`_ comes with impressive amount of unit tests. Today only - small amount of them supports pdb backend. This should be fixed. -* performance - the backend is very slow right now, but this is "by design" and - I believe it is possible to improve it. +* ``pdb`` package reads the declaration tree from the .pdb file. This package is + almost complete. I still have to resolve few problems and your help is welcome: + * add support for bit fields - should not be a problem + * function exception specification - this information is missing in the file + + * a declaration location within source code - from the DIA API I understand the + information is there and should be available, but for some reason I can access + it. + + * there is some problem with extracting the exact integral type, used in the + source code - for example I have a problem to decide whether "long long int" + or "long int" is used within the code. I believe, it should be possible to + partially solve this problem. + + * unit tests - `pygccxml`_ comes with impressive amount of unit tests. Today + only some of them support pdb backend. + + * performance - the backend is very slow right now, but this is "by design" and + I believe it is possible to improve it. + +* ``bsc`` package is a Python wrapper for `BSC Toolkit`_. I am almost sure, it is + not possible to create "declarations tree" from the .bsc file. So this package + will be used to complete the information, extracted from the .pdb files. + +* ``msvc`` package will be the top level package that will provide a convinient + access to the both sub-packages and provide "merge" functionality. As you can + guess this package doesn't exist. + + .. _`DIA SDK`: http://msdn.microsoft.com/en-us/library/x93ctkx8.aspx +.. _`Browse Source Code Toolkit` : http://www.microsoft.com/downloads/details.aspx?FamilyId=621AE185-1C2A-4D6B-8146-183D66FE709D&displaylang=en .. _`BSC Toolkit`: http://www.microsoft.com/downloads/details.aspx?FamilyId=621AE185-1C2A-4D6B-8146-183D66FE709D&displaylang=en .. _`pygccxml`: ./../pygccxml.html .. _`GCC-XML`: http://www.gccxml.org +.. _`comtypes package` : http://starship.python.net/crew/theller/comtypes/ +.. _`install the toolkit` : http://www.microsoft.com/downloads/details.aspx?FamilyId=621AE185-1C2A-4D6B-8146-183D66FE709D&displaylang=en Modified: website/site_creator/main.py =================================================================== --- website/site_creator/main.py 2008-07-01 16:55:48 UTC (rev 1364) +++ website/site_creator/main.py 2008-07-02 11:28:47 UTC (rev 1365) @@ -82,7 +82,7 @@ curr_work_dir = os.path.abspath( os.curdir ) try: - print 'file: ', destrination_file_name + print 'file:///' + destrination_file_name.replace( '\\', '/' ) os.chdir( dir_ ) tmpl = page_creator.Template( rest_file ) tmpl.write( destrination_file_name, encoding='utf-8', output='xhtml' ) @@ -105,4 +105,4 @@ c.copy_css() c.create_html_files() c.clean_www_dir() - print 'done' \ No newline at end of file + print 'done' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |