pygccxml-commit Mailing List for C++ Python language bindings (Page 59)
Brought to you by:
mbaas,
roman_yakovenko
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(190) |
Apr
(166) |
May
(170) |
Jun
(75) |
Jul
(105) |
Aug
(131) |
Sep
(99) |
Oct
(84) |
Nov
(67) |
Dec
(54) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(66) |
Feb
(49) |
Mar
(25) |
Apr
(62) |
May
(21) |
Jun
(34) |
Jul
(9) |
Aug
(21) |
Sep
(5) |
Oct
|
Nov
(63) |
Dec
(34) |
2008 |
Jan
(10) |
Feb
(42) |
Mar
(26) |
Apr
(25) |
May
(6) |
Jun
(40) |
Jul
(18) |
Aug
(29) |
Sep
(6) |
Oct
(32) |
Nov
(14) |
Dec
(56) |
2009 |
Jan
(127) |
Feb
(52) |
Mar
(2) |
Apr
(10) |
May
(29) |
Jun
(3) |
Jul
|
Aug
(16) |
Sep
(4) |
Oct
(11) |
Nov
(8) |
Dec
(14) |
2010 |
Jan
(31) |
Feb
(1) |
Mar
(7) |
Apr
(9) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(8) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <rom...@us...> - 2006-08-10 14:25:49
|
Revision: 391 Author: roman_yakovenko Date: 2006-08-10 07:25:39 -0700 (Thu, 10 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=391&view=rev Log Message: ----------- updating docs Modified Paths: -------------- pyplusplus_dev/docs/documentation/architecture.rest Modified: pyplusplus_dev/docs/documentation/architecture.rest =================================================================== --- pyplusplus_dev/docs/documentation/architecture.rest 2006-08-10 06:38:41 UTC (rev 390) +++ pyplusplus_dev/docs/documentation/architecture.rest 2006-08-10 14:25:39 UTC (rev 391) @@ -8,8 +8,7 @@ Introduction ------------ -This document will describe an architecture behind `pyplusplus`_. If you just -started with `pyplusplus`_ you don't have to read this document. +This document will describe an architecture behind `pyplusplus`_. --- C++ @@ -18,23 +17,23 @@ C++ is very powerful programming language. The power brings complexity. It is not an easy task to parse C++ source files and to create in memory representation of declarations tree. Lets say that I've managed to do it. It is not enough. -Declarations tree is worth nothing, if user is not able to explorer it, to run +Declarations tree is worth nothing, if a user is not able to explorer it, to run queries against it, to find out traits of a declaration or a type. -On the earlier stage of development, I realized, that all this functionality does -not belong to code generator and should be implemented out side of it. `pygccxml`_ -project was born. By the way, implementing all this functionality out side of -code generator, made it to be C++ parser independent. +On the earlier stage of the development, I realized, that all this functionality +does not belong to code generator and should be implemented out side of it. +`pygccxml`_ project was born. `pygccxml`_ made the code generator to be smaller +and C++ parser independent. `pygccxml`_ provides next services: * definition of classes, that describe C++ declaration and types +* C++ declaration and type analizers( type traits ) + * C++ source files parsing and caching functionality -* C++ declaration and type analizers( type traits ) - `pyplusplus`_ uses those services to: * extract declarations from source files @@ -51,6 +50,7 @@ * provide powerful query interface + pyplusplus & pygccxml integration --------------------------------- @@ -83,9 +83,9 @@ The user should be familiar with those part and relevant API. You may ask "why"? The answer is simple: in my opinion, wrapping/hidding/modifying the API will not -give any value. +give any value. -The question I should answer is how this API integrated? Before I start to +The question you should ask is: how is this API integrated? Before I start to explain, lets take a look on next source code: :: @@ -97,24 +97,29 @@ details = mb.namespace( 'details' ) details.exclude() +:: -What you see here, is an example of code, that will be\\is written in all projects -that use `pyplusplus`_: + my_class = mb.class_( 'my_class' ) + my_class.rename("MyClass") + +What you see here, is a common pattern, that will appear in all projects, that +use `pyplusplus`_: + * find declaration(s) -* apply code generator engine configuration changes +* give instruction(s) to code generator engine -What is the main point of this example? It is perfectly good, it makes a lot of -sence to the user to configure code generation engine using declarations tree -hierarchy. Now, I think you understand the problem: how does `pyplusplus`_ add -missinig functionality to ``pygccxml.declarations`` classes? There were few -possible solutions to the problem. `pyplusplus`_ implements the solution using -factory design pattern. +What is the point of this example? From the user point of view it is perfectly +good, it makes a lot of sence to configure the engine, using declarations tree. +Now, the desired solution is clear: we should use declarations tree to configure +the engine. So, lets re-formulate the question: how does `pyplusplus`_ add missinig +functionality to ``pygccxml.declarations`` classes? There were few possible +solutions to the problem. The next one was implemented: 1. ``pygccxml.parser`` package interface was extendent. Instead of creating - a concrete instance of declaration class or type, ``pygccxml.parser`` package - uses factory. + a concrete instance of declaration class , ``pygccxml.parser`` package uses + factory. 2. ``pyplusplus.decl_wrappers`` package defines classes, that derives from ``pygccxml.declarations`` classes and defines the factory. @@ -146,6 +151,8 @@ `divide and conquer`_ paradigm. There are 2 different problems code generation engine should solve: +.. _`divide and conquer` : http://en.wikipedia.org/wiki/Divide_and_conquer_algorithm + * What code should be created in order to export a declaration? I mean what `boost.python`_ code should be generated if you want to export this @@ -161,15 +168,12 @@ Code creators and file writers provides solution to this problem. -.. _`divide and conquer` : http://en.wikipedia.org/wiki/Divide_and_conquer_algorithm - - Code creators ------------- Do you know how many ways exist to export member function? It is up to you to find the answer to the question. Please consider next function properties and -mix of them: +their mix: * function is non virtual, virtual or pure virtual @@ -181,14 +185,15 @@ * function could be overloaded -As you see, there are a lot of use cases. How does ``code creator``s solves the -problem? There is almost a direct mapping between ``code creator``s and use cases. +As you see, there are a lot of use cases. How does ``code creator`` solves the +problem? There is almost a direct mapping between ``code creator``'s and use cases. ``Code creator`` knows what code should be generated, in order to export a -declaration. That is the only job of ``code creator``s. For example: +declaration. That is the only job of ``code creator``. For example: * ``code_creators.enum_t`` generates registration code for an enumeration -* ``code_creators.indexing_suite2_t`` generates registration code for an stl container +* ``code_creators.indexing_suite2_t`` generates registration code for an stl + containers * ``code_creators.mem_fun_pv_t`` generates registration code for public, pure virtual function @@ -201,39 +206,57 @@ * ``code_creators.custom_text_t`` adds some custom( read user ) text\\code to the generated code -As you can see, there are primary 2 kinds of ``code creator``s: declaration based -and others. Declaration based creator generate code, that is needed to export the -declaration. There a lot of use cases, where in order to export a declaration, +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: in order to -export virtual function 3 ``code creator``s are built: +export virtual function 2 ``code creator``'s are built: ( I will reuse example from `boost.python`_ `tutorials`__.) .. __ : http://boost.org/libs/python/doc/tutorial/doc/html/python/exposing.html#python.virtual_functions_with_default_implementations -1. ``BaseWrap::f`` +1. ``BaseWrap::f``, ``BaseWrap::default_f`` - ``code_creators.mem_fun_v_wrapper_t`` -2. ``BaseWrap::default_f`` +2. ``f`` registration code - ``code_creators.mem_fun_v_t`` -3. ``f`` registration code - Reminder: classes, defined in ``pyplusplus.decl_wrappers`` package, are used as configuration to ``code creator``. So, ``code creator`` keeps reference to declaration and when it is requested to generate code, it does this according -to declaration configuration. +to the declaration configuration. -Now when you understand, what ``code creator`` is, it is a time to move on - composite -code creator. Composite code creator is a creator, that contains other creators. -For example: ``code_creators.class_t`` or ``code_creators.module_t``. They embed -the code created by internal code creators within the code they create. +Now when you understand, what ``code creator`` is, it is a time to move on - +composite code creator. Composite ``code creator`` is a creator, that contains +other creators. Composite ``code creator`` embeds the code, created by internal +``code creator``'s, within the code it creates. For example: +* ``code_creators.class_t``: + First of all it creates class registration code ( ``class_<...>`` ), after + this it appends to it code generated by internal creators. +* ``code_creators.module_body_t``: + Here is "cut & paste" of the relevant code from the source file: + :: + def _create_impl(self): + result = [] + result.append( "BOOST_PYTHON_MODULE(%s){" % self.name ) + result.append( compound.compound_t.create_internal_code( self.creators ) ) + result.append( "}" ) + return os.linesep.join( result ) +Sometimes, I will use termine ``code creators tree``. What is it? There is top +level ``code creator`` - ``code_creators.module_t``. It keeps reference to +other ``code creator``'s. It is also composite ``code creator``. All +``code creator``'s organized in a tree structure. + + + + .. _`pyplusplus` : ./../pyplusplus.html .. _`pygccxml` : ./../../pygccxml/pygccxml.html .. _`boost.python`: http://www.boost.org/libs/python/doc/index.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-10 06:38:49
|
Revision: 390 Author: roman_yakovenko Date: 2006-08-09 23:38:41 -0700 (Wed, 09 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=390&view=rev Log Message: ----------- adding answer to "How to automatically export template functions\\class?" Modified Paths: -------------- pyplusplus_dev/docs/documentation/how_to.rest Modified: pyplusplus_dev/docs/documentation/how_to.rest =================================================================== --- pyplusplus_dev/docs/documentation/how_to.rest 2006-08-09 12:50:32 UTC (rev 389) +++ pyplusplus_dev/docs/documentation/how_to.rest 2006-08-10 06:38:41 UTC (rev 390) @@ -128,6 +128,124 @@ For more information, please read the documentation. +------------------------------------------------------ +How to automatically export template functions\\class? +------------------------------------------------------ + +Lets say you have next C++ function: +:: + + //file point.h + +:: + + namespace geometry{ + +:: + + template< class T> + struct point_t{ + T x, y; + }; + +:: + + template <class T> + double distance( const point_t<T>& point ){ + return sqrt( point.x * point.x + point.y*point.y ); + } + +:: + + } //namespace geometry + + +You should understand, that you can not export template itself, but only its +instantiations. The solution is built using next facts: + +* ``sizeof( class name )`` causes a compiler to instantiate the class + +* free function invocation causes a compiler to instantiate the function + +Lets say that we need to exprort the class and the function template +instantiations for ``int`` and ``cutom_type`` types. There are few ways to do it. + +Simple and straightforward +-------------------------- + +Open your favorite editor and create a header file with the content: + +:: + + #include "point.h" + +:: + + namespace py_details{ + inline void instantiate(){ + using namespace geometry; + sizeof( point_t<int> ); + sizeof( point_t<cutom_type> ); + distance( point_t<int>(0,0) ); + distance( point_t<cutom_type>(0,0) ); + } + } + +Now, you add this file to the list of files you pass as input to +``module_builder_t.__init__`` method and excludes the ``py_details`` namespace +declarations from being exported: + +:: + + mb = module_builder_t( [..., just created file ], ... ) + mb.namespace( 'py_details' ).exclude() + +"Dynamic" instantiation +----------------------- + +Lets say you are less lucky than I, and you have to create ``X`` instantiations +of the class\\function. Obviously, the previous approach will not work for you. +The solution is to build your own code generator, that will generate code similar +to the one, in the previous paragragh. + +:: + + from module_builder import module_builder_t, create_text_fc + +:: + + def generate_instantiations_string( ... ): + ... + +:: + + code = generate_instantiations_string( ... ) + +:: + + mb = module_builder_t( [ ..., create_text_fc( code ) ], ... ) + mb.namespace( 'py_details' ).exclude() + + +`pyplusplus`_ 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`__. + +.. __ : ./../../pygccxml/design.html#parser-configuration-classes + + + +I understand that the provided solution is not perfect. I understand that something +better and simpler should be done, but a priority of this is low. There are few +tasks, that have much higher priority. Allen Bierbaum wants to fix the situation. +He created a `wiki page`_, that discuss possible solutions. Your contribution is +welcome too! + +.. _`wiki page` : https://realityforge.vrsource.org/view/PyppApi/TemplateSupport + + + .. _`pyplusplus` : ./../pyplusplus.html .. _`boost.python`: http://www.boost.org/libs/python/doc/index.html .. _`Python`: http://www.python.org This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-09 12:50:48
|
Revision: 389 Author: roman_yakovenko Date: 2006-08-09 05:50:32 -0700 (Wed, 09 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=389&view=rev Log Message: ----------- updating documentation Modified Paths: -------------- pyplusplus_dev/docs/documentation/architecture.rest pyplusplus_dev/docs/history/history.rest pyplusplus_dev/docs/links.rest Modified: pyplusplus_dev/docs/documentation/architecture.rest =================================================================== --- pyplusplus_dev/docs/documentation/architecture.rest 2006-08-09 06:06:50 UTC (rev 388) +++ pyplusplus_dev/docs/documentation/architecture.rest 2006-08-09 12:50:32 UTC (rev 389) @@ -168,7 +168,8 @@ ------------- Do you know how many ways exist to export member function? It is up to you to -find the answer to the question. Please consider next use cases: +find the answer to the question. Please consider next function properties and +mix of them: * function is non virtual, virtual or pure virtual @@ -178,20 +179,34 @@ * function could be an ``operator()`` or an ``operator[]`` -As you see, there are a lot of use cases. How does code creators solves the -problem? There is almost a direct mapping between code creators and use cases. -Code creator knows what code should be generated, in order to export this or that -declaration. That is the only job of code creators. For example: +* function could be overloaded -* ``code_creators.enum_t`` generates code, that will export named enum +As you see, there are a lot of use cases. How does ``code creator``s solves the +problem? There is almost a direct mapping between ``code creator``s and use cases. +``Code creator`` knows what code should be generated, in order to export a +declaration. That is the only job of ``code creator``s. For example: + +* ``code_creators.enum_t`` generates registration code for an enumeration -* ``code_creators.indexing_suite2_t`` generates code, that will export stl container +* ``code_creators.indexing_suite2_t`` generates registration code for an stl container -There are primary 2 kinds of code creators: declaration based and others. -Declaration based code creator creates code or part of it, that will export the -declaration. For example: in order to export virtual function, `pyplusplus`_ -creates 3 code creators: +* ``code_creators.mem_fun_pv_t`` generates registration code for public, pure + virtual function + +* ``code_creators.mem_fun_pv_wrapper_t`` generates declaration code for public, + pure virtual function + +* ``code_creators.include_t`` generates include directives +* ``code_creators.custom_text_t`` adds some custom( read user ) text\\code to + the generated code + +As you can see, there are primary 2 kinds of ``code creator``s: declaration based +and others. Declaration based creator generate 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: in order to +export virtual function 3 ``code creator``s are built: + ( I will reuse example from `boost.python`_ `tutorials`__.) .. __ : http://boost.org/libs/python/doc/tutorial/doc/html/python/exposing.html#python.virtual_functions_with_default_implementations @@ -202,7 +217,12 @@ 3. ``f`` registration code -Now when you understand, what code creator is, it is a time to move on - composite +Reminder: classes, defined in ``pyplusplus.decl_wrappers`` package, are used as +configuration to ``code creator``. So, ``code creator`` keeps reference to +declaration and when it is requested to generate code, it does this according +to declaration configuration. + +Now when you understand, what ``code creator`` is, it is a time to move on - composite code creator. Composite code creator is a creator, that contains other creators. For example: ``code_creators.class_t`` or ``code_creators.module_t``. They embed the code created by internal code creators within the code they create. Modified: pyplusplus_dev/docs/history/history.rest =================================================================== --- pyplusplus_dev/docs/history/history.rest 2006-08-09 06:06:50 UTC (rev 388) +++ pyplusplus_dev/docs/history/history.rest 2006-08-09 12:50:32 UTC (rev 389) @@ -22,8 +22,8 @@ 0.8.1 ----- -1. Georgiy Dernovoy contributed a patch, that allows `pyplusplus`_ GUI to save\load - last used header file. +1. Georgiy Dernovoy contributed a patch, that allows `pyplusplus`_ GUI to + save\\load last used header file. 2. `pyplusplus`_ improved a lot functionality related to providing feedback to user: Modified: pyplusplus_dev/docs/links.rest =================================================================== --- pyplusplus_dev/docs/links.rest 2006-08-09 06:06:50 UTC (rev 388) +++ pyplusplus_dev/docs/links.rest 2006-08-09 12:50:32 UTC (rev 389) @@ -11,14 +11,20 @@ Thanks to Allen Bierbaum `pyplusplus`_ now has `wiki`_. We use it primary to discuss new features, that will be introduced in future versions. +.. _`wiki` : https://realityforge.vrsource.org/view/PyppApi/WebHome + ------- Reading ------- * `Building Hybrid Systems with Boost.Python`_ + .. _`Building Hybrid Systems with Boost.Python` : http://www.boost-consulting.com/writing/bpl.html + * `A rationale for semantically enhanced library languages`_ + .. _`A rationale for semantically enhanced library languages` : http://www.research.att.com/~bs/SELLrationale.pdf + ".. A Semantically Enhanced Library Language (a SEL language or a SELL) is a dialect created by supersetting a language using a library and then subsetting the result using a tool that `understands` the syntax and semantics of both @@ -28,14 +34,43 @@ * `Aspect oriented programming`_ - + + .. _`Aspect oriented programming` : http://en.wikipedia.org/wiki/Aspect-oriented_programming + `pyplusplus`_ borrowed few ideas from this programming paradigm. +-------------- +Help resources +-------------- -.. _`Aspect oriented programming` : http://en.wikipedia.org/wiki/Aspect-oriented_programming -.. _`A rationale for semantically enhanced library languages` : http://www.research.att.com/~bs/SELLrationale.pdf -.. _`Building Hybrid Systems with Boost.Python` : http://www.boost-consulting.com/writing/bpl.html -.. _`wiki` : https://realityforge.vrsource.org/view/PyppApi/WebHome +* http://www.google.com :-) + +* http://boost.org/libs/python/doc/index.html - tutorials, FAQs, reference + manuals + +* `boost.python wiki`_ + + .. _`boost.python wiki` : http://wiki.python.org/moin/boost%2epython?action=show&redirect=boost+2epython + +* http://boost.cvs.sourceforge.net/boost/boost/libs/python/test/ - `boost.python`_ + unit tests. They could be very, very helpful. + +* http://svn.sourceforge.net/viewvc/pygccxml/pyplusplus_dev/unittests/ - `pyplusplus`_ + unit tests. They could be even more helpful! + +------------- +Mailing lists +------------- + +* `C++-sig`_ - development of Python/C++ bindings + + .. _`C++-sig` : http://mail.python.org/mailman/listinfo/c++-sig/ + +* `pyplusplus mailing list`_ + + .. _`pyplusplus mailing list` : http://sourceforge.net/mail/?group_id=118209 + +.. _`boost.python`: http://www.boost.org/libs/python/doc/index.html .. _`pyplusplus` : ./pyplusplus.html .. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-09 06:07:07
|
Revision: 388 Author: roman_yakovenko Date: 2006-08-08 23:06:50 -0700 (Tue, 08 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=388&view=rev Log Message: ----------- abstract classes could not have held_type Modified Paths: -------------- pyplusplus_dev/docs/documentation/architecture.rest pyplusplus_dev/pyplusplus/module_creator/creator.py pyplusplus_dev/unittests/data/smart_pointers_to_be_exported.cpp pyplusplus_dev/unittests/data/smart_pointers_to_be_exported.hpp pyplusplus_dev/unittests/smart_pointers_tester.py Modified: pyplusplus_dev/docs/documentation/architecture.rest =================================================================== --- pyplusplus_dev/docs/documentation/architecture.rest 2006-08-08 07:58:31 UTC (rev 387) +++ pyplusplus_dev/docs/documentation/architecture.rest 2006-08-09 06:06:50 UTC (rev 388) @@ -141,9 +141,79 @@ Code generation engine ---------------------- -Code generation for `boost.python`_ library is a difficult process. +Code generation for `boost.python`_ library is a difficult process. I don't know +what about you, but when I have to solve some complex task, I prefer to use +`divide and conquer`_ paradigm. There are 2 different problems code generation +engine should solve: +* What code should be created in order to export a declaration? + I mean what `boost.python`_ code should be generated if you want to export this + or that declaration. + + Code creators is the solution to this problem. + +* How it should be written to files? + + Remember, `pyplusplus`_ 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. + + +.. _`divide and conquer` : http://en.wikipedia.org/wiki/Divide_and_conquer_algorithm + + +Code creators +------------- + +Do you know how many ways exist to export member function? It is up to you to +find the answer to the question. Please consider next use cases: + +* function is non virtual, virtual or pure virtual + +* function is public, protected or private + +* function could be static + +* function could be an ``operator()`` or an ``operator[]`` + +As you see, there are a lot of use cases. How does code creators solves the +problem? There is almost a direct mapping between code creators and use cases. +Code creator knows what code should be generated, in order to export this or that +declaration. That is the only job of code creators. For example: + +* ``code_creators.enum_t`` generates code, that will export named enum + +* ``code_creators.indexing_suite2_t`` generates code, that will export stl container + +There are primary 2 kinds of code creators: declaration based and others. +Declaration based code creator creates code or part of it, that will export the +declaration. For example: in order to export virtual function, `pyplusplus`_ +creates 3 code creators: + +( I will reuse example from `boost.python`_ `tutorials`__.) + +.. __ : http://boost.org/libs/python/doc/tutorial/doc/html/python/exposing.html#python.virtual_functions_with_default_implementations + +1. ``BaseWrap::f`` + +2. ``BaseWrap::default_f`` + +3. ``f`` registration code + +Now when you understand, what code creator is, it is a time to move on - composite +code creator. Composite code creator is a creator, that contains other creators. +For example: ``code_creators.class_t`` or ``code_creators.module_t``. They embed +the code created by internal code creators within the code they create. + + + + + + + + .. _`pyplusplus` : ./../pyplusplus.html .. _`pygccxml` : ./../../pygccxml/pygccxml.html .. _`boost.python`: http://www.boost.org/libs/python/doc/index.html Modified: pyplusplus_dev/pyplusplus/module_creator/creator.py =================================================================== --- pyplusplus_dev/pyplusplus/module_creator/creator.py 2006-08-08 07:58:31 UTC (rev 387) +++ pyplusplus_dev/pyplusplus/module_creator/creator.py 2006-08-09 06:06:50 UTC (rev 388) @@ -405,8 +405,9 @@ , recursive=True ) registrators_db = [] for creator in class_creators: - if None is creator.held_type: - creator.held_type = self.__types_db.create_holder( creator.declaration ) + if None is creator.held_type: + if not creator.declaration.is_abstract: + creator.held_type = self.__types_db.create_holder( creator.declaration ) registrators = self.__types_db.create_registrators( creator ) for r in registrators: if not self._is_registered_smart_pointer_creator( r, registrators_db ): Modified: pyplusplus_dev/unittests/data/smart_pointers_to_be_exported.cpp =================================================================== --- pyplusplus_dev/unittests/data/smart_pointers_to_be_exported.cpp 2006-08-08 07:58:31 UTC (rev 387) +++ pyplusplus_dev/unittests/data/smart_pointers_to_be_exported.cpp 2006-08-09 06:06:50 UTC (rev 388) @@ -28,5 +28,17 @@ int const_ref_auto_base_value( const base_a_ptr& a ){ return a->get_base_value(); } int const_ref_shared_base_value( const base_s_ptr& a ){ return a->get_base_value(); } - + + +int ref_auto_some_value( base_a_ptr& a ){ return a->get_some_value(); } +int ref_shared_some_value( base_s_ptr& a ){ return a->get_some_value(); } + +int val_auto_some_value( base_a_ptr a ){ return a->get_some_value(); } +int val_shared_some_value( base_s_ptr a ){ return a->get_some_value(); } + +int const_ref_auto_some_value( const base_a_ptr& a ){ return a->get_some_value(); } +int const_ref_shared_some_value( const base_s_ptr& a ){ return a->get_some_value(); } + + + } Modified: pyplusplus_dev/unittests/data/smart_pointers_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/smart_pointers_to_be_exported.hpp 2006-08-08 07:58:31 UTC (rev 387) +++ pyplusplus_dev/unittests/data/smart_pointers_to_be_exported.hpp 2006-08-09 06:06:50 UTC (rev 388) @@ -13,13 +13,15 @@ struct base{ base() : base_value(19) {} int base_value; - virtual int get_base_value(){ return base_value; } + virtual int get_base_value(){ return base_value; } + virtual int get_some_value() = 0; }; struct data : base{ data() : value(11){} int value; - virtual int get_value(){ return value; } + virtual int get_value(){ return value; } + virtual int get_some_value(){ return 23; } }; typedef std::auto_ptr< base > base_a_ptr; @@ -48,7 +50,17 @@ int const_ref_auto_base_value( const base_a_ptr& a ); int const_ref_shared_base_value( const base_s_ptr& a ); - + +int ref_auto_some_value( base_a_ptr& a ); +int ref_shared_some_value( base_s_ptr& a ); + +int val_auto_some_value( base_a_ptr a ); +int val_shared_some_value( base_s_ptr a ); + +int const_ref_auto_some_value( const base_a_ptr& a ); +int const_ref_shared_some_value( const base_s_ptr& a ); + + } #endif//__smart_pointers_to_be_exported_hpp__ Modified: pyplusplus_dev/unittests/smart_pointers_tester.py =================================================================== --- pyplusplus_dev/unittests/smart_pointers_tester.py 2006-08-08 07:58:31 UTC (rev 387) +++ pyplusplus_dev/unittests/smart_pointers_tester.py 2006-08-09 06:06:50 UTC (rev 388) @@ -17,23 +17,42 @@ self , tester_t.EXTENSION_NAME , *args ) - + + def customize( self, mb ): + base = mb.class_( 'base' ) + #base.held_type = '' + + def create_py_derived( self, module ): + class py_derived_t( module.base ): + def __init__( self ): + module.base.__init__( self ) + + def get_some_value( self ): + return 28 + + return py_derived_t() + def run_tests( self, module): - da = module.create_auto() + da = module.create_auto() + py_derived = self.create_py_derived( module ) + self.failUnless( 11 == da.value ) ds = module.create_shared() self.failUnless( 11 == ds.value ) self.failUnless( 11 == module.ref_auto(da) ) - self.failUnless( 11 == module.ref_shared(ds) ) + self.failUnless( 11 == module.ref_shared(ds) ) + + #why? because in this case held type could not be set + #self.failUnless( 11 == module.ref_shared(py_derived) ) self.failUnless( 11 == module.val_auto(da) ) - self.failUnless( 11 == module.val_shared(ds) ) + self.failUnless( 11 == module.val_shared(ds) ) da = module.create_auto() self.failUnless( 11 == module.const_ref_auto(da) ) - self.failUnless( 11 == module.const_ref_shared(ds) ) + self.failUnless( 11 == module.const_ref_shared(ds) ) #TODO: find out why this fails #self.failUnless( 19 == module.ref_auto_base_value(da) ) @@ -42,13 +61,26 @@ da = module.create_auto() self.failUnless( 19 == module.const_ref_auto_base_value(da) ) - self.failUnless( 19 == module.const_ref_shared_base_value(ds) ) + self.failUnless( 19 == module.const_ref_shared_base_value(ds) ) + self.failUnless( 19 == module.const_ref_shared_base_value(py_derived) ) da = module.create_auto() self.failUnless( 19 == module.val_auto_base_value(da) ) - self.failUnless( 19 == module.val_shared_base_value(ds) ) - + self.failUnless( 19 == module.val_shared_base_value(ds) ) + self.failUnless( 19 == module.val_shared_base_value(py_derived) ) + + da = module.create_auto() + + self.failUnless( 23 == module.val_auto_some_value(da) ) + self.failUnless( 28 == module.val_shared_some_value(py_derived) ) + + da = module.create_auto() + + self.failUnless( 23 == module.const_ref_auto_some_value(da) ) + self.failUnless( 28 == module.const_ref_shared_some_value(py_derived) ) + + def create_suite(): suite = unittest.TestSuite() suite.addTest( unittest.makeSuite(tester_t)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-08 07:58:38
|
Revision: 387 Author: roman_yakovenko Date: 2006-08-08 00:58:31 -0700 (Tue, 08 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=387&view=rev Log Message: ----------- adding links to documentation Added Paths: ----------- pyplusplus_dev/docs/links.rest Added: pyplusplus_dev/docs/links.rest =================================================================== --- pyplusplus_dev/docs/links.rest (rev 0) +++ pyplusplus_dev/docs/links.rest 2006-08-08 07:58:31 UTC (rev 387) @@ -0,0 +1,47 @@ +===== +Links +===== + +.. contents:: Table of contents + +---- +Wiki +---- + +Thanks to Allen Bierbaum `pyplusplus`_ now has `wiki`_. We use it primary to +discuss new features, that will be introduced in future versions. + +------- +Reading +------- + +* `Building Hybrid Systems with Boost.Python`_ + +* `A rationale for semantically enhanced library languages`_ + + ".. A Semantically Enhanced Library Language (a SEL language or a SELL) is a + dialect created by supersetting a language using a library and then subsetting + the result using a tool that `understands` the syntax and semantics of both + the underlying language and the library. ..." + + `pyplusplus`_ + boost.python is a SELL! + + +* `Aspect oriented programming`_ + + `pyplusplus`_ borrowed few ideas from this programming paradigm. + + +.. _`Aspect oriented programming` : http://en.wikipedia.org/wiki/Aspect-oriented_programming +.. _`A rationale for semantically enhanced library languages` : http://www.research.att.com/~bs/SELLrationale.pdf +.. _`Building Hybrid Systems with Boost.Python` : http://www.boost-consulting.com/writing/bpl.html +.. _`wiki` : https://realityforge.vrsource.org/view/PyppApi/WebHome +.. _`pyplusplus` : ./pyplusplus.html + +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + End: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-07 10:50:45
|
Revision: 386 Author: roman_yakovenko Date: 2006-08-07 03:50:38 -0700 (Mon, 07 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=386&view=rev Log Message: ----------- introducing work around for enum registration order bug Modified Paths: -------------- pyplusplus_dev/pyplusplus/code_creators/calldef.py Modified: pyplusplus_dev/pyplusplus/code_creators/calldef.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/calldef.py 2006-08-07 09:57:39 UTC (rev 385) +++ pyplusplus_dev/pyplusplus/code_creators/calldef.py 2006-08-07 10:50:38 UTC (rev 386) @@ -58,7 +58,11 @@ if declarations.is_fundamental( arg_type_no_alias ) \ and declarations.is_integral( arg_type_no_alias ) \ and not arg.default_value.startswith( arg_type_no_alias.decl_string ): - result.append( '=(%s)(%s)' % ( arg_type_no_alias.decl_string, arg.default_value ) ) + result.append( '=(%s)(%s)' % ( arg_type_no_alias.decl_string, arg.default_value ) ) + elif declarations.is_enum( arg.type ): + #Work around for bug/missing functionality in boost.python. + #registration order + result.append( '=(long)(%s)' % arg.default_value ) else: result.append( '=%s' % arg.default_value ) else: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-07 09:57:46
|
Revision: 385 Author: roman_yakovenko Date: 2006-08-07 02:57:39 -0700 (Mon, 07 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=385&view=rev Log Message: ----------- fixing small bug Modified Paths: -------------- pyplusplus_dev/pyplusplus/file_writers/multiple_files.py Modified: pyplusplus_dev/pyplusplus/file_writers/multiple_files.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/multiple_files.py 2006-08-07 09:56:38 UTC (rev 384) +++ pyplusplus_dev/pyplusplus/file_writers/multiple_files.py 2006-08-07 09:57:39 UTC (rev 385) @@ -176,10 +176,12 @@ , self.create_header( class_creator.alias , self.create_function_code( function_name ) ) ) class_wrapper = None - decl_creators = class_creator.user_declarations[:] - if isinstance( class_creator, code_creators.class_t ) and class_creator.wrapper: - class_wrapper = class_creator.wrapper - decl_creators.append( class_creator.wrapper ) + decl_creators = [] + if isinstance( class_creator, code_creators.class_t ): + decl_creators.extend( class_creator.user_declarations ) + if class_creator.wrapper: + class_wrapper = class_creator.wrapper + decl_creators.append( class_creator.wrapper ) # Write the .cpp file... cpp_code = self.create_source( class_creator.alias @@ -210,8 +212,8 @@ """ try: self.split_class_impl( class_creator ) - except IOError, error: - msg = [ 'Failed to write code for class "%s" into file.' % class_creator.declaration.name ] + except IOError, error: + msg = [ 'Failed to write code for class "%s" into file.;' % class_creator.declaration.name ] msg.append( "May be the class name is too long?." ) msg.append( "Error: %s'" % str(error) ) self.logger.error( os.linesep.join( msg ) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-07 09:56:45
|
Revision: 384 Author: roman_yakovenko Date: 2006-08-07 02:56:38 -0700 (Mon, 07 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=384&view=rev Log Message: ----------- changing algorithm that splits class to multiple files: files are nor generated in the same directory Modified Paths: -------------- pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py Modified: pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py 2006-08-06 13:55:03 UTC (rev 383) +++ pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py 2006-08-07 09:56:38 UTC (rev 384) @@ -42,41 +42,11 @@ #, self.split_internal_member_variables ] - def split_class_impl( self, class_creator): - function_name = 'register_%s_class' % class_creator.alias - file_path = os.path.join( self.directory_path, class_creator.alias ) - # Write the .h file... - header_name = file_path + self.HEADER_EXT - self.write_file( header_name - , self.create_header( class_creator.alias - , self.create_function_code( function_name ) ) ) - class_wrapper = None - decl_creators = None - if isinstance( class_creator, code_creators.class_t ) and class_creator.wrapper: - class_wrapper = class_creator.wrapper - decl_creators = [ class_creator.wrapper ] - # Write the .cpp file... - cpp_code = self.create_source( class_creator.alias - , function_name - , [class_creator] - , decl_creators ) - self.write_file( file_path + self.SOURCE_EXT, cpp_code ) - if class_wrapper: - # The wrapper has already been written above, so replace the create() - # method with a new 'method' that just returns an empty string because - # this method is later called again for the main source file. - class_wrapper.create = lambda: '' - # Replace the create() method so that only the register() method is called - # (this is called later for the main source file). - class_creator.create = lambda: function_name +'();' - self.__include_creators.append( code_creators.include_t( header_name ) ) - self.split_header_names.append(header_name) - self.split_method_names.append(function_name) + def create_base_fname( self, class_creator, pattern ): + return "_%s__%s" % ( class_creator.alias, pattern ) def wrapper_header( self, class_creator ): - normalize = code_creators.include_directories_t.normalize - tmp = os.path.join( class_creator.alias, 'wrapper' + self.HEADER_EXT ) - return normalize( tmp ) + return self.create_base_fname( class_creator, 'wrapper' + self.HEADER_EXT ) def write_wrapper( self, class_creator ): answer = [] @@ -95,14 +65,13 @@ answer.append( class_creator.create_typedef_code() ) code = os.linesep.join( answer ) - wrapper_code = self.create_header( class_creator.alias + '_wrapper', code ) + wrapper_code = self.create_header( self.create_base_fname(class_creator, 'wrapper'), code ) header_file = os.path.join( self.directory_path, self.wrapper_header(class_creator) ) self.write_file( header_file, wrapper_code ) def split_internal_creators( self, class_creator, creators, pattern ): file_path = os.path.join( self.directory_path - , class_creator.alias - , pattern ) + , self.create_base_fname( class_creator, pattern ) ) function_name = 'register_%(cls_alias)s_%(pattern)s' \ % { 'cls_alias' : class_creator.alias, 'pattern' : pattern } @@ -126,7 +95,7 @@ source_code.append( self.extmodule.license.create() ) #relevant header file - head_headers = [ os.path.join( class_creator.alias, pattern + self.HEADER_EXT) ] + head_headers = [ self.create_base_fname( class_creator, pattern + self.HEADER_EXT ) ] source_code.append( self.create_include_code( creators, head_headers ) ) source_code.append( '' ) @@ -219,7 +188,6 @@ class_creator.declaration.always_expose_using_scope = True extmodule = class_creator.top_parent - self.create_dir( os.path.join( self.directory_path, class_creator.alias ) ) function_name = 'register_%s_class' % class_creator.alias file_path = os.path.join( self.directory_path, class_creator.alias ) @@ -237,11 +205,11 @@ if not pattern: continue if isinstance( pattern, str ): - tail_headers.append( os.path.join( class_creator.alias, pattern + self.HEADER_EXT ) ) + tail_headers.append( self.create_base_fname( class_creator, pattern + self.HEADER_EXT ) ) else: assert( isinstance( pattern, list ) ) for p in pattern: - tail_headers.append( os.path.join( class_creator.alias, p + self.HEADER_EXT ) ) + tail_headers.append( self.create_base_fname( class_creator, p + self.HEADER_EXT ) ) #writting source file source_code = [] if self.extmodule.license: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-06 13:55:10
|
Revision: 383 Author: roman_yakovenko Date: 2006-08-06 06:55:03 -0700 (Sun, 06 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=383&view=rev Log Message: ----------- updating architecture document Modified Paths: -------------- pyplusplus_dev/docs/documentation/architecture.rest Modified: pyplusplus_dev/docs/documentation/architecture.rest =================================================================== --- pyplusplus_dev/docs/documentation/architecture.rest 2006-08-05 18:35:09 UTC (rev 382) +++ pyplusplus_dev/docs/documentation/architecture.rest 2006-08-06 13:55:03 UTC (rev 383) @@ -9,18 +9,32 @@ ------------ This document will describe an architecture behind `pyplusplus`_. If you just -started with `pyplusplus`_ you don't have to read this document. +started with `pyplusplus`_ you don't have to read this document. + +--- +C++ +--- + +C++ is very powerful programming language. The power brings complexity. It is +not an easy task to parse C++ source files and to create in memory representation +of declarations tree. Lets say that I've managed to do it. It is not enough. +Declarations tree is worth nothing, if user is not able to explorer it, to run +queries against it, to find out traits of a declaration or a type. + +On the earlier stage of development, I realized, that all this functionality does +not belong to code generator and should be implemented out side of it. `pygccxml`_ +project was born. By the way, implementing all this functionality out side of +code generator, made it to be C++ parser independent. --------- -pygccxml --------- - -What is exactly `pygccxml`_ for `pyplusplus`_. `pygccxml`_ provides next services: +`pygccxml`_ provides next services: * definition of classes, that describe C++ declaration and types + * C++ source files parsing and caching functionality -* C++ class and type analizers( type traits ) +* C++ declaration and type analizers( type traits ) + + `pyplusplus`_ uses those services to: * extract declarations from source files @@ -37,24 +51,101 @@ * provide powerful query interface -In general, `pygccxml`_ does all dirty work. +pyplusplus & pygccxml integration +--------------------------------- ---------------------- -decl_wrappers package ---------------------- +In general `pygccxml`_ provides two main services "parsing" and "declarations tree". +`pyplusplus`_ uses different approaches to exposes those services to the user. -This is the most important package in `pyplusplus`_. Why? Because this package -contains interface, that configure code generator engine. For example +Parsing integration +------------------- +`pyplusplus`_ 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. This method takes all arguments needed to envoke "parsing" services. +This has been done to simplify usage of `pyplusplus`_. -pygccxml & decl_wrappers integration ------------------------------------- +Declarations tree integration +----------------------------- -Almost every class in the ``decl_wrappers`` package derives from relevant class -defined in ``pygccxml.declarations` package. +Declarations tree API consists from 3 parts: + +* interface definition: + + * ``declaration_t`` and all classes that derive from it + + * ``type_t`` and all classes that derive from it + +* type traits + +* query engine API + + +The user should be familiar with those part and relevant API. You may ask "why"? +The answer is simple: in my opinion, wrapping/hidding/modifying the API will not +give any value. + +The question I should answer is how this API integrated? Before I start to +explain, lets take a look on next source code: + +:: + + mb = module_builder_t( ... ) + +:: + + details = mb.namespace( 'details' ) + details.exclude() + + +What you see here, is an example of code, that will be\\is written in all projects +that use `pyplusplus`_: + +* find declaration(s) + +* apply code generator engine configuration changes + +What is the main point of this example? It is perfectly good, it makes a lot of +sence to the user to configure code generation engine using declarations tree +hierarchy. Now, I think you understand the problem: how does `pyplusplus`_ add +missinig functionality to ``pygccxml.declarations`` classes? There were few +possible solutions to the problem. `pyplusplus`_ implements the solution using +factory design pattern. + +1. ``pygccxml.parser`` package interface was extendent. Instead of creating + a concrete instance of declaration class or type, ``pygccxml.parser`` package + uses factory. + +2. ``pyplusplus.decl_wrappers`` package defines classes, that derives from + ``pygccxml.declarations`` classes and defines the factory. + +Also, this solution is not the simplest one, it provides an additional value to +the project: + +* code generation engine configuration and declarations tree are tightly coupled + +* all functionality provided by ``pygccxml.declarations`` and ``pygccxml.parser`` + packages is available for ``pyplusplus.decl_wrappers`` classes + +* classes defined in ``pyplusplus.decl_wrappers`` package implement next + functionality: + * setting reasonable defaults for code generation engine( call policies, + indexing suite, ... ) + + * provides user with additional information( warnings and hints ) + +* as a bonus, `pygccxml`_ remained to be stand-alone project +---------------------- +Code generation engine +---------------------- + +Code generation for `boost.python`_ library is a difficult process. + + .. _`pyplusplus` : ./../pyplusplus.html +.. _`pygccxml` : ./../../pygccxml/pygccxml.html .. _`boost.python`: http://www.boost.org/libs/python/doc/index.html .. _`Python`: http://www.python.org .. _`GCC-XML`: http://www.gccxml.org This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-05 18:35:15
|
Revision: 382 Author: roman_yakovenko Date: 2006-08-05 11:35:09 -0700 (Sat, 05 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=382&view=rev Log Message: ----------- updating examples Modified Paths: -------------- pyplusplus_dev/examples/pyboost_dev/dev/date_time/sconscript Modified: pyplusplus_dev/examples/pyboost_dev/dev/date_time/sconscript =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/date_time/sconscript 2006-08-05 18:33:36 UTC (rev 381) +++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/sconscript 2006-08-05 18:35:09 UTC (rev 382) @@ -25,7 +25,7 @@ def get_libs(): libs = [] if sys.platform == 'linux2': - libs.append('libboost_date_time-gcc-1_34') + libs.append('libboost_date_time-gcc-1_35') return libs def get_target(): @@ -41,9 +41,9 @@ , source=get_source_files() ) if sys.platform == 'win32': - boost_date_time_so_dll = os.path.join( date_time_settings.boost.libs, 'boost_date_time-vc71-mt-1_34.dll' ) + boost_date_time_so_dll = os.path.join( date_time_settings.boost.libs, 'boost_date_time-vc71-mt-1_35.dll' ) else: - boost_date_time_so_dll = os.path.join( date_time_settings.boost.libs, 'libboost_date_time-gcc-1_34.so' ) + boost_date_time_so_dll = os.path.join( date_time_settings.boost.libs, 'libboost_date_time-gcc-1_35.so' ) local_env.Install( '#pyboost/date_time', [_date_time_, boost_date_time_so_dll ] ) \ 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-05 18:33:46
|
Revision: 381 Author: roman_yakovenko Date: 2006-08-05 11:33:36 -0700 (Sat, 05 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=381&view=rev Log Message: ----------- updating documentation Modified Paths: -------------- pyplusplus_dev/docs/documentation/index.rest Added Paths: ----------- pyplusplus_dev/docs/documentation/architecture.rest Added: pyplusplus_dev/docs/documentation/architecture.rest =================================================================== --- pyplusplus_dev/docs/documentation/architecture.rest (rev 0) +++ pyplusplus_dev/docs/documentation/architecture.rest 2006-08-05 18:33:36 UTC (rev 381) @@ -0,0 +1,68 @@ +============ +Architecture +============ + +.. contents:: Table of contents + +------------ +Introduction +------------ + +This document will describe an architecture behind `pyplusplus`_. If you just +started with `pyplusplus`_ you don't have to read this document. + +-------- +pygccxml +-------- + +What is exactly `pygccxml`_ for `pyplusplus`_. `pygccxml`_ provides next services: + +* definition of classes, that describe C++ declaration and types +* C++ source files parsing and caching functionality +* C++ class and type analizers( type traits ) + +`pyplusplus`_ uses those services to: + +* extract declarations from source files + +* find out declaration default configuration: + + * call policies for functions + + * indexing suite parameters + + * generate warnings/hints + + * ... + +* provide powerful query interface + +In general, `pygccxml`_ does all dirty work. + +--------------------- +decl_wrappers package +--------------------- + +This is the most important package in `pyplusplus`_. Why? Because this package +contains interface, that configure code generator engine. For example + + +pygccxml & decl_wrappers integration +------------------------------------ + +Almost every class in the ``decl_wrappers`` package derives from relevant class +defined in ``pygccxml.declarations` package. + + +.. _`pyplusplus` : ./../pyplusplus.html +.. _`boost.python`: http://www.boost.org/libs/python/doc/index.html +.. _`Python`: http://www.python.org +.. _`GCC-XML`: http://www.gccxml.org + +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + End: Modified: pyplusplus_dev/docs/documentation/index.rest =================================================================== --- pyplusplus_dev/docs/documentation/index.rest 2006-08-03 13:33:06 UTC (rev 380) +++ pyplusplus_dev/docs/documentation/index.rest 2006-08-05 18:33:36 UTC (rev 381) @@ -13,10 +13,10 @@ How can you help? -* Lets face it: today it is not possible to use `pyplusplus`_ without looking - into source code sometimes. `pyplusplus`_ 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. +* Lets face it: today it is not possible to use `pyplusplus`_ without eventually + looking into source code. `pyplusplus`_ 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. * You are reading documentation and my English cause you to scream? Please, fix those errors and send me new version of the document. I will integrate the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-03 13:33:18
|
Revision: 380 Author: roman_yakovenko Date: 2006-08-03 06:33:06 -0700 (Thu, 03 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=380&view=rev Log Message: ----------- adding/updating documentation Modified Paths: -------------- pyplusplus_dev/docs/documentation/how_to.rest Added Paths: ----------- pyplusplus_dev/docs/documentation/hints.rest Added: pyplusplus_dev/docs/documentation/hints.rest =================================================================== --- pyplusplus_dev/docs/documentation/hints.rest (rev 0) +++ pyplusplus_dev/docs/documentation/hints.rest 2006-08-03 13:33:06 UTC (rev 380) @@ -0,0 +1,52 @@ +===== +Hints +===== + +.. contents:: Table of contents + +---------------------------------- +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. + +For example: +:: + + #include <vector> + +:: + + typedef std::vector< int > numbers; + +:: + + numbers generate_n(){ + ... + } + +`pyplusplus`_ will use "numbers" as Python class name: + +:: + + using boost::python; + class_< std::vector< int > >( "numbers" ) + ... + ; + +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 +.. _`boost.python`: http://www.boost.org/libs/python/doc/index.html +.. _`Python`: http://www.python.org +.. _`GCC-XML`: http://www.gccxml.org + +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + End: Modified: pyplusplus_dev/docs/documentation/how_to.rest =================================================================== --- pyplusplus_dev/docs/documentation/how_to.rest 2006-08-03 12:56:43 UTC (rev 379) +++ pyplusplus_dev/docs/documentation/how_to.rest 2006-08-03 13:33:06 UTC (rev 380) @@ -106,10 +106,28 @@ window = mb.class_( "window_t" ) window.member_function( "get_size" ).exclude() window.add_wrapper_code( wrapper_code ) - window.add_code( registration_code ) + window.registration_code( registration_code ) That's all. +------------------------------------------------------------ +Fatal error C1204:Compiler limit:internal structure overflow +------------------------------------------------------------ + +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 +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 registration code to few cpp files. + +For more information, please read the documentation. + + .. _`pyplusplus` : ./../pyplusplus.html .. _`boost.python`: http://www.boost.org/libs/python/doc/index.html .. _`Python`: http://www.python.org This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mb...@us...> - 2006-08-03 13:07:51
|
Revision: 379 Author: mbaas Date: 2006-08-03 05:56:43 -0700 (Thu, 03 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=379&view=rev Log Message: ----------- Derive the output name from the module name if the user didn't explicitly specify an output name. Modified Paths: -------------- pyplusplus_dev/contrib/pypp_api/pypp_api/modulebuilder.py Modified: pyplusplus_dev/contrib/pypp_api/pypp_api/modulebuilder.py =================================================================== --- pyplusplus_dev/contrib/pypp_api/pypp_api/modulebuilder.py 2006-08-03 06:45:08 UTC (rev 378) +++ pyplusplus_dev/contrib/pypp_api/pypp_api/modulebuilder.py 2006-08-03 12:56:43 UTC (rev 379) @@ -51,7 +51,7 @@ cacheFile = None, cacheDir = None, moduleName = None, - output = "bindings", + output = None, multiFile = False, useScope = False, maxArity = None, @@ -106,6 +106,13 @@ self.mCacheFile = cacheFile # File to use for caching gccxml output self.mCacheDir = cacheDir # Directory to use for caching self.mModuleName = moduleName # Name of the Python extension module + if output==None: + if moduleName==None: + output = "bindings" + else: + output = moduleName + if not multiFile: + output += ".cpp" self.mOutput = output # Output file or directory name self.mMultiFile = multiFile # Multi file flag self.mUseScope = useScope # Use scope This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-03 06:45:19
|
Revision: 378 Author: roman_yakovenko Date: 2006-08-02 23:45:08 -0700 (Wed, 02 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=378&view=rev Log Message: ----------- updating history 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-08-02 20:48:23 UTC (rev 377) +++ pygccxml_dev/docs/history/history.rest 2006-08-03 06:45:08 UTC (rev 378) @@ -17,9 +17,9 @@ * Georgiy Dernovoy * Darren Garnier ------------ -Development ------------ +----- +0.8.1 +----- 1. `pygccxml`_ has been ported to MacOS X. Many thanks to Darren Garnier! Modified: pyplusplus_dev/docs/history/history.rest =================================================================== --- pyplusplus_dev/docs/history/history.rest 2006-08-02 20:48:23 UTC (rev 377) +++ pyplusplus_dev/docs/history/history.rest 2006-08-03 06:45:08 UTC (rev 378) @@ -18,9 +18,9 @@ * Lakin Wecker * Georgiy Dernovoy -------- -Current -------- +----- +0.8.1 +----- 1. Georgiy Dernovoy contributed a patch, that allows `pyplusplus`_ GUI to save\load last used header file. @@ -45,6 +45,18 @@ 6. `pyplusplus`_ generates "stable" code. If header files were not changed, `pyplusplus`_ will not change any file. +7. Support for huge classes was added. `pyplusplus`_ 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. + +9. Generated source files include only header files you passes as an argument + to module builder. + +10. Bug fixes. + +11. Documentation was improved.. + ------------- Version 0.8.0 ------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-02 20:48:46
|
Revision: 377 Author: roman_yakovenko Date: 2006-08-02 13:48:23 -0700 (Wed, 02 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=377&view=rev Log Message: ----------- adding declraration user code feature Modified Paths: -------------- pyplusplus_dev/docs/documentation/inserting_code.rest pyplusplus_dev/pyplusplus/code_creators/class_declaration.py pyplusplus_dev/pyplusplus/code_creators/compound.py pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py pyplusplus_dev/pyplusplus/file_writers/multiple_files.py pyplusplus_dev/pyplusplus/module_creator/creator.py pyplusplus_dev/unittests/algorithms_tester.py pyplusplus_dev/unittests/module_body_tester.py Modified: pyplusplus_dev/docs/documentation/inserting_code.rest =================================================================== --- pyplusplus_dev/docs/documentation/inserting_code.rest 2006-08-02 12:46:56 UTC (rev 376) +++ pyplusplus_dev/docs/documentation/inserting_code.rest 2006-08-02 20:48:23 UTC (rev 377) @@ -39,7 +39,7 @@ * ``add_registration_code( self, code, tail=True )`` - This function will ass a code to the registration section. If you want to add + This function will add a code to the registration section. If you want to add the code to the head of the section, pass ``tail=False`` to the method. Example @@ -101,6 +101,10 @@ If you split your module to few files, `pyplusplus`_ 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 + code. If you have dependencies between code from declaration section and class + wrapper, consider to move declaration code to class wrapper. * ``add_registration_code( self, code, works_on_instance=True )`` Modified: pyplusplus_dev/pyplusplus/code_creators/class_declaration.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2006-08-02 12:46:56 UTC (rev 376) +++ pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2006-08-02 20:48:23 UTC (rev 377) @@ -86,7 +86,7 @@ scoped.scoped_t.__init__( self, declaration=class_inst ) self._wrapper = wrapper self.works_on_instance = False - self._declaration_ccs = [] + self._user_declarations = [] def _get_wrapper( self ): return self._wrapper @@ -95,9 +95,9 @@ wrapper = property( _get_wrapper, _set_wrapper ) @property - def declaration_code_creators( self ): + def user_declarations( self ): """ references to class declaration code creators. """ - return self._declaration_ccs + return self._user_declarations def _get_held_type(self): return self.declaration.held_type Modified: pyplusplus_dev/pyplusplus/code_creators/compound.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/compound.py 2006-08-02 12:46:56 UTC (rev 376) +++ pyplusplus_dev/pyplusplus/code_creators/compound.py 2006-08-02 20:48:23 UTC (rev 377) @@ -36,6 +36,20 @@ else: self._creators.append( creator ) + def adopt_creators( self, creators, index=None): + """Add a creators to the list of children creators. + + @param creators: list of creators object + @type creator: L{code_creator_t} + @param index: Desired position of the creator or None to append it to the end of the list + @type index: int + """ + for pos, creator in enumerate( creators ): + if index or index == 0: + self.adopt_creator( creator, index + pos ) + else: + self.adopt_creator( creator ) + def remove_creator( self, creator ): """Remove a children code creator object. Modified: pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py 2006-08-02 12:46:56 UTC (rev 376) +++ pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py 2006-08-02 20:48:23 UTC (rev 377) @@ -251,6 +251,11 @@ source_code.append( '' ) source_code.append( self.create_namespaces_code( [class_creator] ) ) + + for creator in class_creator.user_declarations: + source_code.append( '' ) + source_code.append( creator.create() ) + creator.create = lambda: '' # Write the register() function... source_code.append( '' ) Modified: pyplusplus_dev/pyplusplus/file_writers/multiple_files.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/multiple_files.py 2006-08-02 12:46:56 UTC (rev 376) +++ pyplusplus_dev/pyplusplus/file_writers/multiple_files.py 2006-08-02 20:48:23 UTC (rev 377) @@ -176,10 +176,11 @@ , self.create_header( class_creator.alias , self.create_function_code( function_name ) ) ) class_wrapper = None - decl_creators = None + decl_creators = class_creator.user_declarations[:] if isinstance( class_creator, code_creators.class_t ) and class_creator.wrapper: class_wrapper = class_creator.wrapper - decl_creators = [ class_creator.wrapper ] + decl_creators.append( class_creator.wrapper ) + # Write the .cpp file... cpp_code = self.create_source( class_creator.alias , function_name Modified: pyplusplus_dev/pyplusplus/module_creator/creator.py =================================================================== --- pyplusplus_dev/pyplusplus/module_creator/creator.py 2006-08-02 12:46:56 UTC (rev 376) +++ pyplusplus_dev/pyplusplus/module_creator/creator.py 2006-08-02 20:48:23 UTC (rev 377) @@ -414,19 +414,28 @@ registrators_db.append(r) def _append_user_code( self ): + find_classes = code_creators.creator_finder.find_by_class_instance + class_creators = find_classes( what=code_creators.class_t + , where=self.__extmodule.body.creators + , recursive=True ) + ctext_t = code_creators.custom_text_t - for creator in code_creators.make_flatten( self.__extmodule ): - if isinstance( creator, code_creators.class_t ): - for user_code in creator.declaration.registration_code: - creator.adopt_creator( - ctext_t( user_code.text - , works_on_instance=user_code.works_on_instance ) ) - elif isinstance( creator, code_creators.class_wrapper_t ): - for user_code in creator.declaration.wrapper_code: - creator.adopt_creator( ctext_t( user_code.text ) ) - else: - pass - + for cls_creator in class_creators: + cls_decl = cls_creator.declaration + #uc = user code + uc_creators = map( lambda uc: ctext_t( uc.text, uc.works_on_instance ) + , cls_decl.registration_code ) + cls_creator.adopt_creators( uc_creators ) + + uc_creators = map( lambda uc: ctext_t( uc.text ), cls_decl.wrapper_code ) + if uc_creators: + cls_creator.wrapper.adopt_creators( uc_creators ) + + uc_creators = map( lambda uc: ctext_t( uc.text ), cls_decl.declaration_code ) + insert_pos = self.__extmodule.creators.index( self.__module_body ) + self.__extmodule.adopt_creators( uc_creators, insert_pos ) + cls_creator.user_declarations.extend( uc_creators ) + def _treat_indexing_suite( self ): global INDEXING_SUITE_1_CONTAINERS global INDEXING_SUITE_2_CONTAINERS Modified: pyplusplus_dev/unittests/algorithms_tester.py =================================================================== --- pyplusplus_dev/unittests/algorithms_tester.py 2006-08-02 12:46:56 UTC (rev 376) +++ pyplusplus_dev/unittests/algorithms_tester.py 2006-08-02 20:48:23 UTC (rev 377) @@ -145,7 +145,9 @@ mb = module_builder.module_builder_t( [ module_builder.create_text_fc( self.CLASS_DEF ) ] , gccxml_path=autoconfig.gccxml.executable ) - mb.namespace( name='::tester' ).include() + mb.namespace( name='::tester' ).include() + X = mb.class_( 'X' ) + X.add_declaration_code( '//hello world' ) mb.build_code_creator('dummy') mb.split_module( autoconfig.build_dir, [ mb.class_( '::tester::X' ) ] ) Modified: pyplusplus_dev/unittests/module_body_tester.py =================================================================== --- pyplusplus_dev/unittests/module_body_tester.py 2006-08-02 12:46:56 UTC (rev 376) +++ pyplusplus_dev/unittests/module_body_tester.py 2006-08-02 20:48:23 UTC (rev 377) @@ -17,20 +17,23 @@ , tester_t.EXTENSION_NAME , *args ) - def customize(self, mb): + def customize(self, mb): + item = mb.class_( 'item_t' ) + item.include() + item.add_declaration_code( "int get11( const mb::item_t& item ){ return 11;}" ) + item.add_registration_code( 'def( "get11", &get11 )' ) + item.add_wrapper_code( '//this is wrapper code' ) + + mb.add_declaration_code( "int get1(){ return 1;} ") + mb.add_declaration_code( "//this is a comment", False ) + mb.add_registration_code( 'bp::def( "get1", &get1 );' ) + mb.add_registration_code( '//this is another comment', False ) + mb.build_code_creator( self.EXTENSION_NAME ) - mb.add_declaration_code( "int get1(){ return 1;} ") - mb.add_declaration_code( "//this is a comment", False ) - mb.add_registration_code( 'bp::def( "get1", &get1 );' ) - mb.add_registration_code( '//this is another comment', False ) - - item = mb.class_( 'item_t' ) - item.add_declaration_code( "int get11( const mb::item_t& item ){ return 11;}" ) - item.add_registration_code( 'def( "get11", &get11 )' ) - item.add_wrapper_code( '//this is wrapper code' ) def run_tests(self, module): self.failUnless( 1 == module.get1() ) + self.failUnless( 11 == module.item_t().get11() ) def create_suite(): suite = unittest.TestSuite() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-02 12:47:22
|
Revision: 376 Author: roman_yakovenko Date: 2006-08-02 05:46:56 -0700 (Wed, 02 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=376&view=rev Log Message: ----------- adding add_declaration_code functionality Modified Paths: -------------- pyplusplus_dev/docs/documentation/inserting_code.rest pyplusplus_dev/pyplusplus/code_creators/class_declaration.py pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py pyplusplus_dev/pyplusplus/module_creator/creator.py pyplusplus_dev/unittests/data/module_body_to_be_exported.hpp pyplusplus_dev/unittests/module_body_tester.py pyplusplus_dev/unittests/user_text_tester.py pyplusplus_dev/unittests/vector3_tester.py Modified: pyplusplus_dev/docs/documentation/inserting_code.rest =================================================================== --- pyplusplus_dev/docs/documentation/inserting_code.rest 2006-08-01 15:13:12 UTC (rev 375) +++ pyplusplus_dev/docs/documentation/inserting_code.rest 2006-08-02 12:46:56 UTC (rev 376) @@ -97,16 +97,11 @@ * ``add_declaration_code( self, code )`` - **Not implemented.** - - **Feedback is wanted.** - - **Please consider the relationship between this code and class wrapper code.** - This method will add the code to the declaration section within the module. - If you split your module to few files, `pyplusplus`_ will generate code, in a - way, that declarations you added, will be visible to registration code. + If you split your module to few files, `pyplusplus`_ will add this code to the + cpp file, class registration code will be written in. + * ``add_registration_code( self, code, works_on_instance=True )`` This method will add the code to the registration section of the class. Modified: pyplusplus_dev/pyplusplus/code_creators/class_declaration.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2006-08-01 15:13:12 UTC (rev 375) +++ pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2006-08-02 12:46:56 UTC (rev 376) @@ -85,13 +85,19 @@ def __init__(self, class_inst, wrapper=None ): scoped.scoped_t.__init__( self, declaration=class_inst ) self._wrapper = wrapper - self.works_on_instance = False + self.works_on_instance = False + self._declaration_ccs = [] def _get_wrapper( self ): return self._wrapper def _set_wrapper( self, new_wrapper ): self._wrapper = new_wrapper wrapper = property( _get_wrapper, _set_wrapper ) + + @property + def declaration_code_creators( self ): + """ references to class declaration code creators. """ + return self._declaration_ccs def _get_held_type(self): return self.declaration.held_type Modified: pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2006-08-01 15:13:12 UTC (rev 375) +++ pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2006-08-02 12:46:56 UTC (rev 376) @@ -90,8 +90,9 @@ self._held_type = None self._noncopyable = None self._wrapper_alias = self._generate_valid_name() + "_wrapper" - self._user_code = [] - self._wrapper_user_code = [] + self._registration_code = [] + self._declaration_code = [] + self._wrapper_code = [] self._null_constructor_body = '' self._copy_constructor_body = '' @@ -130,19 +131,31 @@ def _finalize_impl( self, error_behavior ): for decl in self.declarations: decl.finalize( error_behavior ) + + @property + def declaration_code( self ): + """ + List of strings, that contains valid C++ code, that will be added to + the class registration section + """ + return self._declaration_code + + @property + def registration_code( self ): + """ + List of strings, that contains valid C++ code, that will be added to + the class registration section + """ + return self._registration_code + + @property + def wrapper_code( self ): + """ + List of strings, that contains valid C++ code, that will be added to + the class wrapper. + """ + return self._wrapper_code - def _get_user_code( self ): - return self._user_code - def _set_user_code( self, value ): - self._user_code = value - user_code = property( _get_user_code, _set_user_code ) - - def _get_wrapper_user_code( self ): - return self._wrapper_user_code - def _set_wrapper_user_code( self, value ): - self._wrapper_user_code = value - wrapper_user_code = property( _get_wrapper_user_code, _set_wrapper_user_code ) - def _get_null_constructor_body(self): return self._null_constructor_body def _set_null_constructor_body(self, body): @@ -154,16 +167,21 @@ def _set_copy_constructor_body(self, body): self._copy_constructor_body = body copy_constructor_body = property( _get_copy_constructor_body, _set_copy_constructor_body ) + + def add_declaration_code( self, code ): + self.declaration_code.append( user_text.user_text_t( code ) ) - def add_code( self, code, works_on_instance=True ): + def add_registration_code( self, code, works_on_instance=True ): """works_on_instance: If true, the custom code can be applied directly to obj inst. Ex: ObjInst."CustomCode" """ - self.user_code.append( user_text.class_user_text_t( code, works_on_instance ) ) - + self.registration_code.append( user_text.class_user_text_t( code, works_on_instance ) ) + #preserving backward computability + add_code = add_registration_code + def add_wrapper_code( self, code ): - self.wrapper_user_code.append( user_text.user_text_t( code ) ) - + self.wrapper_code.append( user_text.user_text_t( code ) ) + def set_constructors_body( self, body ): """Sets the body for all constructors""" self.constructors().body = body Modified: pyplusplus_dev/pyplusplus/module_creator/creator.py =================================================================== --- pyplusplus_dev/pyplusplus/module_creator/creator.py 2006-08-01 15:13:12 UTC (rev 375) +++ pyplusplus_dev/pyplusplus/module_creator/creator.py 2006-08-02 12:46:56 UTC (rev 376) @@ -320,10 +320,10 @@ def _is_wrapper_needed(self, class_inst, exportable_members): if isinstance( self.curr_decl, declarations.class_t ) \ - and self.curr_decl.wrapper_user_code: + and self.curr_decl.wrapper_code: return True elif isinstance( self.curr_code_creator, declarations.class_t ) \ - and self.curr_code_creator.wrapper_user_code: + and self.curr_code_creator.wrapper_code: return True else: pass @@ -417,12 +417,12 @@ ctext_t = code_creators.custom_text_t for creator in code_creators.make_flatten( self.__extmodule ): if isinstance( creator, code_creators.class_t ): - for user_code in creator.declaration.user_code: + for user_code in creator.declaration.registration_code: creator.adopt_creator( ctext_t( user_code.text , works_on_instance=user_code.works_on_instance ) ) elif isinstance( creator, code_creators.class_wrapper_t ): - for user_code in creator.declaration.wrapper_user_code: + for user_code in creator.declaration.wrapper_code: creator.adopt_creator( ctext_t( user_code.text ) ) else: pass Modified: pyplusplus_dev/unittests/data/module_body_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/module_body_to_be_exported.hpp 2006-08-01 15:13:12 UTC (rev 375) +++ pyplusplus_dev/unittests/data/module_body_to_be_exported.hpp 2006-08-02 12:46:56 UTC (rev 376) @@ -5,6 +5,10 @@ #ifndef __module_body_to_be_exported_hpp__ #define __module_body_to_be_exported_hpp__ + +namespace mb{ + struct item_t{}; +} #endif//__module_body_to_be_exported_hpp__ Modified: pyplusplus_dev/unittests/module_body_tester.py =================================================================== --- pyplusplus_dev/unittests/module_body_tester.py 2006-08-01 15:13:12 UTC (rev 375) +++ pyplusplus_dev/unittests/module_body_tester.py 2006-08-02 12:46:56 UTC (rev 376) @@ -23,6 +23,11 @@ mb.add_declaration_code( "//this is a comment", False ) mb.add_registration_code( 'bp::def( "get1", &get1 );' ) mb.add_registration_code( '//this is another comment', False ) + + item = mb.class_( 'item_t' ) + item.add_declaration_code( "int get11( const mb::item_t& item ){ return 11;}" ) + item.add_registration_code( 'def( "get11", &get11 )' ) + item.add_wrapper_code( '//this is wrapper code' ) def run_tests(self, module): self.failUnless( 1 == module.get1() ) Modified: pyplusplus_dev/unittests/user_text_tester.py =================================================================== --- pyplusplus_dev/unittests/user_text_tester.py 2006-08-01 15:13:12 UTC (rev 375) +++ pyplusplus_dev/unittests/user_text_tester.py 2006-08-02 12:46:56 UTC (rev 376) @@ -20,7 +20,7 @@ def customize(self, mb ): data = mb.class_( 'data' ) class_code = "/*class code*/" - data.add_code( class_code, False ) + data.add_registration_code( class_code, False ) wrapper_code = "/*wrapper code*/" data.add_wrapper_code( wrapper_code ) mb.build_code_creator( self.EXTENSION_NAME ) Modified: pyplusplus_dev/unittests/vector3_tester.py =================================================================== --- pyplusplus_dev/unittests/vector3_tester.py 2006-08-01 15:13:12 UTC (rev 375) +++ pyplusplus_dev/unittests/vector3_tester.py 2006-08-02 12:46:56 UTC (rev 376) @@ -22,10 +22,10 @@ vec3 = mb.class_( 'Vector3' ) vec3.always_expose_using_scope = True #mb.calldefs().use_keywords = False - vec3.add_code( 'add_property( "val", &vector3::Vector3::val)' ) - vec3.add_code( 'add_property( "x", &vector3::Vector3::x)' ) - vec3.add_code( 'add_property( "y", &vector3::Vector3::y)' ) - vec3.add_code( 'add_property( "z", &vector3::Vector3::z)' ) + vec3.add_registration_code( 'add_property( "val", &vector3::Vector3::val)' ) + vec3.add_registration_code( 'add_property( "x", &vector3::Vector3::x)' ) + vec3.add_registration_code( 'add_property( "y", &vector3::Vector3::y)' ) + vec3.add_registration_code( 'add_property( "z", &vector3::Vector3::z)' ) def run_tests( self, module): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-08-01 15:13:23
|
Revision: 375 Author: roman_yakovenko Date: 2006-08-01 08:13:12 -0700 (Tue, 01 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=375&view=rev Log Message: ----------- updating documentation Modified Paths: -------------- pyplusplus_dev/docs/history/history.rest pyplusplus_dev/docs/pyplusplus.rest Modified: pyplusplus_dev/docs/history/history.rest =================================================================== --- pyplusplus_dev/docs/history/history.rest 2006-08-01 13:25:55 UTC (rev 374) +++ pyplusplus_dev/docs/history/history.rest 2006-08-01 15:13:12 UTC (rev 375) @@ -24,7 +24,27 @@ 1. Georgiy Dernovoy contributed a patch, that allows `pyplusplus`_ GUI to save\load last used header file. - + +2. `pyplusplus`_ 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 + +3. Support for boost.python indexing suite version 2 was implemented. + +4. Every code creator class took ``parent`` argument in ``__init__`` method. + This argument was removed. ``adopt_creator`` and ``remove_creator`` will + set\unset reference to parent. + +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. + ------------- Version 0.8.0 ------------- Modified: pyplusplus_dev/docs/pyplusplus.rest =================================================================== --- pyplusplus_dev/docs/pyplusplus.rest 2006-08-01 13:25:55 UTC (rev 374) +++ pyplusplus_dev/docs/pyplusplus.rest 2006-08-01 15:13:12 UTC (rev 375) @@ -14,9 +14,9 @@ Preamble -------- -This introduction will describe code generation process using `pyplusplus`_. +This introduction will describe code generation process using pyplusplus. I hope, that after you finished to read it, you will understand how powerful -`pyplusplus`_ is. +pyplusplus is. ----------------------- Code generation process @@ -24,20 +24,20 @@ `boost.python`_ library allows you to expose C++ code to `Python`_ in quick and elegant way. Almost the whole process of exposing declarations can be automated -by use of `pyplusplus`_. Code generation process, using `pyplusplus`_ consists +by use of pyplusplus. Code generation process, using pyplusplus consists from few steps. Next paragraphs will tell you more about every step. *"read declarations"* --------------------- -`pyplusplus`_ does not reinvent the wheel. `pyplusplus`_ uses `GCC C++ compiler`_ +pyplusplus does not reinvent the wheel. pyplusplus uses `GCC C++ compiler`_ to parse C++ source files. To be more precision, the tool chain looks like this: 1. source code is passed to `GCC-XML`_ 2. `GCC-XML`_ passes it to `GCC C++ compiler`_ 3. `GCC-XML`_ generates an XML description of a C++ program from GCC's internal representation. -4. `pyplusplus`_ uses `pygccxml`_ package to read `GCC-XML`_ generated file. +4. pyplusplus uses `pygccxml`_ package to read `GCC-XML`_ generated file. The bottom line - you can be sure, that all your declarations are read correctly. @@ -55,10 +55,10 @@ a question, what code should be written in order I get access from Python to that functionality -Of course, `pyplusplus`_ can not answer those question, but it provides maximum +Of course, pyplusplus can not answer those question, but it provides maximum help to implement an user requirements. -How can `pyplusplus`_ help you with first question? `pyplusplus`_ provides very +How can pyplusplus help you with first question? pyplusplus provides very powerful and simple query interface. For example in one line of code you can select all free functions that have @@ -88,16 +88,16 @@ the rules, that will continue to work even after exported C++ code was changed. It means that you don't have to change code generator source code every time. -So far, so good what about second question? Well, by default `pyplusplus`_ -generates a code that will satisfy almost all developers. `pyplusplus`_ relevant +So far, so good what about second question? Well, by default pyplusplus +generates a code that will satisfy almost all developers. pyplusplus relevant classes could be configured in many ways to satisfy your needs. But sometimes this is still not enough. There are use cases when you need full control over generated code. One of the biggest problems, with code generators in general, is modifying generated code and preserving changes. How many code generators did you use or know, that allow you to put your code any where or to reorder generated -code as you wish? `pyplusplus`_ allows you to do that. +code as you wish? pyplusplus allows you to do that. -`pyplusplus`_ introduces new concept: code creator and code creator's tree. +pyplusplus introduces new concept: code creator and code creator's tree. You can think about code creator's tree as some kind of `AST`_. The only difference is that code creator's tree has higher interface. For example ``include_t`` code creator is responsible to create C++ ``include`` directive code. You have full @@ -112,11 +112,11 @@ *"write code to files"* ----------------------- -During this step `pyplusplus`_ reads code creators tree and writes code to the +During this step pyplusplus reads code creators tree and writes code to the disc.The result of code generation process should not be different from the one, that would be achieved by human. For small project writing all code into single file is good approach, for big ones code should be written into multiple files. -`pyplusplus`_ implements both strategies. +pyplusplus implements both strategies. ------------- Features list This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mb...@us...> - 2006-08-01 13:26:01
|
Revision: 374 Author: mbaas Date: 2006-08-01 06:25:55 -0700 (Tue, 01 Aug 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=374&view=rev Log Message: ----------- Added some more documentation Modified Paths: -------------- pyplusplus_dev/contrib/pypp_api/pypp_api/argpolicy.py Modified: pyplusplus_dev/contrib/pypp_api/pypp_api/argpolicy.py =================================================================== --- pyplusplus_dev/contrib/pypp_api/pypp_api/argpolicy.py 2006-07-31 19:55:07 UTC (rev 373) +++ pyplusplus_dev/contrib/pypp_api/pypp_api/argpolicy.py 2006-08-01 13:25:55 UTC (rev 374) @@ -19,7 +19,7 @@ Before the code creator tree is created, setArgPolicy() has to be called on any method that requires this decoration. After the decoration is done and the code creator tree has been - built, the updateCreators() method has be called to update the tree. + built, the updateCreators() method has to be called to update the tree. Finally, the writeFiles() method can be called to write the additional wrapper files. """ @@ -210,20 +210,64 @@ # pass def prepareWrapper(self, wm): + """Wrapper initialization. + + This method is called before the actual wrapper source code is + generated. This is the place where you can modify the signature + of the C++ wrapper function or allocate local variables. + + @param wm: Wrapper manager instance + @type wm: WrapperManager + """ pass def preCall(self, wm): + """Generate the C++ code that should be executed before the actual function call. + + @param wm: Wrapper manager instance + @type wm: WrapperManager + """ pass def postCall(self, wm): + """Generate the C++ code that should be executed after the actual function call. + + @param wm: Wrapper manager instance + @type wm: WrapperManager + """ pass def cleanup(self, wm): + """Generate code that should be executed in the case of an error. + + This method has to assume that the preCall code was executed but + the postCall code won't be executed because something went wrong. + + <not used yet> + + @param wm: Wrapper manager instance + @type wm: WrapperManager + """ pass # Output class Output(ArgTransformerBase): + """Handles a single output variable. + + The specified variable is removed from the argument list and is turned + into a return value. + + void getSize(int& width, int& height) + -> + (width,height) = getSize() + """ + def __init__(self, idx): + """Constructor. + + @param idx: Index of the argument that is an output value (the first arg has index 1). + @type idx: int + """ ArgTransformerBase.__init__(self) self.idx = idx @@ -246,6 +290,13 @@ # InputArray class InputArray(ArgTransformerBase): + """Handle an input array with fixed size. + + void setVec3(double* v) + -> + setVec3(object v) # v must be a sequence with 3 floats + """ + def __init__(self, idx, size): ArgTransformerBase.__init__(self) self.idx = idx @@ -293,6 +344,13 @@ # OutputArray class OutputArray(ArgTransformerBase): + """Handle an output array with a fixed size. + + void getVec3(double* v) + -> + v = getVec3() # v will be a list with 3 floats + """ + def __init__(self, idx, size): ArgTransformerBase.__init__(self) self.idx = idx This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-07-31 19:55:21
|
Revision: 373 Author: roman_yakovenko Date: 2006-07-31 12:55:07 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=373&view=rev Log Message: ----------- changing adding code to class wrapper section Modified Paths: -------------- pyplusplus_dev/docs/documentation/inserting_code.rest Modified: pyplusplus_dev/docs/documentation/inserting_code.rest =================================================================== --- pyplusplus_dev/docs/documentation/inserting_code.rest 2006-07-31 07:20:38 UTC (rev 372) +++ pyplusplus_dev/docs/documentation/inserting_code.rest 2006-07-31 19:55:07 UTC (rev 373) @@ -150,22 +150,48 @@ Insert code to class wrapper ---------------------------- -I don't know what about you, but I don't like to create free functions in global -namespace. I prefer to add ``get_window_size`` function to ``window_t`` -`class wrapper`__. Class declaration exposes ``add_wrapper_code( self, code )`` -method. This method will add the code to the end of the class declaration. +There are use cases, when you have to add code to `class wrapper`_. Please take a +look on next thread: http://mail.python.org/pipermail/c++-sig/2006-June/010791.html . -Example -------- +.. _`class wrapper` : http://boost.org/libs/python/doc/tutorial/doc/html/python/exposing.html#python.class_virtual_functions + + +The short description is next: there are classes with parent/child relationship. +Parent keeps child class instances using raw pointer. When parent die, it also +destroys children classes. It is not an option to switch to ``boost::shared_ptr``. + +The solution Niall Douglas found was to implement small life time manager. For +this solution he needed: + +* to add to every constructor of class wrapper some code that registers the + instance of the class within the manager + +* to add to destructor of class wrapper some code, that will destroy the instance + if needed. + +* to add to class wrapper new variable + +Solution +-------- + :: + def inject_code( cls ): + constructors = cls.constructors() + constructors.body = class instance registration code + cls.null_constructor_body = class instance registration code + cls.copy_constructor_body = class instance registration code + + cls.add_wrapper_code( destructor declaration and definition code ) + cls.add_wrapper_code( the new class variable definition code ) + +:: + mb = module_builder_t( ... ) - window = mb.class_( 'window_t' ) - window.add_wrapper_code( get_window_size definition ) - window.add_registration_code( 'def( "get_size", &%s::get_window_size )' % window.wrapper_alias ) + for cls in mb.classes( relevant classes only ): + inject_code( cls ) -.. __ : http://boost.org/libs/python/doc/tutorial/doc/html/python/exposing.html#python.class_virtual_functions .. _`pyplusplus` : ./../pyplusplus.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-07-31 07:20:46
|
Revision: 372 Author: roman_yakovenko Date: 2006-07-31 00:20:38 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=372&view=rev Log Message: ----------- fixing spelling mistake Modified Paths: -------------- pyplusplus_dev/docs/documentation/inserting_code.rest Modified: pyplusplus_dev/docs/documentation/inserting_code.rest =================================================================== --- pyplusplus_dev/docs/documentation/inserting_code.rest 2006-07-31 07:06:09 UTC (rev 371) +++ pyplusplus_dev/docs/documentation/inserting_code.rest 2006-07-31 07:20:38 UTC (rev 372) @@ -1,6 +1,6 @@ -============= -Inerting code -============= +============== +Inserting code +============== .. contents:: Table of contents This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-07-31 07:06:18
|
Revision: 371 Author: roman_yakovenko Date: 2006-07-31 00:06:09 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=371&view=rev Log Message: ----------- updating pygccxml history Modified Paths: -------------- pygccxml_dev/docs/history/history.rest Modified: pygccxml_dev/docs/history/history.rest =================================================================== --- pygccxml_dev/docs/history/history.rest 2006-07-30 21:02:11 UTC (rev 370) +++ pygccxml_dev/docs/history/history.rest 2006-07-31 07:06:09 UTC (rev 371) @@ -21,8 +21,72 @@ Development ----------- -1. `pygccxml`_ has been ported to MacOS X. Many thanks to Darren Garnier! - +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 ----------- @@ -50,8 +114,6 @@ 8. Documentation has been updated/written/improved. -9. Native java types has been added to fundamental types. - ------------- Version 0.7.1 ------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-07-30 21:02:25
|
Revision: 370 Author: roman_yakovenko Date: 2006-07-30 14:02:11 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=370&view=rev Log Message: ----------- updating documentation Modified Paths: -------------- pygccxml_dev/docs/design.rest pyplusplus_dev/docs/documentation/index.rest pyplusplus_dev/docs/documentation/www_configuration.py Added Paths: ----------- pyplusplus_dev/docs/documentation/best_practices.rest Modified: pygccxml_dev/docs/design.rest =================================================================== --- pygccxml_dev/docs/design.rest 2006-07-30 20:55:48 UTC (rev 369) +++ pygccxml_dev/docs/design.rest 2006-07-30 21:02:11 UTC (rev 370) @@ -226,25 +226,32 @@ Cache classes ------------- -There are few cache classes, that implements different cache strategies. My -advise - don't use them. Your best choice is ``file_configuration_t``, -configured to C++ source file + `GCC-XML`_ generated file. +There are few cache classes, that implements different cache strategies. -* ``file_cache_t`` class, will save all declarations from all files within single - binary file. +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. -* ``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). +2. ``file_cache_t`` class, will save all declarations from all files within single + binary file. -As you can guess, ``directory_cache_t`` class gives much better performance, than +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 -------- Added: pyplusplus_dev/docs/documentation/best_practices.rest =================================================================== --- pyplusplus_dev/docs/documentation/best_practices.rest (rev 0) +++ pyplusplus_dev/docs/documentation/best_practices.rest 2006-07-30 21:02:11 UTC (rev 370) @@ -0,0 +1,107 @@ +============== +Best practices +============== + +.. contents:: Table of contents + +------------ +Introduction +------------ + +`pyplusplus`_ 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`_. + +------------ +Big projects +------------ + +Definition +---------- + +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 +for such projects. If you take a look `here`__ you will find few such projects, +that use `pyplusplus`_. + +.. __ : ./../../pygccxml/quotes.html + +Tips +---- + +* Create one header file, that will include all project header files. + + Doing it this way makes it so `GCC-XML`_ is only called once and it reduces the + overhead that would occur if you pass `GCC-XML`_ all the files individually. + Namely `GCC-XML`_ would have to run hundreds of times and each call would + actually end up including quite a bit of common code anyway. This way takes a + `GCC-XML`_ processing time from multiple hours with gigabytes of caches to a + couple minutes with a reasonable cache size. + + You can read more about different caches supported by `pygccxml`_ `here`__. + ``module_builder_t.__init__`` methods takes reference to an instance of cache + class or ``None``: + + :: + + from module_builder import * + mb = module_builder_t( ..., cache=file_cache_t( path to project cache file ), ... ) + +* Single header file, will also improve performance compiling the generated bindings. + + When `pyplusplus`_ 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 + take a great deal of time to compile it. Allen Bierbaum investigated this + problem. He found out that most of the time is really spent processing all the + headers, templates, macros from the project and from the boost library. So he + come to conclusion, that in order to improve compilation speed, user should + be able to control( to be able to generate ) precompiled header file. He + implemented an initial version of the functionality. After small discussion, + we agreed on next interface: + + :: + + class module_builder_t( ... ): + ... + def split_module( self, directory_path, huge_classes=None, precompiled_header=None ): + ... + ... + + ``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 + 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 + huge classes to few files: + + :: + + mb = module_builder_t( ... ) + ... + my_big_class = mb.class_( my_big_class ) + mb.split_module( ..., huge_classes=[my_big_class], ... ) + + +.. _`this error` : http://boost.org/libs/python/doc/v2/faq.html#c1204 +.. __ : ./../../pygccxml/design.html + + + +.. _`pyplusplus` : ./../pyplusplus.html +.. _`pygccxml` : ./../../pygccxml/pygccxml.html +.. _`boost.python`: http://www.boost.org/libs/python/doc/index.html +.. _`Python`: http://www.python.org +.. _`GCC-XML`: http://www.gccxml.org + +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + End: Modified: pyplusplus_dev/docs/documentation/index.rest =================================================================== --- pyplusplus_dev/docs/documentation/index.rest 2006-07-30 20:55:48 UTC (rev 369) +++ pyplusplus_dev/docs/documentation/index.rest 2006-07-30 21:02:11 UTC (rev 370) @@ -14,14 +14,16 @@ How can you help? * Lets face it: today it is not possible to use `pyplusplus`_ without looking - into source code. `pyplusplus`_ 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 and send it to me. + into source code sometimes. `pyplusplus`_ 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. * You are reading documentation and my English cause you to scream? Please, fix - those errors and send me new version of document. I will integrate the changes. - + those errors and send me new version of the document. I will integrate the + changes. +* Do you think, that the documentation is not clear, I will be glad to improve it, + just point me to the place. .. _`Epydoc` : http://epydoc.sourceforge.net/ .. _`pyplusplus` : ./../pyplusplus.html Modified: pyplusplus_dev/docs/documentation/www_configuration.py =================================================================== --- pyplusplus_dev/docs/documentation/www_configuration.py 2006-07-30 20:55:48 UTC (rev 369) +++ pyplusplus_dev/docs/documentation/www_configuration.py 2006-07-30 21:02:11 UTC (rev 370) @@ -5,4 +5,5 @@ , 'how_to' : 'how to ... ?' , 'doc_string' : 'documentation string' , 'inserting_code' : 'inserting code' + , 'best_practices' : 'best practices' } \ 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-07-30 20:59:55
|
Revision: 369 Author: roman_yakovenko Date: 2006-07-30 13:55:48 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=369&view=rev Log Message: ----------- updating examples Modified Paths: -------------- pyplusplus_dev/examples/pyboost_dev/dev/boost_random/generate_code.py pyplusplus_dev/examples/pyboost_dev/dev/crc/generate_code.py pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml pyplusplus_dev/examples/pyboost_dev/dev/rational/generate_code.py Modified: pyplusplus_dev/examples/pyboost_dev/dev/boost_random/generate_code.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/boost_random/generate_code.py 2006-07-30 14:04:45 UTC (rev 368) +++ pyplusplus_dev/examples/pyboost_dev/dev/boost_random/generate_code.py 2006-07-30 20:55:48 UTC (rev 369) @@ -134,7 +134,6 @@ extmodule.user_defined_directories.append( random_settings.boost.include ) extmodule.user_defined_directories.append( random_settings.working_dir ) extmodule.user_defined_directories.append( random_settings.generated_files_dir ) - extmodule.precompiled_header = 'boost/python.hpp' extmodule.replace_included_headers( ['boost/random.hpp', 'boost/nondet_random.hpp', 'random_export.hpp' ] ) def write_files( self ): Modified: pyplusplus_dev/examples/pyboost_dev/dev/crc/generate_code.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/crc/generate_code.py 2006-07-30 14:04:45 UTC (rev 368) +++ pyplusplus_dev/examples/pyboost_dev/dev/crc/generate_code.py 2006-07-30 20:55:48 UTC (rev 369) @@ -79,9 +79,7 @@ extmodule.user_defined_directories.append( crc_settings.boost.include ) extmodule.user_defined_directories.append( crc_settings.working_dir ) extmodule.user_defined_directories.append( crc_settings.generated_files_dir ) - extmodule.precompiled_header = 'boost/python.hpp' self.__mb.code_creator.replace_included_headers( ['boost/crc.hpp'] ) - #self.__mb.code_creator.add_namespace_usage( 'boost' ) def write_files( self ): self.__mb.write_module( os.path.join( crc_settings.generated_files_dir, 'crc.pypp.cpp' ) ) Modified: pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py 2006-07-30 14:04:45 UTC (rev 368) +++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py 2006-07-30 20:55:48 UTC (rev 369) @@ -162,7 +162,6 @@ extmodule.user_defined_directories.append( date_time_settings.working_dir ) extmodule.user_defined_directories.append( date_time_settings.generated_files_dir ) extmodule.license = customization_data.license - extmodule.precompiled_header = 'boost/python.hpp' extmodule.replace_included_headers( customization_data.includes ) self.beautify_code( mb ) Modified: pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml 2006-07-30 14:04:45 UTC (rev 368) +++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml 2006-07-30 20:55:48 UTC (rev 369) @@ -1,9 +1,9 @@ <?xml version="1.0"?> -<GCC_XML cvs_revision="1.112"> +<GCC_XML cvs_revision="1.113"> <Namespace id="_1" name="::" members="_3 _4 _5 _6 _7 _8 _9 _10 _11 _12 _13 _14 _15 _16 _17 _18 _19 _20 _21 _22 _23 _24 _25 _26 _27 _28 _29 _30 _31 _32 _33 _34 _35 _36 _37 _38 _39 _40 _41 _42 _43 _44 _45 _46 _47 _48 _49 _50 _51 _52 _53 _54 _55 _56 _57 _58 _59 _60 _61 _62 _63 _64 _65 _66 _67 _68 _69 _70 _71 _72 _73 _74 _75 _76 _77 _78 _79 _80 _81 _82 _83 _84 _85 _86 _87 _88 _89 _90 _91 _92 _93 _94 _95 _96 _97 _98 _99 _100 _101 _102 _103 _104 _105 _106 _107 _108 _109 _110 _111 _112 _113 _114 _115 _116 _117 _118 _119 _120 _121 _122 _123 _124 _125 _126 _127 _128 _129 _130 _131 _132 _133 _134 _135 _136 _137 _138 _139 _140 _141 _142 _143 _144 _145 _146 _147 _148 _149 _150 _151 _152 _153 _154 _155 _156 _157 _158 _159 _160 _161 _162 _163 _164 _165 _166 _167 _168 _169 _170 _171 _172 _173 _174 _175 _176 _177 _178 _179 _180 _181 _182 _183 _184 _185 _186 _187 _188 _189 _190 _191 _192 _193 _194 _195 _196 _197 _198 _199 _200 _201 _202 _203 _204 _205 _206 _207 _208 _209 _210 _211 _212 _213 _214 _215 _216 _217 _218 _219 _220 _221 _222 _223 _224 _225 _226 _227 _228 _229 _230 _231 _232 _233 _234 _235 _236 _237 _238 _239 _240 _241 _242 _243 _244 _245 _246 _247 _248 _249 _250 _251 _252 _253 _254 _255 _256 _257 _258 _259 _260 _261 _262 _263 _264 _265 _266 _267 _268 _269 _270 _271 _272 _273 _274 _275 _276 _277 _278 _279 _280 _281 _282 _283 _284 _285 _286 _287 _288 _289 _290 _291 _292 _293 _294 _295 _296 _297 _298 _299 _300 _301 _302 _303 _304 _305 _306 _307 _308 _309 _310 _311 _312 _313 _314 _315 _316 _317 _318 _319 _320 _321 _322 _323 _324 _325 _326 _327 _328 _329 _330 _331 _332 _333 _334 _335 _336 _337 _338 _339 _340 _341 _342 _343 _344 _345 _346 _347 _348 _349 _350 _351 _352 _353 _354 _355 _356 _357 _358 _359 _360 _361 _362 _363 _364 _365 _366 _367 _368 _369 _370 _371 _372 _373 _374 _375 _376 _377 _378 _379 _380 _381 _382 _383 _384 _385 _386 _387 _388 _389 _390 _391 _392 _393 _394 _395 _396 _397 _398 _399 _400 _401 _402 _403 _404 _405 _406 _407 _408 _409 _410 _411 _412 _413 _414 _415 _416 _417 _418 _419 _420 _421 _422 _423 _424 _425 _426 _427 _428 _429 _430 _431 _432 _433 _434 _435 _436 _437 _438 _439 _440 _441 _442 _443 _444 _445 _446 _447 _448 _449 _450 _451 _452 _453 _454 _455 _456 _457 _458 _459 _460 _461 _462 _463 _464 _465 _466 _467 _468 _469 _470 _471 _472 _473 _474 _475 _476 _477 _478 _479 _480 _482 _483 _484 _485 _486 _487 _488 _489 _490 _491 _492 _493 _494 _495 _496 _497 _498 _499 _501 _502 _503 _504 _505 _506 _508 _509 _510 _511 _512 _513 _514 _515 _516 _517 _518 _519 _520 _521 _522 _523 _524 _525 _526 _527 _528 _529 _530 _531 _532 _533 _534 _535 _536 _537 _538 _539 _540 _541 _542 _543 _544 _545 _546 _547 _548 _549 _550 _551 _552 _553 _554 _555 _556 _557 _558 _559 _560 _561 _562 _563 _564 _565 _566 _567 _568 _569 _570 _571 _572 _573 _574 _575 _576 _577 _578 _579 _580 _581 _582 _583 _584 _585 _586 _587 _588 _589 _590 _591 _592 _593 _594 _595 _596 _597 _598 _599 _600 _601 _602 _603 _604 _605 _606 _607 _608 _609 _610 _611 _612 _613 _614 _615 _616 _617 _618 _619 _621 _622 _623 _624 _625 _626 _627 _628 _629 _630 _631 _632 _633 _634 _635 _636 _638 _639 _640 _641 _642 _643 _644 _645 _646 _647 _648 _649 _650 _651 _652 _653 _654 _655 _656 _657 _658 _659 _660 _661 _662 _663 _664 _665 _666 _667 _668 _669 _670 _671 _672 _673 _674 _675 _676 _677 _678 _679 _680 _681 _682 _683 _684 _685 _686 _687 _688 _689 _690 _691 _692 _693 _694 _695 _696 _697 _698 _699 _700 _701 _702 _703 _704 _705 _706 _707 _708 _709 _710 _711 _712 _713 _714 _715 _716 _717 _718 _719 _720 _721 _722 _723 _724 _725 _726 _727 _728 _729 _730 _731 _732 _733 _734 _735 _736 _737 _738 _739 _740 _741 _742 _743 _744 _745 _746 _747 _748 _749 _750 _751 _752 _753 _754 _755 _756 _757 _758 _759 _760 _761 _762 _763 _764 _766 _767 _768 _769 _770 _771 _772 _773 _774 _775 _776 _777 _778 _779 _780 _781 _782 _783 _784 _785 _786 _787 _788 _789 _790 _791 _792 _793 _794 _795 _796 _797 _798 _799 _800 _801 _802 _803 _804 _805 _806 _807 _808 _809 _810 _811 _812 _813 _814 _815 _816 _817 _819 _820 _821 _823 _824 _825 _826 _827 _828 _829 _830 _831 _832 _833 _834 _835 _836 _837 _838 _839 _840 _841 _842 _843 _844 _845 _846 _847 _848 _849 _850 _851 _852 _853 _854 _855 _856 _857 _858 _859 _860 _861 _862 _863 _864 _865 _866 _867 _868 _869 _870 _871 _872 _873 _874 _875 _876 _877 _878 _879 _880 _881 _882 _883 _884 _885 _886 _887 _888 _889 _890 _891 _892 _893 _894 _895 _896 _897 _898 _899 _900 _901 _902 _903 _904 _905 _906 _907 _908 _909 _910 _911 _912 _913 _914 _915 _916 _917 _918 _919 _920 _921 _922 _923 _924 _925 _926 _927 _928 _929 _930 _931 _932 _933 _934 _935 _936 _937 _938 _939 _940 _941 _942 _943 _944 _945 _946 _947 _948 _949 _950 _951 _952 _953 _954 _955 _956 _957 _958 _959 _960 _961 _962 _963 _964 _965 _966 _967 _968 _969 _970 _971 _972 _973 _974 _975 _976 _977 _978 _979 _980 _981 _982 _983 _984 _985 _986 _987 _988 _989 _990 _991 _992 _993 _994 _995 _996 _997 _998 _999 _1000 _1001 _1002 _1003 _1005 _1006 _1007 _1008 _1009 _1010 _1011 _1012 _1013 _1014 _1015 _1016 _1017 _1018 _1019 _1020 _1021 _1022 _1023 _1024 _1025 _1026 _1027 _1028 _1029 _1030 _1031 _1032 _1033 _1034 _1035 _1036 _1037 _1038 _1039 _1040 _1041 _1042 _1043 _1044 _1045 _1046 _1047 _1048 _1049 _1050 _1051 _1052 _1053 _1054 _1055 _1056 _1057 _1058 _1059 _1060 _1061 _1062 _1063 _1064 _1065 _1066 _1067 _1068 _1069 _1070 _1071 _1072 _1073 _1074 _1075 _1076 _1077 _1078 _1079 _1080 _1081 _1082 _1083 _1084 _1085 _1086 _1087 _1088 _1089 _1090 _1091 _1092 _1093 _1094 _1095 _1096 _1097 _1098 _1099 _1100 _1101 _1102 _1103 _1104 _1106 _1108 _1110 _1111 _1112 _1113 _1114 _1115 _1116 _1117 _1118 _1119 _1120 _1121 _1122 _1123 _1124 _1125 _1126 _1127 _1128 _1129 _1130 _1131 _1132 _1133 _1135 _1134 _1137 _1139 _1141 _1143 _1144 _1145 _1146 _1147 _1148 _1149 _1150 _1151 _1152 _1153 _1155 _1156 _1157 _1158 _1160 _1161 _1163 _1164 _1166 _1167 _1169 _1171 _1173 _1175 _1177 _1179 _1181 _1183 _1185 _1186 _1187 _1188 _1189 _1190 _1191 _1105 _1107 _765 _1192 _1194 _1195 _1193 _1196 _1197 _1198 _1199 _1200 _1201 _1202 _1203 _1204 _1205 _1206 _1207 _1208 _1209 _1210 _1211 _1212 _1213 _1214 _1215 _1216 _1217 _1218 _1219 _1220 _1221 _1222 _1223 _1224 _1225 _1226 _1227 _1228 _1229 _1230 _1231 _1232 _1233 _1234 _1235 _1236 _1237 _1238 _1239 _1241 _1242 _1243 _1244 _1245 _1247 _1249 _1250 _1251 _1252 _1253 _1255 _1256 _1257 _1258 _1260 _1261 _1262 _1263 _1264 _1265 _1266 _1267 _1268 _1269 _1270 _1271 _1272 _1273 _1274 _1275 _1276 _1277 _1278 _1279 _1280 _1281 _1282 _1283 _1284 _1285 _1286 _1287 _1288 _1289 _1290 _1291 _1292 _1293 _1294 _1295 _1296 _1297 _1298 _1299 _1300 _1301 _1302 _1303 _1304 _1305 _1306 _1307 _1308 _1309 _1310 _1311 _1312 _1313 _1314 _1315 _1316 _1317 _1318 _1319 _1320 _1321 _1322 _1323 _1324 _1325 _1326 _1327 _1328 _1329 _1330 _1331 _1332 _1333 _1334 _1335 _1336 _1337 _1338 _1339 _1340 _1341 _1342 _1343 _1344 _1345 _1346 _1347 _1348 _1349 _1350 _1351 _1352 _1353 _1354 _1355 _1356 _1357 _1358 _1359 _1360 _1361 _1362 _1363 _1364 _1365 _1366 _1367 _1368 _1369 _1370 _1371 _1372 _1373 _1374 _1375 _1376 _1377 _1378 _1379 _1380 _1381 _1382 _1383 _1384 _1385 _1386 _1387 _1388 _1389 _1390 _1391 _1392 _1393 _1394 _1395 _1396 _1397 _1398 _1399 _1400 _1401 _1402 _1403 _1404 _1405 _1406 _1407 _1408 _1409 _1410 _1411 _1412 _1413 _1414 _1415 _1416 _1417 _1418 _1419 _1420 _1421 _1422 _1423 _1424 _1425 _1426 _1427 _1428 _1430 _1431 _1432 _1433 _1434 _1435 _1436 _1437 _1438 _1439 _1440 _1441 _1442 _1443 _1444 _1445 _1446 _1447 _1448 _1449 _1450 _1451 _1452 _1453 _1454 _1455 _1456 _1457 _1458 _1459 _1460 _1461 _1462 _1463 _1464 _1465 _1466 _1467 _1468 _1469 _1470 _1471 _1472 _1473 _1474 _1475 _1476 _1477 _1478 _1479 _1480 _1481 _1482 _1483 _1484 _1485 _1486 _1487 _1488 _1489 _1491 _1490 _1492 _1493 _818 _1494 _1495 _1496 _1497 _1499 _1498 _1501 _1502 _1503 _1504 _1505 _1506 _1507 _1508 _1509 _1510 _1512 _1513 _1514 _1515 _1516 _1517 _1518 _1519 _1520 _1521 _1522 _1523 _1525 _1524 _1526 _1527 _1528 _1529 _1530 _1531 _1532 _1533 _1534 _1535 _1536 _1537 _1538 _1539 _1540 _1541 _1542 _1543 _1544 _1545 _1546 _1547 _1548 _1549 _1550 _1551 _1552 _1553 _1554 _1555 _1556 _1557 _1558 _1559 _1560 _1562 _1563 _1564 _1565 _1566 _1567 _1568 _1569 _1570 _1571 _1573 _1574 _1575 _1576 _1577 _1578 _1579 _1580 _1581 _1582 _1583 _1584 _1585 _1586 _1587 _1588 _1589 _1590 _1591 _1592 _1593 _1594 _1561 _1595 _1596 _1597 _1598 _1599 _1600 _1601 _1602 _1603 _1604 _1605 _1606 _1607 _1608 _1609 _1610 _1611 _1612 _1613 _1614 _1615 _1616 _1617 _1618 _1619 _1620 _1621 _1622 _1623 _1624 _1625 _1626 _1627 _1628 _1629 _1630 _1631 _1632 _1633 _1634 _1635 _1636 _1637 _1638 _1639 _1640 _1641 _1642 _1643 _1644 _1645 _1646 _1647 _1648 _1649 _1650 _1651 _1652 _1653 _1654 _1655 _1656 _1657 _1658 _1659 _1660 _1661 _1662 _1663 _1664 _1665 _1666 _1667 _1668 _1669 _1670 _1671 _1672 _1673 _1674 _1675 _1676 _1677 _1678 _1679 _1680 _1681 _1682 _1683 _1684 _1685 _1686 _1687 _1688 _1689 _1690 _1691 _1692 _1693 _1694 _1695 _1696 _1697 _1698 _1699 _1700 _1701 _1702 _1703 _1704 _1705 _1706 _1707 _1708 _1709 _1710 _1711 _1712 _1713 _1714 _1715 _1716 _1717 _1718 _1719 _1720 _1721 _1722 _1723 _1724 _1725 _1726 _1727 _1728 _1729 _1730 _1731 _1732 _1733 _1734 _1735 _1736 _1737 _1738 _1739 _1740 _1741 _1742 _1743 _1744 _1745 _1746 _1747 _1748 _1749 _1750 _1751 _1752 _1753 _1754 _1755 _1756 _1757 _1758 _1759 _1760 _1761 _1762 _1763 _1764 _1765 _1766 _1767 _1768 _1769 _1770 _1771 _1772 _1773 _1774 _1775 _1776 _1777 _1778 _1779 _1780 _1781 _1782 _1783 _1784 _1785 _1786 _1787 _1788 _1789 _1790 _1791 _1792 _1793 _1794 _1795 _1796 _1797 _1798 _1799 _1800 _1801 _1802 _1803 _1804 _1805 _1806 _1807 _1808 _1809 _1810 _1811 _1812 _1813 _1814 _1815 _1816 _1817 _1818 _1819 _1820 _1821 _1822 _1823 _1824 _1825 _1826 _1827 _1828 _1829 _1830 _1831 _1832 _1833 _1834 _1835 _1836 _1837 _1838 _1839 _1840 _1841 _1842 _1843 _1844 _1845 _1846 _1847 _1848 _1849 _1850 " mangled="_Z2::" demangled="::"/> <Namespace id="_2" name="std" context="_1" members="_1852 _1853 _1854 _1855 _1856 _1857 _1858 _1859 _1860 _1861 _1862 _1863 _1864 _1865 _1866 _1867 _1868 _1869 _1870 _1871 _1872 _1873 _1874 _1875 _1876 _1877 _1878 _1879 _1880 _1881 _1882 _1883 _1884 _1885 _1886 _1887 _1888 _1889 _1890 _1891 _1892 _1893 _1894 _1895 _1896 _1897 _1898 _1899 _1900 _1901 _1906 _1907 _1912 _1913 _1926 _1927 _1932 _1933 _1938 _1939 _1940 _1941 _1942 _1943 _1944 _1945 _1946 _1947 _1948 _1962 _1963 _1964 _1965 _1966 _1967 _1968 _1969 _1970 _1971 _1974 _1979 _1980 _1981 _1982 _1987 _1988 _1989 _1990 _1993 _1994 _1995 _1996 _1997 _1998 _1999 _2000 _2001 _2002 _2003 _2012 _2013 _2014 _2045 _2054 _2055 _2056 _2057 _2058 _2059 _2060 _2061 _2062 _2063 _2064 _2065 _2066 _2067 _2068 _2069 _2070 _2071 _2072 _2073 _2074 _2075 _2076 _2077 _2078 _2079 _2080 _2081 _2082 _2083 _2084 _2085 _2086 _2087 _2088 _2089 _2090 _2091 _2092 _2093 _2094 _2095 _2096 _2097 _2098 _2099 _2100 _2106 _2107 _2148 _2149 _2150 _2168 _2169 _2209 _2211 _2212 _2213 _2274 _2287 _2296 _2313 _2314 _2319 _2321 _2322 _2323 _2330 _2331 _2332 _2455 _2456 _2457 _2458 _2459 _2460 _2461 _2462 _2463 _2465 _2467 _2469 _2471 _2473 _2475 _2477 _2479 _2481 _2483 _2485 _2487 _2489 _2491 _2493 _2495 _2497 _2499 _2501 _2503 _2505 _2507 _2509 _2511 _2513 _2515 _2516 _2521 _2522 _2523 _2524 _2525 _2526 _2527 _2528 _2529 _2530 _2531 _2532 _2533 _2534 _2536 _2537 _2538 _2539 _2540 _2541 _2542 _2543 _2544 _2546 _2548 _2567 _2568 _2569 _2570 _2571 _2572 _2573 _2574 _2575 _2638 _2639 _2640 _2641 _2642 _2643 _2644 _2653 _2654 _2655 " mangled="_Z3std" demangled="std"/> - <Function id="_3" name="_GLOBAL__D__home_roman_pygccxml_sources_sources_pyplusplus_dev_examples_pyboost_dev_dev_date_time_include_date_time.pypp.hppEAQ8Wa" returns="_1154" context="_1" location="f0:131" file="f0" line="131" endline="131"/> - <Function id="_4" name="_GLOBAL__I__home_roman_pygccxml_sources_sources_pyplusplus_dev_examples_pyboost_dev_dev_date_time_include_date_time.pypp.hppEAQ8Wa" returns="_1154" context="_1" location="f0:131" file="f0" line="131" endline="131"/> + <Function id="_3" name="_GLOBAL__D__home_roman_pygccxml_sources_sources_pyplusplus_dev_examples_pyboost_dev_dev_date_time_include_date_time.pypp.hppsxu6vd" returns="_1154" context="_1" location="f0:131" file="f0" line="131" endline="131"/> + <Function id="_4" name="_GLOBAL__I__home_roman_pygccxml_sources_sources_pyplusplus_dev_examples_pyboost_dev_dev_date_time_include_date_time.pypp.hppsxu6vd" returns="_1154" context="_1" location="f0:131" file="f0" line="131" endline="131"/> <Variable id="_5" name="_ZGVN5boost9date_time10date_facetINS_9gregorian4dateEcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE" type="_1248" context="_1" location="f1:372" file="f1" line="372" artificial="1"/> <Function id="_6" name="__static_initialization_and_destruction_0" returns="_1154" context="_1" mangled="_Z41__static_initialization_and_destruction_0ii" demangled="__static_initialization_and_destruction_0(int, int)" location="f0:131" file="f0" line="131" endline="76"> <Argument name="__initialize_p" type="_500" location="f0:131" file="f0" line="131"/> @@ -17,12 +17,12 @@ <Variable id="_12" name="_ZTSN5boost12bad_weak_ptrE" type="_2666c" init=""N5boost12bad_weak_ptrE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/> <Variable id="_13" name="_ZTSN5boost9gregorian9bad_monthE" type="_2668c" init=""N5boost9gregorian9bad_monthE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/> <Variable id="_14" name="_ZTSN5boost16bad_lexical_castE" type="_2670c" init=""N5boost16bad_lexical_castE"" context="_1" location="f0:131" file="f0" line="131" artificial="1"/> - <Variable id="_15" name="_ZTIs" type="_2672c" context="_1" location="f2:223" file="f2" line="223" extern="1" artificial="1"/> - <Function id="_16" name="__cxa_rethrow" returns="_1154" context="_1" location="f3:575" file="f3" line="575" extern="1"/> - <Variable id="_17" name="_ZTIx" type="_2672c" context="_1" location="f2:223" file="f2" line="223" extern="1" artificial="1"/> - <Variable id="_18" name="_ZTIi" type="_2672c" context="_1" location="f2:223" file="f2" line="223" extern="1" artificial="1"/> - <Variable id="_19" name="_ZTIt" type="_2672c" context="_1" location="f2:223" file="f2" line="223" extern="1" artificial="1"/> - <Variable id="_20" name="_ZTISs" type="_2674c" context="_1" location="f2:223" file="f2" line="223" extern="1" artificial="1"/> + <Variable id="_15" name="_ZTIs" type="_2672c" context="_1" location="f2:222" file="f2" line="222" extern="1" artificial="1"/> + <Variable id="_16" name="_ZTIx" type="_2672c" context="_1" location="f2:222" file="f2" line="222" extern="1" artificial="1"/> + <Variable id="_17" name="_ZTIi" type="_2672c" context="_1" location="f2:222" file="f2" line="222" extern="1" artificial="1"/> + <Variable id="_18" name="_ZTIt" type="_2672c" context="_1" location="f2:222" file="f2" line="222" extern="1" artificial="1"/> + <Variable id="_19" name="_ZTISs" type="_2674c" context="_1" location="f2:222" file="f2" line="222" extern="1" artificial="1"/> + <Function id="_20" name="__cxa_rethrow" returns="_1154" context="_1" location="f3:575" file="f3" line="575" extern="1"/> <Variable id="_21" name="_ZTIN5boost9date_time10date_facetINS_9gregorian4dateEcSt19ostreambuf_iteratorIcSt11char_traitsIcEEEE" type="_2676c" context="_1" location="f1:45" file="f1" line="45" extern="1" artificial="1"/> <Variable id="_22" name="_ZTIN5boost10local_time21custom_time_zone_baseIcEE" type="_2676c" context="_1" location="f4:29" file="f4" line="29" extern="1" artificial="1"/> <Variable id="_23" name="_ZTIN5boost10local_time20posix_time_zone_baseIcEE" type="_2676c" context="_1" location="f5:64" file="f5" line="64" extern="1" artificial="1"/> @@ -60,7 +60,7 @@ <EnumValue name="_POSIX_" init="2"/> <EnumValue name="_ISOC_" init="3"/> </Enumeration> - <Enumeration id="_50" name="._84" context="_1" location="f11:172" file="f11" line="172" artificial="1" size="32" align="32"> + <Enumeration id="_50" name="._92" context="_1" location="f11:172" file="f11" line="172" artificial="1" size="32" align="32"> <EnumValue name="FP_NAN" init="0"/> <EnumValue name="FP_INFINITE" init="1"/> <EnumValue name="FP_ZERO" init="2"/> @@ -1529,8 +1529,8 @@ <Variable id="_490" name="_ZTIN5boost9date_time18last_kday_of_monthINS_9gregorian4dateEEE" type="_2676c" context="_1" location="f16:315" file="f16" line="315" extern="1" artificial="1"/> <Variable id="_491" name="_ZTIN5boost9date_time20year_based_generatorINS_9gregorian4dateEEE" type="_2674c" context="_1" location="f16:31" file="f16" line="31" extern="1" artificial="1"/> <Variable id="_492" name="_ZTIN5boost17bad_function_callE" type="_2676c" context="_1" location="f17:572" file="f17" line="572" extern="1" artificial="1"/> - <Variable id="_493" name="_ZTIv" type="_2672c" context="_1" location="f2:44" file="f2" line="44" extern="1" artificial="1"/> - <Variable id="_494" name="_ZTIN5boost16bad_lexical_castE" type="_2676c" init="{__type_info_pseudo(), &_ZTISt8bad_cast}" context="_1" location="f2:41" file="f2" line="41" artificial="1"/> + <Variable id="_493" name="_ZTIv" type="_2672c" context="_1" location="f2:45" file="f2" line="45" extern="1" artificial="1"/> + <Variable id="_494" name="_ZTIN5boost16bad_lexical_castE" type="_2676c" init="{__type_info_pseudo(), &_ZTISt8bad_cast}" context="_1" location="f2:42" file="f2" line="42" artificial="1"/> <Function id="_495" name="futimes" returns="_500" throw="" context="_1" location="f18:147" file="f18" line="147" extern="1"> <Argument name="__fd" type="_500" location="f18:147" file="f18" line="147"/> <Argument name="__tvp" type="_2693" location="f18:147" file="f18" line="147"/> @@ -5606,90 +5606,90 @@ <Union id="_1655" name="wait" context="_1" mangled="4wait" demangled="wait" location="f73:68" file="f73" line="68" artificial="1" size="32" align="32" members="_3129 _3130 _3131 _3132 _3133 _3134 _3135 " bases=""/> <Typedef id="_1656" name="size_t" type="_822" context="_1" location="f57:214" file="f57" line="214"/> <Typedef id="_1657" name="ptrdiff_t" type="_500" context="_1" location="f57:152" file="f57" line="152"/> - <Function id="_1658" name="__builtin_cpowl" returns="_3136" context="_1" location="f74:128" file="f74" line="128" extern="1"> + <Function id="_1658" name="__builtin_cpowl" returns="_3136" context="_1" location="f74:134" file="f74" line="134" extern="1"> + <Argument type="_3136" location="f74:134" file="f74" line="134"/> + <Argument type="_3136" location="f74:134" file="f74" line="134"/> + </Function> + <Function id="_1659" name="__builtin_cpow" returns="_3137" context="_1" location="f74:133" file="f74" line="133" extern="1"> + <Argument type="_3137" location="f74:133" file="f74" line="133"/> + <Argument type="_3137" location="f74:133" file="f74" line="133"/> + </Function> + <Function id="_1660" name="__builtin_cpowf" returns="_3138" context="_1" location="f74:132" file="f74" line="132" extern="1"> + <Argument type="_3138" location="f74:132" file="f74" line="132"/> + <Argument type="_3138" location="f74:132" file="f74" line="132"/> + </Function> + <Function id="_1661" name="__builtin_ctanhl" returns="_3136" context="_1" location="f74:131" file="f74" line="131" extern="1"> + <Argument type="_3136" location="f74:131" file="f74" line="131"/> + </Function> + <Function id="_1662" name="__builtin_ctanh" returns="_3137" context="_1" location="f74:130" file="f74" line="130" extern="1"> + <Argument type="_3137" location="f74:130" file="f74" line="130"/> + </Function> + <Function id="_1663" name="__builtin_ctanhf" returns="_3138" context="_1" location="f74:129" file="f74" line="129" extern="1"> + <Argument type="_3138" location="f74:129" file="f74" line="129"/> + </Function> + <Function id="_1664" name="__builtin_ctanl" returns="_3136" context="_1" location="f74:128" file="f74" line="128" extern="1"> <Argument type="_3136" location="f74:128" file="f74" line="128"/> - <Argument type="_3136" location="f74:128" file="f74" line="128"/> </Function> - <Function id="_1659" name="__builtin_cpow" returns="_3137" context="_1" location="f74:127" file="f74" line="127" extern="1"> + <Function id="_1665" name="__builtin_ctan" returns="_3137" context="_1" location="f74:127" file="f74" line="127" extern="1"> <Argument type="_3137" location="f74:127" file="f74" line="127"/> - <Argument type="_3137" location="f74:127" file="f74" line="127"/> </Function> - <Function id="_1660" name="__builtin_cpowf" returns="_3138" context="_1" location="f74:126" file="f74" line="126" extern="1"> + <Function id="_1666" name="__builtin_ctanf" returns="_3138" context="_1" location="f74:126" file="f74" line="126" extern="1"> <Argument type="_3138" location="f74:126" file="f74" line="126"/> - <Argument type="_3138" location="f74:126" file="f74" line="126"/> </Function> - <Function id="_1661" name="__builtin_ctanhl" returns="_3136" context="_1" location="f74:125" file="f74" line="125" extern="1"> + <Function id="_1667" name="__builtin_csqrtl" returns="_3136" context="_1" location="f74:125" file="f74" line="125" extern="1"> <Argument type="_3136" location="f74:125" file="f74" line="125"/> </Function> - <Function id="_1662" name="__builtin_ctanh" returns="_3137" context="_1" location="f74:124" file="f74" line="124" extern="1"> + <Function id="_1668" name="__builtin_csqrt" returns="_3137" context="_1" location="f74:124" file="f74" line="124" extern="1"> <Argument type="_3137" location="f74:124" file="f74" line="124"/> </Function> - <Function id="_1663" name="__builtin_ctanhf" returns="_3138" context="_1" location="f74:123" file="f74" line="123" extern="1"> + <Function id="_1669" name="__builtin_csqrtf" returns="_3138" context="_1" location="f74:123" file="f74" line="123" extern="1"> <Argument type="_3138" location="f74:123" file="f74" line="123"/> </Function> - <Function id="_1664" name="__builtin_ctanl" returns="_3136" context="_1" location="f74:122" file="f74" line="122" extern="1"> + <Function id="_1670" name="__builtin_csinhl" returns="_3136" context="_1" location="f74:122" file="f74" line="122" extern="1"> <Argument type="_3136" location="f74:122" file="f74" line="122"/> </Function> - <Function id="_1665" name="__builtin_ctan" returns="_3137" context="_1" location="f74:121" file="f74" line="121" extern="1"> + <Function id="_1671" name="__builtin_csinh" returns="_3137" context="_1" location="f74:121" file="f74" line="121" extern="1"> <Argument type="_3137" location="f74:121" file="f74" line="121"/> </Function> - <Function id="_1666" name="__builtin_ctanf" returns="_3138" context="_1" location="f74:120" file="f74" line="120" extern="1"> + <Function id="_1672" name="__builtin_csinhf" returns="_3138" context="_1" location="f74:120" file="f74" line="120" extern="1"> <Argument type="_3138" location="f74:120" file="f74" line="120"/> </Function> - <Function id="_1667" name="__builtin_csqrtl" returns="_3136" context="_1" location="f74:119" file="f74" line="119" extern="1"> + <Function id="_1673" name="__builtin_csinl" returns="_3136" context="_1" location="f74:119" file="f74" line="119" extern="1"> <Argument type="_3136" location="f74:119" file="f74" line="119"/> </Function> - <Function id="_1668" name="__builtin_csqrt" returns="_3137" context="_1" location="f74:118" file="f74" line="118" extern="1"> + <Function id="_1674" name="__builtin_csin" returns="_3137" context="_1" location="f74:118" file="f74" line="118" extern="1"> <Argument type="_3137" location="f74:118" file="f74" line="118"/> </Function> - <Function id="_1669" name="__builtin_csqrtf" returns="_3138" context="_1" location="f74:117" file="f74" line="117" extern="1"> + <Function id="_1675" name="__builtin_csinf" returns="_3138" context="_1" location="f74:117" file="f74" line="117" extern="1"> <Argument type="_3138" location="f74:117" file="f74" line="117"/> </Function> - <Function id="_1670" name="__builtin_csinhl" returns="_3136" context="_1" location="f74:116" file="f74" line="116" extern="1"> + <Function id="_1676" name="__builtin_cexpl" returns="_3136" context="_1" location="f74:116" file="f74" line="116" extern="1"> <Argument type="_3136" location="f74:116" file="f74" line="116"/> </Function> - <Function id="_1671" name="__builtin_csinh" returns="_3137" context="_1" location="f74:115" file="f74" line="115" extern="1"> + <Function id="_1677" name="__builtin_cexp" returns="_3137" context="_1" location="f74:115" file="f74" line="115" extern="1"> <Argument type="_3137" location="f74:115" file="f74" line="115"/> </Function> - <Function id="_1672" name="__builtin_csinhf" returns="_3138" context="_1" location="f74:114" file="f74" line="114" extern="1"> + <Function id="_1678" name="__builtin_cexpf" returns="_3138" context="_1" location="f74:114" file="f74" line="114" extern="1"> <Argument type="_3138" location="f74:114" file="f74" line="114"/> </Function> - <Function id="_1673" name="__builtin_csinl" returns="_3136" context="_1" location="f74:113" file="f74" line="113" extern="1"> + <Function id="_1679" name="__builtin_ccoshl" returns="_3136" context="_1" location="f74:113" file="f74" line="113" extern="1"> <Argument type="_3136" location="f74:113" file="f74" line="113"/> </Function> - <Function id="_1674" name="__builtin_csin" returns="_3137" context="_1" location="f74:112" file="f74" line="112" extern="1"> + <Function id="_1680" name="__builtin_ccosh" returns="_3137" context="_1" location="f74:112" file="f74" line="112" extern="1"> <Argument type="_3137" location="f74:112" file="f74" line="112"/> </Function> - <Function id="_1675" name="__builtin_csinf" returns="_3138" context="_1" location="f74:111" file="f74" line="111" extern="1"> + <Function id="_1681" name="__builtin_ccoshf" returns="_3138" context="_1" location="f74:111" file="f74" line="111" extern="1"> <Argument type="_3138" location="f74:111" file="f74" line="111"/> </Function> - <Function id="_1676" name="__builtin_cexpl" returns="_3136" context="_1" location="f74:110" file="f74" line="110" extern="1"> + <Function id="_1682" name="__builtin_ccosl" returns="_3136" context="_1" location="f74:110" file="f74" line="110" extern="1"> <Argument type="_3136" location="f74:110" file="f74" line="110"/> </Function> - <Function id="_1677" name="__builtin_cexp" returns="_3137" context="_1" location="f74:109" file="f74" line="109" extern="1"> + <Function id="_1683" name="__builtin_ccos" returns="_3137" context="_1" location="f74:109" file="f74" line="109" extern="1"> <Argument type="_3137" location="f74:109" file="f74" line="109"/> </Function> - <Function id="_1678" name="__builtin_cexpf" returns="_3138" context="_1" location="f74:108" file="f74" line="108" extern="1"> + <Function id="_1684" name="__builtin_ccosf" returns="_3138" context="_1" location="f74:108" file="f74" line="108" extern="1"> <Argument type="_3138" location="f74:108" file="f74" line="108"/> </Function> - <Function id="_1679" name="__builtin_ccoshl" returns="_3136" context="_1" location="f74:107" file="f74" line="107" extern="1"> - <Argument type="_3136" location="f74:107" file="f74" line="107"/> - </Function> - <Function id="_1680" name="__builtin_ccosh" returns="_3137" context="_1" location="f74:106" file="f74" line="106" extern="1"> - <Argument type="_3137" location="f74:106" file="f74" line="106"/> - </Function> - <Function id="_1681" name="__builtin_ccoshf" returns="_3138" context="_1" location="f74:105" file="f74" line="105" extern="1"> - <Argument type="_3138" location="f74:105" file="f74" line="105"/> - </Function> - <Function id="_1682" name="__builtin_ccosl" returns="_3136" context="_1" location="f74:104" file="f74" line="104" extern="1"> - <Argument type="_3136" location="f74:104" file="f74" line="104"/> - </Function> - <Function id="_1683" name="__builtin_ccos" returns="_3137" context="_1" location="f74:103" file="f74" line="103" extern="1"> - <Argument type="_3137" location="f74:103" file="f74" line="103"/> - </Function> - <Function id="_1684" name="__builtin_ccosf" returns="_3138" context="_1" location="f74:102" file="f74" line="102" extern="1"> - <Argument type="_3138" location="f74:102" file="f74" line="102"/> - </Function> <Function id="_1685" name="__builtin_cargl" returns="_481" context="_1" location="f74:101" file="f74" line="101" extern="1"> <Argument type="_3136" location="f74:101" file="f74" line="101"/> </Function> @@ -5708,22 +5708,22 @@ <Function id="_1690" name="__builtin_cabsf" returns="_2689" context="_1" location="f74:96" file="f74" line="96" extern="1"> <Argument type="_3138" location="f74:96" file="f74" line="96"/> </Function> - <Function id="_1691" name="__builtin_popcountll" returns="_500" context="_1" location="f74:95" file="f74" line="95" extern="1"> + <Function id="_1691" name="__builtin_popcountll" returns="_500" context="_1" location="f74:107" file="f74" line="107" extern="1"> <Argument type="_1248" location="f74:95" file="f74" line="95"/> </Function> - <Function id="_1692" name="__builtin_popcountl" returns="_500" context="_1" location="f74:94" file="f74" line="94" extern="1"> + <Function id="_1692" name="__builtin_popcountl" returns="_500" context="_1" location="f74:106" file="f74" line="106" extern="1"> <Argument type="_1511" location="f74:94" file="f74" line="94"/> </Function> - <Function id="_1693" name="__builtin_popcount" returns="_500" context="_1" location="f74:93" file="f74" line="93" extern="1"> + <Function id="_1693" name="__builtin_popcount" returns="_500" context="_1" location="f74:105" file="f74" line="105" extern="1"> <Argument type="_500" location="f74:93" file="f74" line="93"/> </Function> - <Function id="_1694" name="__builtin_ctzll" returns="_500" context="_1" location="f74:92" file="f74" line="92" extern="1"> + <Function id="_1694" name="__builtin_ctzll" returns="_500" context="_1" location="f74:104" file="f74" line="104" extern="1"> <Argument type="_1248" location="f74:92" file="f74" line="92"/> </Function> - <Function id="_1695" name="__builtin_ctzl" returns="_500" context="_1" location="f74:91" file="f74" line="91" extern="1"> + <Function id="_1695" name="__builtin_ctzl" returns="_500" context="_1" location="f74:103" file="f74" line="103" extern="1"> <Argument type="_1511" location="f74:91" file="f74" line="91"/> </Function> - <Function id="_1696" name="__builtin_ctz" returns="_500" context="_1" location="f74:90" file="f74" line="90" extern="1"> + <Function id="_1696" name="__builtin_ctz" returns="_500" context="_1" location="f74:102" file="f74" line="102" extern="1"> <Argument type="_500" location="f74:90" file="f74" line="90"/> </Function> <Function id="_1697" name="__builtin_tanl" returns="_481" context="_1" location="f74:89" file="f74" line="89" extern="1"> @@ -6226,13 +6226,13 @@ </Function> <Namespace id="_1843" name="details" context="_1" members="_3139 " mangled="_Z7details" demangled="details"/> <Namespace id="_1844" name="pyplusplus" context="_1" members="_3140 _3141 " mangled="_Z10pyplusplus" demangled="pyplusplus"/> - <Namespace id="_1845" name="mpl_" context="_1" members="_3145 _3147 _3149 _3151 _3153 _3155 _3157 _3159 _3160 _3161 _3162 _3163 _3164 _3165 _3168 _3169 _3170 _3178 _3180 _3182 _3201 " mangled="_Z4mpl_" demangled="mpl_"/> - <Namespace id="_1846" name="__gnu_internal" context="_1" members="_3205 _3206 " mangled="_Z14__gnu_internal" demangled="__gnu_internal"/> - <Namespace id="_1847" name="__gnu_cxx" context="_1" members="_3218 _3219 _3220 _3221 _3254 _3255 _3256 _3257 " mangled="_Z9__gnu_cxx" demangled="__gnu_cxx"/> - <Namespace id="_1848" name="__gnu_debug" context="_1" members="_3258 " mangled="_Z11__gnu_debug" demangled="__gnu_debug"/> + <Namespace id="_1845" name="mpl_" context="_1" members="_3145 _3147 _3149 _3151 _3153 _3155 _3157 _3164 _3165 _3166 _3167 _3168 _3169 _3170 _3174 _3175 _3176 _3184 _3186 _3188 _3207 " mangled="_Z4mpl_" demangled="mpl_"/> + <Namespace id="_1846" name="__gnu_internal" context="_1" members="_3211 _3212 " mangled="_Z14__gnu_internal" demangled="__gnu_internal"/> + <Namespace id="_1847" name="__gnu_cxx" context="_1" members="_3224 _3225 _3226 _3227 _3260 _3261 _3262 _3263 " mangled="_Z9__gnu_cxx" demangled="__gnu_cxx"/> + <Namespace id="_1848" name="__gnu_debug" context="_1" members="_3264 " mangled="_Z11__gnu_debug" demangled="__gnu_debug"/> <Namespace id="_1849" name="__gnu_debug_def" context="_1" members="" mangled="_Z15__gnu_debug_def" demangled="__gnu_debug_def"/> - <Namespace id="_1850" name="boost" context="_1" members="_3259 _3260 _3261 _3262 _3263 _3264 _3265 _3266 _3267 _3268 _3269 _3270 _3271 _3272 _3273 _3274 _3289 _3290 _3292 _3293 _3294 _3295 _3296 _3328 _3329 _3330 _3331 _3332 _3333 _3343 _3370 _3385 _3424 _3425 _3426 _3427 _3428 _3429 _3598 _3716 _3718 _3721 _3722 _3723 _3724 _3725 _3726 _3727 _3728 _3729 _3730 _3736 _3788 _3789 _3790 _3791 _3792 _3793 _3794 _3795 _3796 _3797 _3798 _3799 _3800 _3801 _3802 _3803 _3804 _3805 " mangled="_Z5boost" demangled="boost"/> - <Class id="_1851" name="__basic_file<char>" context="_2" mangled="St12__basic_fileIcE" demangled="std::__basic_file<char>" location="f76:56" file="f76" line="56" artificial="1" size="64" align="32" members="_3806 _3807 _3808 _3809 _3810 _3811 _3812 _3813 _3814 _3815 _3816 _3817 _3818 _3819 _3820 _3821 _3822 _3823 " bases=""/> + <Namespace id="_1850" name="boost" context="_1" members="_3265 _3266 _3267 _3268 _3269 _3270 _3271 _3272 _3273 _3274 _3275 _3276 _3277 _3278 _3279 _3280 _3295 _3296 _3298 _3299 _3300 _3301 _3302 _3334 _3335 _3336 _3337 _3338 _3339 _3349 _3379 _3394 _3433 _3434 _3435 _3436 _3437 _3438 _3597 _3702 _3704 _3723 _3724 _3725 _3726 _3727 _3728 _3729 _3730 _3731 _3732 _3738 _3790 _3791 _3792 _3793 _3794 _3795 _3796 _3797 _3798 _3799 _3800 _3801 _3802 _3803 _3804 _3805 _3806 _3807 _3808 " mangled="_Z5boost" demangled="boost"/> + <Class id="_1851" name="__basic_file<char>" context="_2" mangled="St12__basic_fileIcE" demangled="std::__basic_file<char>" location="f76:56" file="f76" line="56" artificial="1" size="64" align="32" members="_3809 _3810 _3811 _3812 _3813 _3814 _3815 _3816 _3817 _3818 _3819 _3820 _3821 _3822 _3823 _3824 _3825 _3826 " bases=""/> <Function id="_1852" name="tanh" returns="_481" context="_2" mangled="_ZSt4tanhe" demangled="std::tanh(long double)" location="f77:431" file="f77" line="431" endline="431" inline="1"> <Argument name="__x" type="_481" location="f77:431" file="f77" line="431"/> </Function> @@ -6398,60 +6398,60 @@ <Function id="_1901" name="abs" returns="_2691" context="_2" mangled="_ZSt3absd" demangled="std::abs(double)" location="f77:89" file="f77" line="89" endline="89" inline="1"> <Argument name="__x" type="_2691" location="f77:89" file="f77" line="89"/> </Function> - <OperatorFunction id="_1902" name="<<" returns="_3824" context="_2" mangled="_ZStlsIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_St5_Setw" demangled="std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& std::operator<< <wchar_t, std::char_traits<wchar_t> >(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&, std::_Setw)" location="f78:260" file="f78" line="260" endline="262" extern="1" inline="1"> - <Argument name="__os" type="_3824" location="f78:260" file="f78" line="260"/> + <OperatorFunction id="_1902" name="<<" returns="_3827" context="_2" mangled="_ZStlsIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_St5_Setw" demangled="std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& std::operator<< <wchar_t, std::char_traits<wchar_t> >(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&, std::_Setw)" location="f78:260" file="f78" line="260" endline="262" extern="1" inline="1"> + <Argument name="__os" type="_3827" location="f78:260" file="f78" line="260"/> <Argument name="__f" type="_1907" location="f78:260" file="f78" line="260"/> </OperatorFunction> - <OperatorFunction id="_1903" name="<<" returns="_3825" context="_2" mangled="_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw" demangled="std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::_Setw)" location="f78:260" file="f78" line="260" endline="262" extern="1" inline="1"> - <Argument name="__os" type="_3825" location="f78:260" file="f78" line="260"/> + <OperatorFunction id="_1903" name="<<" returns="_3828" context="_2" mangled="_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw" demangled="std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::_Setw)" location="f78:260" file="f78" line="260" endline="262" extern="1" inline="1"> + <Argument name="__os" type="_3828" location="f78:260" file="f78" line="260"/> <Argument name="__f" type="_1907" location="f78:260" file="f78" line="260"/> </OperatorFunction> - <OperatorFunction id="_1904" name=">>" returns="_3826" context="_2" mangled="_ZStrsIwSt11char_traitsIwEERSt13basic_istreamIT_T0_ES6_St5_Setw" demangled="std::basic_istream<wchar_t, std::char_traits<wchar_t> >& std::operator>><wchar_t, std::char_traits<wchar_t> >(std::basic_istream<wchar_t, std::char_traits<wchar_t> >&, std::_Setw)" location="f78:252" file="f78" line="252" extern="1" inline="1"> - <Argument name="__is" type="_3826" location="f78:252" file="f78" line="252"/> + <OperatorFunction id="_1904" name=">>" returns="_3829" context="_2" mangled="_ZStrsIwSt11char_traitsIwEERSt13basic_istreamIT_T0_ES6_St5_Setw" demangled="std::basic_istream<wchar_t, std::char_traits<wchar_t> >& std::operator>><wchar_t, std::char_traits<wchar_t> >(std::basic_istream<wchar_t, std::char_traits<wchar_t> >&, std::_Setw)" location="f78:252" file="f78" line="252" extern="1" inline="1"> + <Argument name="__is" type="_3829" location="f78:252" file="f78" line="252"/> <Argument name="__f" type="_1907" location="f78:252" file="f78" line="252"/> </OperatorFunction> - <OperatorFunction id="_1905" name=">>" returns="_3827" context="_2" mangled="_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_St5_Setw" demangled="std::basic_istream<char, std::char_traits<char> >& std::operator>><char, std::char_traits<char> >(std::basic_istream<char, std::char_traits<char> >&, std::_Setw)" location="f78:252" file="f78" line="252" extern="1" inline="1"> - <Argument name="__is" type="_3827" location="f78:252" file="f78" line="252"/> + <OperatorFunction id="_1905" name=">>" returns="_3830" context="_2" mangled="_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_St5_Setw" demangled="std::basic_istream<char, std::char_traits<char> >& std::operator>><char, std::char_traits<char> >(std::basic_istream<char, std::char_traits<char> >&, std::_Setw)" location="f78:252" file="f78" line="252" extern="1" inline="1"> + <Argument name="__is" type="_3830" location="f78:252" file="f78" line="252"/> <Argument name="__f" type="_1907" location="f78:252" file="f78" line="252"/> </OperatorFunction> <Function id="_1906" name="setw" returns="_1907" context="_2" mangled="_ZSt4setwi" demangled="std::setw(int)" location="f78:243" file="f78" line="243" endline="247" inline="1"> <Argument name="__n" type="_500" location="f78:243" file="f78" line="243"/> </Function> - <Struct id="_1907" name="_Setw" context="_2" mangled="St5_Setw" demangled="std::_Setw" location="f78:232" file="f78" line="232" artificial="1" size="32" align="32" members="_3828 _3829 _3830 " bases=""/> - <OperatorFunction id="_1908" name="<<" returns="_3824" context="_2" mangled="_ZStlsIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision" demangled="std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& std::operator<< <wchar_t, std::char_traits<wchar_t> >(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&, std::_Setprecision)" location="f78:226" file="f78" line="226" extern="1" inline="1"> - <Argument name="__os" type="_3824" location="f78:226" file="f78" line="226"/> + <Struct id="_1907" name="_Setw" context="_2" mangled="St5_Setw" demangled="std::_Setw" location="f78:232" file="f78" line="232" artificial="1" size="32" align="32" members="_3831 _3832 _3833 " bases=""/> + <OperatorFunction id="_1908" name="<<" returns="_3827" context="_2" mangled="_ZStlsIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision" demangled="std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& std::operator<< <wchar_t, std::char_traits<wchar_t> >(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&, std::_Setprecision)" location="f78:226" file="f78" line="226" extern="1" inline="1"> + <Argument name="__os" type="_3827" location="f78:226" file="f78" line="226"/> <Argument name="__f" type="_1913" location="f78:226" file="f78" line="226"/> </OperatorFunction> - <OperatorFunction id="_1909" name="<<" returns="_3825" context="_2" mangled="_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision" demangled="std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::_Setprecision)" location="f78:226" file="f78" line="226" extern="1" inline="1"> - <Argument name="__os" type="_3825" location="f78:226" file="f78" line="226"/> + <OperatorFunction id="_1909" name="<<" returns="_3828" context="_2" mangled="_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision" demangled="std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::_Setprecision)" location="f78:226" file="f78" line="226" extern="1" inline="1"> + <Argument name="__os" type="_3828" location="f78:226" file="f78" line="226"/> <Argument name="__f" type="_1913" location="f78:226" file="f78" line="226"/> </OperatorFunction> - <OperatorFunction id="_1910" name=">>" returns="_3826" context="_2" mangled="_ZStrsIwSt11char_traitsIwEERSt13basic_istreamIT_T0_ES6_St13_Setprecision" demangled="std::basic_istream<wchar_t, std::char_traits<wchar_t> >& std::operator>><wchar_t, std::char_traits<wchar_t> >(std::basic_istream<wchar_t, std::char_traits<wchar_t> >&, std::_Setprecision)" location="f78:218" file="f78" line="218" extern="1" inline="1"> - <Argument name="__is" type="_3826" location="f78:218" file="f78" line="218"/> + <OperatorFunction id="_1910" name=">>" returns="_3829" context="_2" mangled="_ZStrsIwSt11char_traitsIwEERSt13basic_istreamIT_T0_ES6_St13_Setprecision" demangled="std::basic_istream<wchar_t, std::char_traits<wchar_t> >& std::operator>><wchar_t, std::char_traits<wchar_t> >(std::basic_istream<wchar_t, std::char_traits<wchar_t> >&, std::_Setprecision)" location="f78:218" file="f78" line="218" extern="1" inline="1"> + <Argument name="__is" type="_3829" location="f78:218" file="f78" line="218"/> <Argument name="__f" type="_1913" location="f78:218" file="f78" line="218"/> </OperatorFunction> - <OperatorFunction id="_1911" name=">>" returns="_3827" context="_2" mangled="_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_St13_Setprecision" demangled="std::basic_istream<char, std::char_traits<char> >& std::operator>><char, std::char_traits<char> >(std::basic_istream<char, std::char_traits<char> >&, std::_Setprecision)" location="f78:218" file="f78" line="218" extern="1" inline="1"> - <Argument name="__is" type="_3827" location="f78:218" file="f78" line="218"/> + <OperatorFunction id="_1911" name=">>" returns="_3830" context="_2" mangled="_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_St13_Setprecision" demangled="std::basic_istream<char, std::char_traits<char> >& std::operator>><char, std::char_traits<char> >(std::basic_istream<char, std::char_traits<char> >&, std::_Setprecision)" location="f78:218" file="f78" line="218" extern="1" inline="1"> + <Argument name="__is" type="_3830" location="f78:218" file="f78" line="218"/> <Argument name="__f" type="_1913" location="f78:218" file="f78" line="218"/> </OperatorFunction> <Function id="_1912" name="setprecision" returns="_1913" context="_2" mangled="_ZSt12setprecisioni" demangled="std::setprecision(int)" location="f78:209" file="f78" line="209" endline="213" inline="1"> <Argument name="__n" type="_500" location="f78:209" file="f78" line="209"/> </Function> - <Struct id="_1913" name="_Setprecision" context="_2" mangled="St13_Setprecision" demangled="std::_Setprecision" location="f78:198" file="f78" line="198" artificial="1" size="32" align="32" members="_3831 _3832 _3833 " bases=""/> - <OperatorFunction id="_1914" name="<<" returns="_3824" context="_2" mangled="_ZStlsIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E" demangled="std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& std::operator<< <wchar_t, std::char_traits<wchar_t> >(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&, std::_Setfill<wchar_t>)" location="f78:192" file="f78" line="192" endline="194" extern="1" inline="1"> - <Argument name="__os" type="_3824" location="f78:192" file="f78" line="192"/> + <Struct id="_1913" name="_Setprecision" context="_2" mangled="St13_Setprecision" demangled="std::_Setprecision" location="f78:198" file="f78" line="198" artificial="1" size="32" align="32" members="_3834 _3835 _3836 " bases=""/> + <OperatorFunction id="_1914" name="<<" returns="_3827" context="_2" mangled="_ZStlsIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E" demangled="std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& std::operator<< <wchar_t, std::char_traits<wchar_t> >(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&, std::_Setfill<wchar_t>)" location="f78:192" file="f78" line="192" endline="194" extern="1" inline="1"> + <Argument name="__os" type="_3827" location="f78:192" file="f78" line="192"/> <Argument name="__f" type="_1920" location="f78:192" file="f78" line="192"/> </OperatorFunction> - <OperatorFunction id="_1915" name="<<" returns="_3825" context="_2" mangled="_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E" demangled="std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::_Setfill<char>)" location="f78:192" file="f78" line="192" endline="194" extern="1" inline="1"> - <Argument name="__os" type="_3825" location="f78:192" file="f78" line="192"/> + <OperatorFunction id="_1915" name="<<" returns="_3828" context="_2" mangled="_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E" demangled="std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::_Setfill<char>)" location="f78:192" file="f78" line="192" endline="194" extern="1" inline="1"> + <Argument name="__os" type="_3828" location="f78:192" file="f78" line="192"/> <Argument name="__f" type="_1921" location="f78:192" file="f78" line="192"/> </OperatorFunction> - <OperatorFunction id="_1916" name=">>" returns="_3826" context="_2" mangled="_ZStrsIwSt11char_traitsIwEERSt13basic_istreamIT_T0_ES6_St8_SetfillIS3_E" demangled="std::basic_istream<wchar_t, std::char_traits<wchar_t> >& std::operator>><wchar_t, std::char_traits<wchar_t> >(std::basic_istream<wchar_t, std::char_traits<wchar_t> >&, std::_Setfill<wchar_t>)" location="f78:184" file="f78" line="184" extern="1" inline="1"> - <Argument name="__is" type="_3826" location="f78:184" file="f78" line="184"/> + <OperatorFunction id="_1916" name=">>" returns="_3829" context="_2" mangled="_ZStrsIwSt11char_traitsIwEERSt13basic_istreamIT_T0_ES6_St8_SetfillIS3_E" demangled="std::basic_istream<wchar_t, std::char_traits<wchar_t> >& std::operator>><wchar_t, std::char_traits<wchar_t> >(std::basic_istream<wchar_t, std::char_traits<wchar_t> >&, std::_Setfill<wchar_t>)" location="f78:184" file="f78" line="184" extern="1" inline="1"> + <Argument name="__is" type="_3829" location="f78:184" file="f78" line="184"/> <Argument name="__f" type="_1920" location="f78:184" file="f78" line="184"/> </OperatorFunction> - <OperatorFunction id="_1917" name=">>" returns="_3827" context="_2" mangled="_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_St8_SetfillIS3_E" demangled="std::basic_istream<char, std::char_traits<char> >& std::operator>><char, std::char_traits<char> >(std::basic_istream<char, std::char_traits<char> >&, std::_Setfill<char>)" location="f78:184" file="f78" line="184" extern="1" inline="1"> - <Argument name="__is" type="_3827" location="f78:184" file="f78" line="184"/> + <OperatorFunction id="_1917" name=">>" returns="_3830" context="_2" mangled="_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_St8_SetfillIS3_E" demangled="std::basic_istream<char, std::char_traits<char> >& std::operator>><char, std::char_traits<char> >(std::basic_istream<char, std::char_traits<char> >&, std::_Setfill<char>)" location="f78:184" file="f78" line="184" extern="1" inline="1"> + <Argument name="__is" type="_3830" location="f78:184" file="f78" line="184"/> <Argument name="__f" type="_1921" location="f78:184" file="f78" line="184"/> </OperatorFunction> <Function id="_1918" name="setfill" returns="_1920" context="_2" mangled="_ZSt7setfillIwESt8_SetfillIT_ES1_" demangled="std::_Setfill<wchar_t> std::setfill<wchar_t>(wchar_t)" location="f78:175" file="f78" line="175" endline="178" inline="1"> @@ -6460,132 +6460,132 @@ <Function id="_1919" name="setfill" returns="_1921" context="_2" mangled="_ZSt7setfillIcESt8_SetfillIT_ES1_" demangled="std::_Setfill<char> std::setfill<char>(char)" location="f78:175" file="f78" line="175" endline="178" inline="1"> <Argument name="__c" type="_2881" location="f78:175" file="f78" line="175"/> </Function> - <Struct id="_1920" name="_Setfill<wchar_t>" context="_2" mangled="St8_SetfillIwE" demangled="std::_Setfill<wchar_t>" location="f78:163" file="f78" line="163" artificial="1" size="32" align="32" members="_3834 _3835 _3836 " bases=""/> - <Struct id="_1921" name="_Setfill<char>" context="_2" mangled="St8_SetfillIcE" demangled="std::_Setfill<char>" location="f78:163" file="f78" line="163" artificial="1" size="8" align="8" members="_3837 _3838 _3839 " bases=""/> - <OperatorFunction id="_1922" name="<<" returns="_3824" context="_2" mangled="_ZStlsIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_St8_Setbase" demangled="std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& std::operator<< <wchar_t, std::char_traits<wchar_t> >(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&, std::_Setbase)" location="f78:153" file="f78" line="153" extern="1" inline="1"> - <Argument name="__os" type="_3824" location="f78:153" file="f78" line="153"/> + <Struct id="_1920" name="_Setfill<wchar_t>" context="_2" mangled="St8_SetfillIwE" demangled="std::_Setfill<wchar_t>" location="f78:163" file="f78" line="163" artificial="1" size="32" align="32" members="_3837 _3838 _3839 " bases=""/> + <Struct id="_1921" name="_Setfill<char>" context="_2" mangled="St8_SetfillIcE" demangled="std::_Setfill<char>" location="f78:163" file="f78" line="163" artificial="1" size="8" align="8" members="_3840 _3841 _3842 " bases=""/> + <OperatorFunction id="_1922" name="<<" returns="_3827" context="_2" mangled="_ZStlsIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_St8_Setbase" demangled="std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& std::operator<< <wchar_t, std::char_traits<wchar_t> >(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&, std::_Setbase)" location="f78:153" file="f78" line="153" extern="1" inline="1"> + <Argument name="__os" type="_3827" location="f78:153" file="f78" line="153"/> <Argument name="__f" type="_1927" location="f78:153" file="f78" line="153"/> </OperatorFunction> - <OperatorFunction id="_1923" name="<<" returns="_3825" context="_2" mangled="_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_Setbase" demangled="std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::_Setbase)" location="f78:153" file="f78" line="153" extern="1" inline="1"> - <Argument name="__os" type="_3825" location="f78:153" file="f78" line="153"/> + <OperatorFunction id="_1923" name="<<" returns="_3828" context="_2" mangled="_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_Setbase" demangled="std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::_Setbase)" location="f78:153" file="f78" line="153" extern="1" inline="1"> + <Argument name="__os" type="_3828" location="f78:153" file="f78" line="153"/> <Argument name="__f" type="_1927" location="f78:153" file="f78" line="153"/> </OperatorFunction> - <OperatorFunction id="_1924" name=">>" returns="_3826" context="_2" mangled="_ZStrsIwSt11char_traitsIwEERSt13basic_istreamIT_T0_ES6_St8_Setbase" demangled="std::basic_istream<wchar_t, std::char_traits<wchar_t> >& std::operator>><wchar_t, std::char_traits<wchar_t> >(std::basic_istream<wchar_t, std::char_traits<wchar_t> >&, std::_Setbase)" location="f78:142" file="f78" line="142" extern="1" inline="1"> - <Argument name="__is" type="_3826" location="f78:142" file="f78" line="142"/> + <OperatorFunction id="_1924" name=">>" returns="_3829" context="_2" mangled="_ZStrsIwSt11char_traitsIwEERSt13basic_istreamIT_T0_ES6_St8_Setbase" demangled="std::basic_istream<wchar_t, std::char_traits<wchar_t> >& std::operator>><wchar_t, std::char_traits<wchar_t> >(std::basic_istream<wchar_t, std::char_traits<wchar_t> >&, std::_Setbase)" location="f78:142" file="f78" line="142" extern="1" inline="1"> + <Argument name="__is" type="_3829" location="f78:142" file="f78" line="142"/> <Argument name="__f" type="_1927" location="f78:142" file="f78" line="142"/> </OperatorFunction> - <OperatorFunction id="_1925" name=">>" returns="_3827" context="_2" mangled="_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_St8_Setbase" demangled="std::basic_istream<char, std::char_traits<char> >& std::operator>><char, std::char_traits<char> >(std::basic_istream<char, std::char_traits<char> >&, std::_Setbase)" location="f78:142" file="f78" line="142" extern="1" inline="1"> - <Argument name="__is" type="_3827" location="f78:142" file="f78" line="142"/> + <OperatorFunction id="_1925" name=">>" returns="_3830" context="_2" mangled="_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_St8_Setbase" demangled="std::basic_istream<char, std::char_traits<char> >& std::operator>><char, std::char_traits<char> >(std::basic_istream<char, std::char_traits<char> >&, std::_Setbase)" location="f78:142"... [truncated message content] |
From: <rom...@us...> - 2006-07-30 14:05:09
|
Revision: 368 Author: roman_yakovenko Date: 2006-07-30 07:04:45 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=368&view=rev Log Message: ----------- "inserting code" document has been finished Modified Paths: -------------- pyplusplus_dev/docs/documentation/inserting_code.rest pyplusplus_dev/pyplusplus/code_creators/module.py pyplusplus_dev/pyplusplus/module_builder/builder.py pyplusplus_dev/unittests/module_body_tester.py Modified: pyplusplus_dev/docs/documentation/inserting_code.rest =================================================================== --- pyplusplus_dev/docs/documentation/inserting_code.rest 2006-07-30 08:58:23 UTC (rev 367) +++ pyplusplus_dev/docs/documentation/inserting_code.rest 2006-07-30 14:04:45 UTC (rev 368) @@ -24,7 +24,7 @@ ... BOOST_PYTHON_MODULE(X) { - //registration code + //registrations code ... } @@ -41,10 +41,6 @@ This function will ass a code to the registration section. If you want to add the code to the head of the section, pass ``tail=False`` to the method. - -Both these methods have same precondition: they should be called after -``build_code_creator`` method has been called. Both these methods work directly -with code creators tree, hence the precondition. Example ------- @@ -72,13 +68,12 @@ ... }; +``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. - ``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 +written wrapper for this use case. - In the near future ``pyplusplus`` will eliminate the need of creating hand - written wrapper for this use case. - :: boost::python::tuple get_window_size( const window_t& win ){ @@ -103,7 +98,9 @@ * ``add_declaration_code( self, code )`` **Not implemented.** + **Feedback is wanted.** + **Please consider the relationship between this code and class wrapper code.** This method will add the code to the declaration section within the module. @@ -121,7 +118,7 @@ #From Python user can call this method like this: win = window_t( ) height, width = win.get_size() - + If you will pass ``works_on_instance=False`` next code will be generated: :: @@ -131,7 +128,7 @@ ... def( "get_size", &::get_window_size ); } - + And in this case, user will be forced to pass reference to ``window_t`` object: :: @@ -154,8 +151,23 @@ ---------------------------- I don't know what about you, but I don't like to create free functions in global -namespace.I prefer to add ``get_window_size`` function to +namespace. I prefer to add ``get_window_size`` function to ``window_t`` +`class wrapper`__. Class declaration exposes ``add_wrapper_code( self, code )`` +method. This method will add the code to the end of the class declaration. +Example +------- + +:: + + mb = module_builder_t( ... ) + window = mb.class_( 'window_t' ) + window.add_wrapper_code( get_window_size definition ) + window.add_registration_code( 'def( "get_size", &%s::get_window_size )' % window.wrapper_alias ) + +.. __ : http://boost.org/libs/python/doc/tutorial/doc/html/python/exposing.html#python.class_virtual_functions + + .. _`pyplusplus` : ./../pyplusplus.html .. _`pygccxml` : ./../../pygccxml/pygccxml.html .. _`boost.python`: http://www.boost.org/libs/python/doc/index.html Modified: pyplusplus_dev/pyplusplus/code_creators/module.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/module.py 2006-07-30 08:58:23 UTC (rev 367) +++ pyplusplus_dev/pyplusplus/code_creators/module.py 2006-07-30 14:04:45 UTC (rev 368) @@ -187,7 +187,10 @@ def add_declaration_code( self, code, position ): creator = custom.custom_text_t( code ) - self.adopt_creator( creator, min( position, self.creators.index( self.body ) ) ) + last_include = self.last_include_index() + pos = max( last_include + 1, position ) + pos = min( pos, self.creators.index( self.body ) ) + self.adopt_creator( creator, pos ) Modified: pyplusplus_dev/pyplusplus/module_builder/builder.py =================================================================== --- pyplusplus_dev/pyplusplus/module_builder/builder.py 2006-07-30 08:58:23 UTC (rev 367) +++ pyplusplus_dev/pyplusplus/module_builder/builder.py 2006-07-30 14:04:45 UTC (rev 368) @@ -89,8 +89,14 @@ , indexing_suite_version) self.__code_creator = None if optimize_queries: - self.run_query_optimizer() - + self.run_query_optimizer() + + self.__declarations_code_head = [] + self.__declarations_code_tail = [] + + self.__registrations_code_head = [] + self.__registrations_code_tail = [] + def _get_global_ns( self ): return self.__global_ns global_ns = property( _get_global_ns, doc="reference to global namespace" ) @@ -161,7 +167,27 @@ , mem_vars ) map( lambda mem_var: mem_var.set_setter_call_policies( call_policies_resolver( mem_var, 'set' ) ) , mem_vars ) + + @property + def declarations_code_head( self ): + "List of user code, that will be added to the head of the declarations section." + return self.__declarations_code_head + @property + def declarations_code_tail( self ): + "List of user code, that will be added to the tail of the declarations section." + return self.__declarations_code_tail + + @property + def registrations_code_head( self ): + "List of user code, that will be added to the head of the registrations section." + return self.__registrations_code_head + + @property + def registrations_code_tail( self ): + "List of user code, that will be added to the tail of the registrations section." + return self.__registrations_code_tail + def print_declarations(self, decl=None, detailed=True, recursive=True, writer=sys.stdout.write): """ This function will print detailed description of all declarations or @@ -230,13 +256,42 @@ called and False otherwise """ return not ( None is self.__code_creator ) - + + def add_declaration_code( self, code, tail=True ): + if tail: + self.__declarations_code_tail.append( code ) + else: + self.__declarations_code_head.append( code ) + + def add_registration_code( self, code, tail=True ): + if tail: + self.__registrations_code_tail.append( code ) + else: + self.__registrations_code_head.append( code ) + + def __merge_user_code( self ): + for code in self.__declarations_code_tail: + self.code_creator.add_declaration_code( code, -1 ) + + for code in self.__declarations_code_head: + self.code_creator.add_declaration_code( code, 0 ) + + body = self.code_creator.body + + for code in self.__registrations_code_tail: + body.adopt_creator( code_creators.custom_text_t( code ), -1 ) + + for code in self.__registrations_code_head: + body.adopt_creator( code_creators.custom_text_t( code ), 0 ) + + def write_module( self, file_name ): """ Writes module to single file @param file_name: file name @type file_name: string - """ + """ + self.__merge_user_code() file_writers.write_file( self.code_creator, file_name ) def split_module(self, dir_name, huge_classes=None): @@ -248,6 +303,7 @@ @param huge_classes: list that contains reference to classes, that should be split """ + self.__merge_user_code() if None is huge_classes: file_writers.write_multiple_files( self.code_creator, dir_name ) else: @@ -508,16 +564,3 @@ def _set_BOOST_PYTHON_MAX_ARITY( self, value ): decl_wrappers.calldef_t.BOOST_PYTHON_MAX_ARITY = value BOOST_PYTHON_MAX_ARITY = property( _get_BOOST_PYTHON_MAX_ARITY, _set_BOOST_PYTHON_MAX_ARITY ) - - def add_declaration_code( self, code, tail=True ): - position = 0 - if tail: - position = -1 - self.code_creator.add_declaration_code( code, position ) - - def add_registration_code( self, code, tail=True ): - position = 0 - if tail: - position = -1 - creator = code_creators.custom_text_t( code ) - self.code_creator.body.adopt_creator( creator, position ) Modified: pyplusplus_dev/unittests/module_body_tester.py =================================================================== --- pyplusplus_dev/unittests/module_body_tester.py 2006-07-30 08:58:23 UTC (rev 367) +++ pyplusplus_dev/unittests/module_body_tester.py 2006-07-30 14:04:45 UTC (rev 368) @@ -20,7 +20,9 @@ def customize(self, mb): mb.build_code_creator( self.EXTENSION_NAME ) mb.add_declaration_code( "int get1(){ return 1;} ") + mb.add_declaration_code( "//this is a comment", False ) mb.add_registration_code( 'bp::def( "get1", &get1 );' ) + mb.add_registration_code( '//this is another comment', False ) def run_tests(self, module): self.failUnless( 1 == module.get1() ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-07-30 08:58:29
|
Revision: 367 Author: roman_yakovenko Date: 2006-07-30 01:58:23 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=367&view=rev Log Message: ----------- adding new functionality. It is possible now to pass operator symbol as a name to query functions Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/scopedef.py Modified: pygccxml_dev/pygccxml/declarations/scopedef.py =================================================================== --- pygccxml_dev/pygccxml/declarations/scopedef.py 2006-07-30 08:12:03 UTC (rev 366) +++ pygccxml_dev/pygccxml/declarations/scopedef.py 2006-07-30 08:58:23 UTC (rev 367) @@ -187,14 +187,19 @@ self._optimized = True def _build_operator_name( self, name, function, symbol ): + def add_operator( sym ): + if 'new' in sym or 'delete' in sym: + return 'operator ' + sym + else: + return 'operator'+ sym if callable( name ) and None is function: name = None if name: if not 'operator' in name: - name = 'operator' + name + name = add_operator( name ) return name elif symbol: - return 'operator' + symbol + return add_operator( symbol ) return name #both name and symbol are None This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |