pygccxml-commit Mailing List for C++ Python language bindings (Page 81)
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: Roman <rom...@us...> - 2006-03-29 06:05:22
|
Update of /cvsroot/pygccxml/source/pyplusplus/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19699/pyplusplus/gui Modified Files: ui.py Log Message: updating to new module builder interface Index: ui.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/gui/ui.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ui.py 22 Mar 2006 08:05:35 -0000 1.21 --- ui.py 29 Mar 2006 06:05:19 -0000 1.22 *************** *** 324,331 **** raise RuntimeError( 'Header file "%s" does not exist or should be valid file name.' % header_file ) config.include_paths.append( os.path.split( header_file )[0] ) - config.working_directory = os.path.split( header_file )[0] start_time = time.clock() ! mb = module_builder.module_builder_t( [ header_file ], config ) parsed_time = time.clock() - start_time --- 324,336 ---- raise RuntimeError( 'Header file "%s" does not exist or should be valid file name.' % header_file ) config.include_paths.append( os.path.split( header_file )[0] ) start_time = time.clock() ! mb = module_builder.module_builder_t( ! [ header_file ] ! , gccxml_path=config.gccxml_path ! , working_directory=os.path.split( header_file )[0] ! , include_paths=config.include_paths ! , define_symbols=config.define_symbols ) ! parsed_time = time.clock() - start_time |
Update of /cvsroot/pygccxml/source/pyplusplus/unittests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31188/pyplusplus/unittests Modified Files: abstract_classes_tester.py abstract_tester.py algorithms_tester.py call_policies_tester.py casting_tester.py class_order2_tester.py class_order3_tester.py class_order4_tester.py classes_tester.py dwrapper_printer_tester.py enums_tester.py free_function_ignore_bug_tester.py free_functions_tester.py free_operators_tester.py fundamental_tester_base.py global_variables_tester.py index_operator_tester.py internal_classes_tester.py mdecl_wrapper_tester.py member_functions_tester.py member_variables_tester.py module_body_tester.py module_properties_tester.py namespaces_tester.py noncopyable_tester.py operators_bug_tester.py operators_tester.py optional_bug_tester.py optional_tester.py pointer_as_arg_tester.py pointer_to_function_as_argument.py regression1_tester.py regression2_tester.py regression3_tester.py smart_pointers_tester.py special_operators_tester.py statics_tester.py temprorary_variable_tester.py unnamed_enums_tester.py user_text_tester.py Added Files: gui_wizard_tester.py Log Message: 1. adding most of the aliases needed to functionality needed by user to module builder package 2. updating examples and cleaning unittests Index: mdecl_wrapper_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/mdecl_wrapper_tester.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mdecl_wrapper_tester.py 21 Mar 2006 08:07:30 -0000 1.2 --- mdecl_wrapper_tester.py 29 Mar 2006 04:26:58 -0000 1.3 *************** *** 8,14 **** import unittest import autoconfig - from pygccxml import parser from pygccxml import declarations - from pyplusplus import decl_wrappers from pyplusplus import module_builder --- 8,12 ---- *************** *** 27,39 **** def test(self): ! config = parser.config_t( gccxml_path=autoconfig.gccxml_path ! , include_paths=[autoconfig.boost_path] ! , undefine_symbols=['__MINGW32__']) ! ! mb = module_builder.module_builder_t( self._get_files(), config ) ! classes = filter( lambda d: isinstance( d, decl_wrappers.class_t ) , declarations.make_flatten( mb.global_ns ) ) ! mdw = decl_wrappers.mdecl_wrapper_t( classes ) #check set to property functionality for d in mdw: --- 25,36 ---- def test(self): ! mb = module_builder.module_builder_t( self._get_files() ! , gccxml_path=autoconfig.gccxml_path ! , include_paths=[autoconfig.boost_path] ! , undefine_symbols=['__MINGW32__'] ) ! classes = filter( lambda d: isinstance( d, module_builder.class_t ) , declarations.make_flatten( mb.global_ns ) ) ! mdw = module_builder.mdecl_wrapper_t( classes ) #check set to property functionality for d in mdw: Index: optional_bug_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/optional_bug_tester.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** optional_bug_tester.py 19 Mar 2006 13:35:39 -0000 1.1 --- optional_bug_tester.py 29 Mar 2006 04:26:58 -0000 1.2 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: module_properties_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/module_properties_tester.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** module_properties_tester.py 28 Feb 2006 07:31:33 -0000 1.2 --- module_properties_tester.py 29 Mar 2006 04:26:58 -0000 1.3 *************** *** 8,13 **** import unittest import autoconfig - from pygccxml import parser - from pygccxml import declarations from pyplusplus import code_creators from pyplusplus import module_creator --- 8,11 ---- *************** *** 23,32 **** self.failUnless( isinstance( extmodule.precompiled_header , code_creators.precompiled_header_t ) ) - #print extmodule.create() extmodule.precompiled_header \ = code_creators.precompiled_header_t( 'boost/date_time.hpp' ) self.failUnless( isinstance( extmodule.precompiled_header , code_creators.precompiled_header_t ) ) - #print extmodule.create() def create_suite(): --- 21,28 ---- Index: dwrapper_printer_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/dwrapper_printer_tester.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dwrapper_printer_tester.py 21 Mar 2006 08:07:30 -0000 1.2 --- dwrapper_printer_tester.py 29 Mar 2006 04:26:58 -0000 1.3 *************** *** 8,13 **** import unittest import autoconfig - from pygccxml import parser - from pyplusplus import decl_wrappers from pyplusplus import module_builder --- 8,11 ---- *************** *** 26,36 **** def test(self): ! config = parser.config_t( gccxml_path=autoconfig.gccxml_path ! , include_paths=[autoconfig.boost_path] ! , undefine_symbols=['__MINGW32__']) ! ! mb = module_builder.module_builder_t( self._get_files(), config ) writer = lambda decl: None ! decl_wrappers.print_declarations( mb.global_ns, writer=writer ) def create_suite(): --- 24,33 ---- def test(self): ! mb = module_builder.module_builder_t( self._get_files() ! , gccxml_path=autoconfig.gccxml_path ! , include_paths=[autoconfig.boost_path] ! , undefine_symbols=['__MINGW32__']) writer = lambda decl: None ! module_builder.print_declarations( mb.global_ns, writer=writer ) def create_suite(): Index: temprorary_variable_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/temprorary_variable_tester.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** temprorary_variable_tester.py 15 Mar 2006 09:27:07 -0000 1.4 --- temprorary_variable_tester.py 29 Mar 2006 04:26:58 -0000 1.5 *************** *** 8,14 **** import unittest import fundamental_tester_base - from pygccxml import declarations from pyplusplus import code_creators ! from pyplusplus import decl_wrappers class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,13 ---- import unittest import fundamental_tester_base from pyplusplus import code_creators ! from pyplusplus import module_builder class tester_t(fundamental_tester_base.fundamental_tester_base_t): *************** *** 25,29 **** and 'name' in decl.alias ) functions.call_policies \ ! = decl_wrappers.return_value_policy( decl_wrappers.copy_non_const_reference ) def _create_derived_from_named_item(self, extmodule): --- 24,28 ---- and 'name' in decl.alias ) functions.call_policies \ ! = module_builder.call_policies.return_value_policy( module_builder.call_policies.copy_non_const_reference ) def _create_derived_from_named_item(self, extmodule): Index: module_body_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/module_body_tester.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** module_body_tester.py 28 Feb 2006 07:31:33 -0000 1.5 --- module_body_tester.py 29 Mar 2006 04:26:58 -0000 1.6 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: namespaces_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/namespaces_tester.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** namespaces_tester.py 28 Feb 2006 07:31:33 -0000 1.6 --- namespaces_tester.py 29 Mar 2006 04:26:58 -0000 1.7 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: class_order4_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/class_order4_tester.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** class_order4_tester.py 28 Feb 2006 07:31:33 -0000 1.2 --- class_order4_tester.py 29 Mar 2006 04:26:58 -0000 1.3 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: operators_bug_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/operators_bug_tester.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** operators_bug_tester.py 15 Mar 2006 09:27:07 -0000 1.7 --- operators_bug_tester.py 29 Mar 2006 04:26:58 -0000 1.8 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: member_functions_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/member_functions_tester.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** member_functions_tester.py 15 Mar 2006 09:27:07 -0000 1.13 --- member_functions_tester.py 29 Mar 2006 04:26:58 -0000 1.14 *************** *** 9,13 **** import fundamental_tester_base from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 9,12 ---- Index: index_operator_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/index_operator_tester.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index_operator_tester.py 5 Mar 2006 05:51:30 -0000 1.1 --- index_operator_tester.py 29 Mar 2006 04:26:58 -0000 1.2 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: classes_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/classes_tester.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** classes_tester.py 15 Mar 2006 09:27:07 -0000 1.14 --- classes_tester.py 29 Mar 2006 04:26:58 -0000 1.15 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: statics_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/statics_tester.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** statics_tester.py 28 Feb 2006 07:31:33 -0000 1.5 --- statics_tester.py 29 Mar 2006 04:26:58 -0000 1.6 *************** *** 8,14 **** import unittest import fundamental_tester_base - from pygccxml import declarations from pyplusplus import code_creators - from pyplusplus import decl_wrappers class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,12 ---- Index: noncopyable_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/noncopyable_tester.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** noncopyable_tester.py 28 Feb 2006 07:31:33 -0000 1.3 --- noncopyable_tester.py 29 Mar 2006 04:26:58 -0000 1.4 *************** *** 8,14 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators - from pyplusplus import decl_wrappers class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: global_variables_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/global_variables_tester.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** global_variables_tester.py 15 Mar 2006 09:27:07 -0000 1.10 --- global_variables_tester.py 29 Mar 2006 04:26:58 -0000 1.11 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: abstract_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/abstract_tester.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** abstract_tester.py 28 Feb 2006 07:31:33 -0000 1.4 --- abstract_tester.py 29 Mar 2006 04:26:58 -0000 1.5 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: internal_classes_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/internal_classes_tester.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** internal_classes_tester.py 28 Feb 2006 07:31:33 -0000 1.3 --- internal_classes_tester.py 29 Mar 2006 04:26:58 -0000 1.4 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: smart_pointers_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/smart_pointers_tester.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** smart_pointers_tester.py 28 Feb 2006 07:31:33 -0000 1.4 --- smart_pointers_tester.py 29 Mar 2006 04:26:58 -0000 1.5 *************** *** 8,12 **** import unittest import fundamental_tester_base - from pygccxml import declarations from pyplusplus import code_creators --- 8,11 ---- Index: regression2_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/regression2_tester.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** regression2_tester.py 16 Mar 2006 06:34:09 -0000 1.4 --- regression2_tester.py 29 Mar 2006 04:26:58 -0000 1.5 *************** *** 9,13 **** import fundamental_tester_base from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 9,12 ---- Index: special_operators_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/special_operators_tester.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** special_operators_tester.py 28 Feb 2006 07:31:33 -0000 1.4 --- special_operators_tester.py 29 Mar 2006 04:26:58 -0000 1.5 *************** *** 8,12 **** import unittest import fundamental_tester_base - from pygccxml import declarations from pyplusplus import code_creators --- 8,11 ---- Index: free_operators_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/free_operators_tester.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** free_operators_tester.py 28 Feb 2006 07:31:33 -0000 1.4 --- free_operators_tester.py 29 Mar 2006 04:26:58 -0000 1.5 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: regression3_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/regression3_tester.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** regression3_tester.py 5 Mar 2006 05:50:25 -0000 1.3 --- regression3_tester.py 29 Mar 2006 04:26:58 -0000 1.4 *************** *** 8,12 **** import unittest import fundamental_tester_base - from pygccxml import declarations from pyplusplus import code_creators --- 8,11 ---- Index: call_policies_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/call_policies_tester.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** call_policies_tester.py 21 Mar 2006 08:07:30 -0000 1.10 --- call_policies_tester.py 29 Mar 2006 04:26:58 -0000 1.11 *************** *** 8,14 **** import unittest import fundamental_tester_base ! from pygccxml import declarations ! from pyplusplus import code_creators ! from pyplusplus import decl_wrappers class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,12 ---- import unittest import fundamental_tester_base ! from pyplusplus.module_builder import call_policies class tester_t(fundamental_tester_base.fundamental_tester_base_t): *************** *** 22,27 **** def customize(self, mb ): ! mb.calldef( 'return_second_arg' ).call_policies = decl_wrappers.return_arg( 2 ) ! mb.calldef( 'return_self' ).call_policies = decl_wrappers.return_self() def run_tests(self, module): --- 20,25 ---- def customize(self, mb ): ! mb.calldef( 'return_second_arg' ).call_policies = call_policies.return_arg( 2 ) ! mb.calldef( 'return_self' ).call_policies = call_policies.return_self() def run_tests(self, module): Index: user_text_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/user_text_tester.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** user_text_tester.py 21 Mar 2006 08:07:30 -0000 1.2 --- user_text_tester.py 29 Mar 2006 04:26:58 -0000 1.3 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- --- NEW FILE: gui_wizard_tester.py --- # Copyright 2004 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import autoconfig import os from pygccxml import parser from pyplusplus import module_builder #Configurating GCC-XML parser #Basically you should copy here your makefile configuration parser_configuration = parser.config_t( #path to GCC-XML binary gccxml_path=r"c:/tools/gccxml/bin/gccxml.exe" , working_directory=r"D:\pygccxml_sources\source\pyplusplus\unittests\data" , include_paths=['D:/pygccxml_sources/source/pyplusplus/gui'] , define_symbols=[] ) #Creating an instance of class that will help you to expose your declarations mb = module_builder.module_builder_t( [r"D:\pygccxml_sources\source\pyplusplus\unittests\data\call_policies_to_be_exported.hpp"], parser_configuration ) #Well, don't you want to see what is going on? mb.print_declarations() #Creating code creator. After this step you should not modify/customize declarations. mb.build_code_creator( module_name='pyplusplus' ) #Writing code to file. mb.write_module( './bindings.cpp' ) Index: optional_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/optional_tester.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** optional_tester.py 15 Mar 2006 09:27:07 -0000 1.2 --- optional_tester.py 29 Mar 2006 04:26:58 -0000 1.3 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: free_functions_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/free_functions_tester.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** free_functions_tester.py 15 Mar 2006 09:27:07 -0000 1.7 --- free_functions_tester.py 29 Mar 2006 04:26:58 -0000 1.8 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class free_functions_tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: pointer_as_arg_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/pointer_as_arg_tester.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pointer_as_arg_tester.py 26 Mar 2006 07:20:56 -0000 1.1 --- pointer_as_arg_tester.py 29 Mar 2006 04:26:58 -0000 1.2 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: class_order3_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/class_order3_tester.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** class_order3_tester.py 28 Feb 2006 07:31:33 -0000 1.2 --- class_order3_tester.py 29 Mar 2006 04:26:58 -0000 1.3 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: member_variables_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/member_variables_tester.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** member_variables_tester.py 15 Mar 2006 09:27:07 -0000 1.14 --- member_variables_tester.py 29 Mar 2006 04:26:58 -0000 1.15 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: abstract_classes_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/abstract_classes_tester.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** abstract_classes_tester.py 28 Feb 2006 07:31:33 -0000 1.3 --- abstract_classes_tester.py 29 Mar 2006 04:26:58 -0000 1.4 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: enums_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/enums_tester.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** enums_tester.py 21 Mar 2006 08:07:30 -0000 1.10 --- enums_tester.py 29 Mar 2006 04:26:58 -0000 1.11 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: regression1_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/regression1_tester.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** regression1_tester.py 15 Mar 2006 09:27:07 -0000 1.6 --- regression1_tester.py 29 Mar 2006 04:26:58 -0000 1.7 *************** *** 8,14 **** import unittest import fundamental_tester_base ! from pygccxml import declarations ! from pyplusplus import code_creators ! from pyplusplus import decl_wrappers class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,12 ---- import unittest import fundamental_tester_base ! from pyplusplus import module_builder class tester_t(fundamental_tester_base.fundamental_tester_base_t): *************** *** 23,27 **** def customize( self, mb ): set_updater = mb.calldef( 'set_updater' ) ! set_updater.call_policies = decl_wrappers.with_custodian_and_ward( 1, 2 ) def create_other_updater(self, module): --- 21,25 ---- def customize( self, mb ): set_updater = mb.calldef( 'set_updater' ) ! set_updater.call_policies = module_builder.call_policies.with_custodian_and_ward( 1, 2 ) def create_other_updater(self, module): Index: pointer_to_function_as_argument.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/pointer_to_function_as_argument.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pointer_to_function_as_argument.py 28 Feb 2006 07:31:33 -0000 1.6 --- pointer_to_function_as_argument.py 29 Mar 2006 04:26:58 -0000 1.7 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators #this is compilation test --- 8,11 ---- Index: unnamed_enums_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/unnamed_enums_tester.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** unnamed_enums_tester.py 28 Feb 2006 07:31:33 -0000 1.7 --- unnamed_enums_tester.py 29 Mar 2006 04:26:58 -0000 1.8 *************** *** 8,12 **** import unittest import fundamental_tester_base - from pygccxml import declarations from pyplusplus import code_creators --- 8,11 ---- Index: fundamental_tester_base.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/fundamental_tester_base.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** fundamental_tester_base.py 22 Mar 2006 08:05:35 -0000 1.32 --- fundamental_tester_base.py 29 Mar 2006 04:26:58 -0000 1.33 *************** *** 8,12 **** import unittest import autoconfig - from pygccxml import parser from pyplusplus import module_builder --- 8,11 ---- *************** *** 52,59 **** def _create_extension_source_file(self): global LICENSE ! config = parser.config_t( gccxml_path=autoconfig.gccxml_path ! , include_paths=[autoconfig.boost_path] ! , undefine_symbols=['__MINGW32__']) ! mb = module_builder.module_builder_t( [self.__to_be_exported_header], config ) self.customize( mb ) if not mb.has_code_creator(): --- 51,59 ---- def _create_extension_source_file(self): global LICENSE ! mb = module_builder.module_builder_t( [self.__to_be_exported_header] ! , gccxml_path=autoconfig.gccxml_path ! , include_paths=[autoconfig.boost_path] ! , undefine_symbols=['__MINGW32__'] ) ! mb.run_query_optimizer() self.customize( mb ) if not mb.has_code_creator(): Index: free_function_ignore_bug_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/free_function_ignore_bug_tester.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** free_function_ignore_bug_tester.py 21 Mar 2006 08:07:30 -0000 1.2 --- free_function_ignore_bug_tester.py 29 Mar 2006 04:26:58 -0000 1.3 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: operators_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/operators_tester.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** operators_tester.py 21 Mar 2006 08:07:30 -0000 1.10 --- operators_tester.py 29 Mar 2006 04:26:58 -0000 1.11 *************** *** 8,14 **** import unittest import fundamental_tester_base ! from pygccxml import declarations ! from pyplusplus import code_creators ! from pyplusplus import decl_wrappers class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,12 ---- import unittest import fundamental_tester_base ! from pyplusplus.module_builder import call_policies class tester_t(fundamental_tester_base.fundamental_tester_base_t): *************** *** 29,33 **** r_assign = rational.calldef( 'assign', recursive=False ) ! r_assign.call_policies = decl_wrappers.return_self() foperators = mb.free_operators( lambda decl: 'rational<long int>' in decl.decl_string ) --- 27,31 ---- r_assign = rational.calldef( 'assign', recursive=False ) ! r_assign.call_policies = call_policies.return_self() foperators = mb.free_operators( lambda decl: 'rational<long int>' in decl.decl_string ) Index: class_order2_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/class_order2_tester.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** class_order2_tester.py 28 Feb 2006 07:31:33 -0000 1.2 --- class_order2_tester.py 29 Mar 2006 04:26:58 -0000 1.3 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: casting_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/casting_tester.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** casting_tester.py 28 Feb 2006 07:31:33 -0000 1.5 --- casting_tester.py 29 Mar 2006 04:26:58 -0000 1.6 *************** *** 8,13 **** import unittest import fundamental_tester_base - from pygccxml import declarations - from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): --- 8,11 ---- Index: algorithms_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/algorithms_tester.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** algorithms_tester.py 21 Mar 2006 08:07:30 -0000 1.10 --- algorithms_tester.py 29 Mar 2006 04:26:58 -0000 1.11 *************** *** 22,29 **** class make_flatten_tester_t(unittest.TestCase): def test(self): - config = parser.config_t( gccxml_path=autoconfig.gccxml_path ) mb = module_builder.module_builder_t( ! [ parser.create_text_fc( 'namespace enums{ enum { OK=1 }; }' ) ] ! , config ) mb.namespace( name='::enums' ).include() mb.build_code_creator('dummy') --- 22,28 ---- class make_flatten_tester_t(unittest.TestCase): def test(self): mb = module_builder.module_builder_t( ! [ module_builder.create_text_fc( 'namespace enums{ enum { OK=1 }; }' ) ] ! , gccxml_path=autoconfig.gccxml_path ) mb.namespace( name='::enums' ).include() mb.build_code_creator('dummy') *************** *** 33,40 **** class creator_finder_tester_t( unittest.TestCase ): def test_find_by_declaration(self): - config = parser.config_t( gccxml_path=autoconfig.gccxml_path ) mb = module_builder.module_builder_t( ! [ parser.create_text_fc( 'namespace enums{ enum color{ red = 1}; }' )] ! , config ) mb.namespace( name='::enums' ).include() enum_matcher = declarations.match_declaration_t( name='color' ) --- 32,38 ---- class creator_finder_tester_t( unittest.TestCase ): def test_find_by_declaration(self): mb = module_builder.module_builder_t( ! [ module_builder.create_text_fc( 'namespace enums{ enum color{ red = 1}; }' )] ! , gccxml_path=autoconfig.gccxml_path ) mb.namespace( name='::enums' ).include() enum_matcher = declarations.match_declaration_t( name='color' ) *************** *** 46,53 **** def test_find_by_class_instance(self): - config = parser.config_t( gccxml_path=autoconfig.gccxml_path ) mb = module_builder.module_builder_t( ! [ parser.create_text_fc( 'namespace enums{ enum color{ red = 1}; }' )] ! , config ) mb.namespace( name='::enums' ).include() mb.build_code_creator('dummy') --- 44,50 ---- def test_find_by_class_instance(self): mb = module_builder.module_builder_t( ! [ module_builder.create_text_fc( 'namespace enums{ enum color{ red = 1}; }' )] ! , gccxml_path=autoconfig.gccxml_path ) mb.namespace( name='::enums' ).include() mb.build_code_creator('dummy') |
From: Roman <rom...@us...> - 2006-03-29 04:27:06
|
Update of /cvsroot/pygccxml/source/pyplusplus/module_creator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31188/pyplusplus/module_creator Modified Files: call_policies_resolver.py Log Message: 1. adding most of the aliases needed to functionality needed by user to module builder package 2. updating examples and cleaning unittests Index: call_policies_resolver.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/module_creator/call_policies_resolver.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** call_policies_resolver.py 28 Feb 2006 07:31:33 -0000 1.12 --- call_policies_resolver.py 29 Mar 2006 04:26:58 -0000 1.13 *************** *** 78,82 **** return None ! class built_in_resolver_t(resolver_t): def __init__( self, config=None): --- 78,100 ---- return None ! ! class return_internal_reference_resolver_t( resolver_t ): ! def __init__( self ): ! resolver_t.__init__( self ) ! ! def __call__(self, calldef): ! if not isinstance( calldef, declarations.member_operator_t ): ! return None ! ! if calldef.symbol != '[]': ! return None ! ! return_type = declarations.remove_cv( calldef.return_type ) ! if declarations.is_reference( return_type ): ! return decl_wrappers.return_internal_reference() ! ! return None ! ! class built_in_resolver_t(resolver_t): def __init__( self, config=None): *************** *** 87,90 **** --- 105,109 ---- if not config or config.boost_python_supports_void_ptr: self.__resolvers.append( void_pointer_resolver_t() ) + self.__resolvers.append( return_internal_reference_resolver_t() ) def __call__( self, calldef ): |
From: Roman <rom...@us...> - 2006-03-29 04:27:06
|
Update of /cvsroot/pygccxml/source/pyplusplus/examples/tnfox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31188/pyplusplus/examples/tnfox Modified Files: call_policies.py create_tnfox.py declarations_to_exclude.py files_to_exclude.py Log Message: 1. adding most of the aliases needed to functionality needed by user to module builder package 2. updating examples and cleaning unittests Index: files_to_exclude.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/examples/tnfox/files_to_exclude.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** files_to_exclude.py 16 Nov 2005 07:01:12 -0000 1.2 --- files_to_exclude.py 29 Mar 2006 04:26:58 -0000 1.3 *************** *** 5,8 **** --- 5,10 ---- # http://www.boost.org/LICENSE_1_0.txt) + import os + files = [ "FXArray.h" *************** *** 35,36 **** --- 37,45 ---- , "QThread.h" ] + + def is_excluded( decl ): + global files + if None is decl.location: + return False + file_name = os.path.split( decl.location.file_name )[1] + return file_name in files Index: create_tnfox.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/examples/tnfox/create_tnfox.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** create_tnfox.py 28 Feb 2006 07:31:33 -0000 1.15 --- create_tnfox.py 29 Mar 2006 04:26:58 -0000 1.16 *************** *** 8,11 **** --- 8,12 ---- import time from environment import settings + from pygccxml import parser from pygccxml import declarations *************** *** 14,17 **** --- 15,20 ---- from pyplusplus import file_writers from pyplusplus import utils as pypp_utils + from pyplusplus import decl_wrappers + from pyplusplus import module_builder import aliases *************** *** 22,92 **** import declarations_to_exclude ! def should_stay(decl): ! if isinstance( decl, declarations.namespace_t ): ! return True ! fname = declarations.full_name( decl ) ! if not fname.startswith( '::FX' ): ! return False ! if fname in declarations_to_exclude.declarations: ! return False ! if decl.name.startswith('FXIPCMsg'): ! return False ! file_name = os.path.split( decl.location.file_name )[1] ! #pyplusplus could be very powerfull :-) ! if declarations_to_exclude.deprecated.has_key( file_name ): ! if decl.location.line in declarations_to_exclude.deprecated[ file_name ]: ! return False ! if fname.startswith( '::FX::Pol::' ): ! return False ! file_name = os.path.split( decl.location.file_name )[1] ! if file_name in files_to_exclude.files: ! return False ! if isinstance( decl, declarations.constructor_t ) \ ! and decl.name == 'FXFunctorTarget' \ ! and len(decl.arguments) == 1: ! return False #there are some problems to compile this constructor ! if fname.startswith('::FX::QValueList<FX::Pol::knowReferrers::ReferrerEntry>') or fname.startswith('::FX::QPtrVector<FX::Generic::BoundFunctorV>'): ! return False #Niall? wrapper for this function could not be compiled ! if decl.name == 'bind' and decl.parent.name == 'FXSQLDBStatement' and len( decl.arguments ) == 3: ! return False ! if isinstance( decl, declarations.calldef_t ): #I want to exclude all functions that returns pointer to pointer #and returns pointer to fundamental type ! if declarations.is_pointer( decl.return_type ): ! temp = declarations.remove_pointer( decl.return_type ) if declarations.is_fundamental( temp ) and not declarations.is_const(temp): ! return False ! temp = declarations.remove_cv( decl.return_type ) temp = declarations.remove_pointer( temp ) if declarations.is_pointer( temp ): ! return False ! ! return True ! ! def set_call_policies( decl ): #first of all call policies defined within data base ! full_name = declarations.full_name( decl ) ! if call_policies.db.has_key( full_name ): ! return call_policies.db[ full_name ] ! if 'FXGL' in decl.parent.name and decl.name == 'copy': ! return code_creators.return_value_policy( code_creators.manage_new_object ) ! if 'QPtrVector<' in decl.parent.name and decl.name == 'take': ! # Set reference_existing object only on the overload not returning a bool ! if declarations.is_pointer( decl.return_type ): ! return code_creators.return_value_policy( code_creators.reference_existing_object ) ! if decl.name == 'manufacture': ! return code_creators.return_value_policy( code_creators.manage_new_object ) ! if decl.name == 'getMetaClass': ! return code_creators.return_value_policy( code_creators.reference_existing_object ) ! #second build in ! built_in_resolver = module_creator.built_in_resolver_t() ! policy = built_in_resolver( decl ) ! if policy: ! return policy #third calculated ! return_by_value = code_creators.return_value_policy( code_creators.return_by_value ) ! return_internal_ref = code_creators.return_internal_reference() const_t = declarations.const_t pointer_t = declarations.pointer_t --- 25,77 ---- import declarations_to_exclude ! def filter_decls(mb): ! mb.global_ns.exclude() ! fx_ns = mb.namespace( 'FX' ) ! fx_ns.include() ! fx_ns.decls( declarations_to_exclude.is_excluded ).exclude() ! fx_ns.decls( lambda decl: decl.name.startswith('FXIPCMsg') ).exclude() ! fx_ns.namespace( 'Pol' ).exclude() ! fx_ns.decls( files_to_exclude.is_excluded ).exclude() ! #find FXFunctorTarget constructor that takes 1 argument of some type ! fx_ns.constructors( name='FXFunctorTarget', arg_type=[None] ).exclude() ! fx_ns.class_( 'QValueList<FX::Pol::knowReferrers::ReferrerEntry>').exclude() ! fx_ns.class_( 'QPtrVector<FX::Generic::BoundFunctorV>').exclude() #Niall? wrapper for this function could not be compiled ! FXSQLDBStatement = fx_ns.class_( 'FXSQLDBStatement' ) ! FXSQLDBStatement.member_function( name='bind', arg_types=[None,None,None] ).exclude() ! ! for func in fx_ns.calldefs(): #I want to exclude all functions that returns pointer to pointer #and returns pointer to fundamental type ! if declarations.is_pointer( func.return_type ): ! temp = declarations.remove_pointer( func.return_type ) if declarations.is_fundamental( temp ) and not declarations.is_const(temp): ! func.exclude() ! temp = declarations.remove_cv( func.return_type ) temp = declarations.remove_pointer( temp ) if declarations.is_pointer( temp ): ! func.exclude() ! def set_call_policies(mb): #first of all call policies defined within data base ! for fname, call_pol in call_policies.db.items(): ! mb.calldefs( fname ).call_policies = call_pol ! ! copy_funcs = mb.calldefs( lambda decl: 'FXGL' in decl.parent.name and decl.name == 'copy' ) ! copy_funcs.call_policies = decl_wrappers.return_value_policy( decl_wrappers.manage_new_object ) ! ! take_funcs = mb.calldefs( lambda decl: 'QPtrVector<' in decl.parent.name \ ! and decl.name == 'take' \ ! and declarations.is_pointer( decl.return_type ) ) ! # Set reference_existing object only on the overload not returning a bool ! take_funcs.call_policies = decl_wrappers.return_value_policy( decl_wrappers.reference_existing_object ) ! mb.calldefs( 'manufacture' ).call_policies \ ! = decl_wrappers.return_value_policy( decl_wrappers.manage_new_object ) ! mb.calldefs( 'getMetaClass' ).call_policies \ ! = decl_wrappers.return_value_policy( decl_wrappers.reference_existing_object ) ! #third calculated ! return_by_value = decl_wrappers.return_value_policy( decl_wrappers.return_by_value ) ! return_internal_ref = decl_wrappers.return_internal_reference() const_t = declarations.const_t pointer_t = declarations.pointer_t *************** *** 102,132 **** for type_, policy in system_wide.items(): ! if declarations.is_same( type_, decl.return_type ): ! return policy - if isinstance( decl, declarations.casting_operator_t ): - #Niall? - if decl.parent.name in ( 'FXVec4d', 'FXVec4f', 'FXVec3d', 'FXVec3f', 'QMemArray<unsigned char>' ): - return return_internal_ref - #better solution could be implemented - #casting_operator_t : ::FX::FXVec4d::operator 38 - #---> ::FX::FXVec3d & ( ::FX::FXVec4d::* )( ) - #casting_operator_t : ::FX::FXVec4f::operator 40 - #---> ::FX::FXVec3f & ( ::FX::FXVec4f::* )( ) - #casting_operator_t : ::FX::FXVec3d::operator 31 - #---> ::FX::FXVec2d & ( ::FX::FXVec3d::* )( ) - #casting_operator_t : ::FX::FXVec3f::operator 36 - #---> ::FX::FXVec2f & ( ::FX::FXVec3f::* )( ) - #casting_operator_t : ::FX::QMemArray<unsigned char>::operator 24 - #---> unsigned char const * ( ::FX::QMemArray<unsigned char>::* )( ) const return None ! def fix_default_args( code_creator ): ! for arg in code_creator.declaration.arguments: ! if arg.default_value == 'FX::FXString::null': ! arg.default_value = 'FX::FXString::nullStr()' ! def customize_module( extmodule ): extmodule.license = customization_data.license --- 87,113 ---- for type_, policy in system_wide.items(): ! mb.calldefs( return_type=type_ ).call_policies = policy ! ! for name in 'FXVec4d', 'FXVec4f', 'FXVec3d', 'FXVec3f', 'QMemArray<unsigned char>': ! mb.casting_operators( name ).call_policies = return_internal_ref return None ! def customize_decls( mb ): ! classes = mb.classes() ! classes.always_expose_using_scope = True #better error reporting from compiler ! classes.redefine_operators = True #redefine all operators found in base classes ! for class_ in classes: ! if class_.name in aliases.db: ! class_.alias = aliases.db[ class_.name ] ! class_.wrapper_alias = class_.alias + '_wrapper' + for func in mb.calldefs(): + for arg in func.arguments: + if arg.default_value == 'FX::FXString::null': + arg.default_value = 'FX::FXString::nullStr()' ! def customize_module( mb ): ! extmodule = mb.code_creator extmodule.license = customization_data.license *************** *** 136,213 **** map( lambda creator: extmodule.remove_creator( creator ), includes ) extmodule.adopt_include( code_creators.include_t( header="fx.h" ) ) - ##extmodule.adopt_include( code_creators.include_t( header="CArrays.h" ) ) - ##extmodule.adopt_include( code_creators.include_t( color_array.file_name ) ) position = extmodule.last_include_index() + 1 extmodule.adopt_creator( code_creators.namespace_using_t('::FX'), position ) extmodule.user_defined_directories.append( settings.generated_files_dir ) - #Niall? - #extmodule.precompiled_header = ??? - class_creators = filter( lambda creator: isinstance( creator, code_creators.class_t ) - , code_creators.make_flatten( extmodule.body.creators ) ) - for creator in class_creators: - creator.always_expose_using_scope = True #better error reporting from compiler - creator.redefine_operators = True #redefine all operators found in base classes - if aliases.db.has_key( creator.declaration.name ): - creator.alias = aliases.db[ creator.declaration.name ] - ##fname = declarations.full_name( creator.declaration ) - ##if fname in color_array.classes: - ##creator.adopt_creator( color_array.register_color_array_t( creator.declaration.name ) ) - #some times it is much easier to exclude declarations by alias ! for creator in code_creators.make_flatten( extmodule.creators ): ! if not isinstance( creator, code_creators.declaration_based_t ): ! continue ! if creator.alias in declarations_to_exclude.declarations_aliases: ! creator.parent.remove_creator( creator ) ! if creator.alias == "as_unsigned_char_const__ptr_" \ ! and creator.declaration.parent.name == 'QMemArray<unsigned char>': ! creator.parent.remove_creator( creator ) ! if isinstance( creator.declaration, declarations.calldef_t): ! fix_default_args( creator ) - pypp_utils.missing_call_policies.print_( extmodule ) ! def prepare_module(): parser_config = parser.config_t( gccxml_path=settings.gccxml_path , include_paths=[settings.boost_path, settings.tnfox_include_path] , define_symbols=settings.defined_symbols_gccxml ) ! reader = parser.source_reader_t( parser_config ) fx_xml = os.path.join( settings.xml_files, 'fx.xml' ) ! if not os.path.exists( fx_xml ): ! print 'compiling fx.h file' ! reader.create_xml_file( 'fx.h', fx_xml ) ! print 'compiling fx.h file - done' ! print 'reading declarations' ! decls = reader.read_xml_file( fx_xml ) ! print 'reading declarations - done' print 'filtering declarations' ! decls = declarations.filtering.user_defined( decls, should_stay ) print 'filtering declarations - done' print 'creating module' ! creator = module_creator.creator_t( decls ! , settings.module_name ! , create_castinig_constructor=True ! , call_policies_resolver_=set_call_policies) ! extmodule = creator.create() print 'creating module - done' print 'customizing module' ! customize_module( extmodule ) print 'customizing module - done' ! ! return extmodule ! def write_module( extmodule ): print 'writing module to files' start_time = time.clock() file_writers.write_file( os.path.join( settings.generated_files_dir, color_array.file_name ) , color_array.create_file_content()) ! file_writers.write_multiple_files( extmodule, settings.generated_files_dir ) print 'time taken : ', time.clock() - start_time, ' seconds' print 'writing module to files - done' def export(): ! extmodule = prepare_module() ! write_module( extmodule ) if __name__ == '__main__': --- 117,174 ---- map( lambda creator: extmodule.remove_creator( creator ), includes ) extmodule.adopt_include( code_creators.include_t( header="fx.h" ) ) position = extmodule.last_include_index() + 1 extmodule.adopt_creator( code_creators.namespace_using_t('::FX'), position ) extmodule.user_defined_directories.append( settings.generated_files_dir ) #some times it is much easier to exclude declarations by alias ! #for creator in code_creators.make_flatten( extmodule.creators ): ! #if not isinstance( creator, code_creators.declaration_based_t ): ! #continue ! #if creator.alias in declarations_to_exclude.declarations_aliases: ! #creator.parent.remove_creator( creator ) ! #if creator.alias == "as_unsigned_char_const__ptr_" \ ! #and creator.declaration.parent.name == 'QMemArray<unsigned char>': ! #creator.parent.remove_creator( creator ) ! def create_module(): parser_config = parser.config_t( gccxml_path=settings.gccxml_path , include_paths=[settings.boost_path, settings.tnfox_include_path] , define_symbols=settings.defined_symbols_gccxml ) ! fx_xml = os.path.join( settings.xml_files, 'fx.xml' ) ! mb = module_builder.module_builder_t( [ parser.create_cached_source_fc( 'fx.h', fx_xml ) ] ! , parser_config ) ! mb.run_query_optimizer() print 'filtering declarations' ! filter_decls( mb ) print 'filtering declarations - done' + print 'set call policies' + set_call_policies( mb ) + print 'set call policies - done' + print 'customize declarations' + customize_decls( mb ) + print 'customize declarations - done' print 'creating module' ! mb.build_code_creator(settings.module_name ) print 'creating module - done' print 'customizing module' ! customize_module( mb ) print 'customizing module - done' ! return mb ! def write_module( mb ): print 'writing module to files' + assert isinstance( mb, module_builder.module_builder_t ) start_time = time.clock() file_writers.write_file( os.path.join( settings.generated_files_dir, color_array.file_name ) , color_array.create_file_content()) ! mb.split_module( settings.generated_files_dir ) print 'time taken : ', time.clock() - start_time, ' seconds' print 'writing module to files - done' def export(): ! mb = create_module() ! write_module( mb ) if __name__ == '__main__': Index: declarations_to_exclude.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/examples/tnfox/declarations_to_exclude.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** declarations_to_exclude.py 25 Jan 2006 07:27:23 -0000 1.9 --- declarations_to_exclude.py 29 Mar 2006 04:26:58 -0000 1.10 *************** *** 7,12 **** import os from environment import settings ! declarations = [ "::FX::FXACL::int_toWin32SecurityDescriptor" , "::FX::FXApp::dispatchEvent" --- 7,13 ---- import os from environment import settings + from pygccxml import declarations ! to_be_excluded = [ "::FX::FXACL::int_toWin32SecurityDescriptor" , "::FX::FXApp::dispatchEvent" *************** *** 154,155 **** --- 155,166 ---- deprecated = find_deprecated() + + def is_deprecated( decl ): + global deprecated + if None is decl.location: + return False + file_name = os.path.split( decl.location.file_name )[1] + return deprecated.has_key( file_name ) and decl.location.line in deprecated[ file_name ] + + def is_excluded( decl ): + return declarations.full_name( decl ) in to_be_excluded or is_deprecated( decl ) \ No newline at end of file Index: call_policies.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/examples/tnfox/call_policies.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** call_policies.py 31 Jan 2006 08:19:23 -0000 1.6 --- call_policies.py 29 Mar 2006 04:26:58 -0000 1.7 *************** *** 8,22 **** from environment import settings ! from pyplusplus import code_creators ! from pyplusplus.code_creators import return_self ! from pyplusplus.code_creators import return_internal_reference ! from pyplusplus.code_creators import with_custodian_and_ward ! from pyplusplus.code_creators import copy_const_reference ! from pyplusplus.code_creators import copy_non_const_reference ! from pyplusplus.code_creators import manage_new_object ! from pyplusplus.code_creators import reference_existing_object ! from pyplusplus.code_creators import return_by_value ! from pyplusplus.code_creators import return_opaque_pointer ! from pyplusplus.code_creators import return_value_policy db = { --- 8,22 ---- from environment import settings ! from pyplusplus import decl_wrappers ! from pyplusplus.decl_wrappers import return_self ! from pyplusplus.decl_wrappers import return_internal_reference ! from pyplusplus.decl_wrappers import with_custodian_and_ward ! from pyplusplus.decl_wrappers import copy_const_reference ! from pyplusplus.decl_wrappers import copy_non_const_reference ! from pyplusplus.decl_wrappers import manage_new_object ! from pyplusplus.decl_wrappers import reference_existing_object ! from pyplusplus.decl_wrappers import return_by_value ! from pyplusplus.decl_wrappers import return_opaque_pointer ! from pyplusplus.decl_wrappers import return_value_policy db = { *************** *** 73,77 **** , "::FX::FXBitmap::getData" : return_internal_reference() , "::FX::FXBitmapView::getBitmap" : return_internal_reference() - , "::FX::FXCharset::clear" : return_self() , "::FX::FXColorSelector::acceptButton" : return_internal_reference() , "::FX::FXColorSelector::cancelButton" : return_internal_reference() --- 73,76 ---- *************** *** 91,95 **** , "::FX::FXDirSelector::acceptButton" : return_internal_reference() , "::FX::FXDirSelector::cancelButton" : return_internal_reference() - , "::FX::FXDockBar::findDockAtSide" : return_value_policy( reference_existing_object ) , "::FX::FXDockBar::findDockNear" : return_value_policy( reference_existing_object ) , "::FX::FXDockBar::getDryDock" : return_value_policy( reference_existing_object ) --- 90,93 ---- *************** *** 207,211 **** , "::FX::FXId::getApp" : return_value_policy( reference_existing_object ) , "::FX::FXId::getEventLoop" : return_value_policy( reference_existing_object ) - , "::FX::FXId::getVisual" : return_value_policy( reference_existing_object ) , "::FX::FXImageFrame::getImage" : return_internal_reference() , "::FX::FXImage::getData" : return_internal_reference() --- 205,208 ---- *************** *** 259,264 **** , "::FX::FXMDIChild::getIcon" : return_internal_reference() , "::FX::FXMDIChild::getMenu" : return_internal_reference() - , "::FX::FXMDIChild::getWindowIcon" : return_internal_reference() - , "::FX::FXMDIChild::getWindowMenu" : return_internal_reference() , "::FX::FXMDIClient::getActiveChild" : return_internal_reference() , "::FX::FXMenuButton::getMenu" : return_internal_reference() --- 256,259 ---- *************** *** 283,287 **** , "::FX::FXOptionMenu::getCurrent" : return_internal_reference() , "::FX::FXOptionMenu::getMenu" : return_internal_reference() - , "::FX::FXOptionMenu::getPopup" : return_internal_reference() , "::FX::FXPopup::getGrabOwner" : return_internal_reference() , "::FX::FXPopup::getNextActive" : return_internal_reference() --- 278,281 ---- *************** *** 293,299 **** , "::FX::FXQuatd::adjust" : return_self() , "::FX::FXQuatf::adjust" : return_self() - , "::FX::FXRanged::clipTo" : return_self() , "::FX::FXRanged::include" : return_self() - , "::FX::FXRangef::clipTo" : return_self() , "::FX::FXRangef::include" : return_self() , "::FX::FXRealSpinner::getFont" : return_internal_reference() --- 287,291 ---- *************** *** 317,321 **** , "::FX::FXSpheref::include" : return_self() , "::FX::FXSpinner::getFont" : return_internal_reference() - , "::FX::FXSplashWindow::getFont" : return_internal_reference() , "::FX::FXSplashWindow::getIcon" : return_internal_reference() , "::FX::FXSplitter::findHSplit" : return_internal_reference() --- 309,312 ---- *************** *** 365,371 **** , "::FX::FXToggleButton::getAltIcon" : return_internal_reference() , "::FX::FXToolBar::findDockAtSide" : return_value_policy( reference_existing_object ) - , "::FX::FXToolBar::findDockNear" : return_value_policy( reference_existing_object ) - , "::FX::FXToolBar::getDryDock" : return_value_policy( reference_existing_object ) - , "::FX::FXToolBar::getWetDock" : return_value_policy( reference_existing_object ) , "::FX::FXToolTip::getFont" : return_internal_reference() , "::FX::FXTopWindow::getIcon" : return_value_policy( reference_existing_object ) --- 356,359 ---- *************** *** 442,446 **** , "::FX::QDir::entryInfoList" : return_internal_reference() , "::FX::QGZipDevice::GZData" : return_value_policy( reference_existing_object ) - , "::FX::QIODevice::permissions" : return_internal_reference() , "::FX::QMemArray<unsigned char>::data" : return_internal_reference() , "::FX::QMemArray<unsigned char>::assign" : return_self() --- 430,433 ---- |
From: Roman <rom...@us...> - 2006-03-29 04:27:06
|
Update of /cvsroot/pygccxml/source/pyplusplus/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31188/pyplusplus/utils Modified Files: __init__.py Log Message: 1. adding most of the aliases needed to functionality needed by user to module builder package 2. updating examples and cleaning unittests Index: __init__.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/utils/__init__.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** __init__.py 6 Feb 2006 09:46:02 -0000 1.1 --- __init__.py 29 Mar 2006 04:26:59 -0000 1.2 *************** *** 13,16 **** --- 13,17 ---- from pygccxml import declarations from pyplusplus import code_creators + class missing_call_policies: |
From: Roman <rom...@us...> - 2006-03-29 04:27:06
|
Update of /cvsroot/pygccxml/source/pyplusplus/module_builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31188/pyplusplus/module_builder Modified Files: __init__.py Added Files: call_policies.py Log Message: 1. adding most of the aliases needed to functionality needed by user to module builder package 2. updating examples and cleaning unittests --- NEW FILE: call_policies.py --- # Copyright 2004 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) from pyplusplus.decl_wrappers import default_call_policies from pyplusplus.decl_wrappers import return_arg from pyplusplus.decl_wrappers import return_self from pyplusplus.decl_wrappers import return_internal_reference from pyplusplus.decl_wrappers import with_custodian_and_ward from pyplusplus.decl_wrappers import with_custodian_and_ward_postcall from pyplusplus.decl_wrappers import return_value_policy_t from pyplusplus.decl_wrappers import copy_const_reference from pyplusplus.decl_wrappers import copy_non_const_reference from pyplusplus.decl_wrappers import manage_new_object from pyplusplus.decl_wrappers import reference_existing_object from pyplusplus.decl_wrappers import return_by_value from pyplusplus.decl_wrappers import return_opaque_pointer from pyplusplus.decl_wrappers import return_value_policy Index: __init__.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/module_builder/__init__.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** __init__.py 28 Feb 2006 07:31:33 -0000 1.1 --- __init__.py 29 Mar 2006 04:26:58 -0000 1.2 *************** *** 4,6 **** # http://www.boost.org/LICENSE_1_0.txt) ! from builder import module_builder_t \ No newline at end of file --- 4,40 ---- # http://www.boost.org/LICENSE_1_0.txt) ! from builder import module_builder_t ! ! #aliases for functionality located in pygccxml.parser module ! from pygccxml.parser import COMPILATION_MODE ! from pygccxml.parser import create_cached_source_fc ! from pygccxml.parser import create_gccxml_fc ! from pygccxml.parser import create_source_fc ! from pygccxml.parser import create_text_fc ! from pygccxml.parser import directory_cache_t ! from pygccxml.parser import file_cache_t ! from pygccxml.parser import file_configuration_t ! ! #aliases for functionality located in decl_wrappers package ! ! from pyplusplus.decl_wrappers import calldef_t ! from pyplusplus.decl_wrappers import member_function_t ! from pyplusplus.decl_wrappers import constructor_t ! from pyplusplus.decl_wrappers import destructor_t ! from pyplusplus.decl_wrappers import member_operator_t ! from pyplusplus.decl_wrappers import casting_operator_t ! from pyplusplus.decl_wrappers import free_function_t ! from pyplusplus.decl_wrappers import free_operator_t ! from pyplusplus.decl_wrappers import class_declaration_t ! from pyplusplus.decl_wrappers import class_t ! from pyplusplus.decl_wrappers import enumeration_t ! from pyplusplus.decl_wrappers import namespace_t ! from pyplusplus.decl_wrappers import typedef_t ! from pyplusplus.decl_wrappers import variable_t ! from pyplusplus.decl_wrappers import scopedef_t ! ! from pyplusplus.decl_wrappers import mdecl_wrapper_t ! ! from pyplusplus.decl_wrappers import print_declarations ! ! import call_policies \ No newline at end of file |
From: Roman <rom...@us...> - 2006-03-29 04:27:06
|
Update of /cvsroot/pygccxml/source/pyplusplus/examples/py_date_time/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31188/pyplusplus/examples/py_date_time/include Modified Files: date_time.pypp.xml Log Message: 1. adding most of the aliases needed to functionality needed by user to module builder package 2. updating examples and cleaning unittests Index: date_time.pypp.xml =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/examples/py_date_time/include/date_time.pypp.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** date_time.pypp.xml 21 Mar 2006 08:07:25 -0000 1.7 --- date_time.pypp.xml 29 Mar 2006 04:26:57 -0000 1.8 *************** *** 3,8 **** <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 _70 _71 _72 _73 _74 _75 _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 _481 _482 _483 _484 _485 _486 _487 _488 _489 _490 _491 _492 _493 _494 _495 _496 _497 _498 _499 _500 _501 _502 _503 _504 _505 _506 _507 _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 _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 _620 _621 _622 _623 _625 _626 _627 _628 _629 _630 _631 _632 _633 _634 _635 _636 _637 _638 _639 _640 _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 _765 _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 _808 _809 _810 _811 _812 _813 _814 _815 _816 _817 _818 _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 _1004 _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 _1082 _1084 _1086 _1087 _1088 _1089 _1090 _1091 _1092 _1093 _1094 _1095 _1096 _1097 _1098 _1099 _1100 _1101 _1102 _1103 _1104 _1105 _1106 _1107 _1108 _1109 _1110 _1111 _1112 _1113 _1114 _1115 _1116 _1118 _1117 _1120 _1122 _1124 _1126 _1127 _1128 _1129 _1130 _1131 _1132 _1133 _1134 _1135 _1136 _1137 _1138 _1140 _1141 _1142 _1143 _1145 _1146 _1148 _1149 _1151 _1152 _1154 _1156 _1158 _1160 _1162 _1164 _1166 _1168 _1170 _1171 _1172 _1173 _1174 _1175 _1176 _1081 _1083 _807 _1177 _1179 _1180 _1178 _1181 _1182 _1183 _1184 _1185 _1186 _1187 _1188 _1189 _1190 _1191 _1192 _1193 _1194 _1195 _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 _1235 _1236 _1237 _1238 _1239 _1240 _1241 _1242 _1243 _1244 _1245 _1246 _1247 _1249 _1250 _1251 _1252 _1253 _1255 _1257 _1258 _1259 _1260 _1261 _1263 _1264 _1265 _1266 _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 _1429 _1430 _1431 _1432 _1433 _1434 _1435 _1436 _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 _1490 _1491 _1492 _1493 _1494 _1495 _1496 _1497 _1499 _1498 _1500 _1501 _819 _1502 _1503 _1504 _1505 _1507 _1506 _1509 _1510 _1511 _1512 _1513 _1514 _1515 _1516 _1517 _1518 _1520 _1521 _1522 _1523 _1524 _1525 _1526 _1527 _1528 _1530 _1529 _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 _1561 _1562 _1563 _1564 _1565 _1567 _1568 _1569 _1570 _1571 _1572 _1573 _1574 _1575 _1576 _1578 _1579 _1580 _1581 _1582 _1583 _1584 _1585 _1586 _1587 _1588 _1589 _1590 _1591 _1592 _1593 _1594 _1595 _1596 _1597 _1598 _1599 _1566 _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 " mangled="_Z2::"/> <Namespace id="_2" name="std" context="_1" members="_1752 _1753 _1758 _1759 _1770 _1771 _1776 _1777 _1782 _1783 _1785 _1786 _1787 _1788 _1789 _1790 _1791 _1792 _1793 _1794 _1800 _1801 _1802 _1803 _1804 _1805 _1806 _1807 _1808 _1809 _1810 _1811 _1812 _1813 _1814 _1817 _1818 _1819 _1820 _1821 _1822 _1823 _1824 _1825 _1826 _1827 _1828 _1839 _1840 _1841 _1842 _1843 _1844 _1845 _1846 _1847 _1848 _1849 _1850 _1851 _1852 _1853 _1854 _1855 _1856 _1857 _1858 _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 _1920 _1930 _1931 _1932 _1933 _1934 _1935 _1936 _1937 _1938 _1939 _1940 _1941 _1942 _1943 _1944 _1945 _1946 _1947 _1948 _1949 _1950 _1951 _1952 _1953 _1954 _1955 _1956 _1957 _1958 _1959 _1960 _1961 _1962 _1963 _1964 _1965 _1966 _1967 _1968 _1969 _1970 _1971 _1972 _1973 _1974 _1975 _1976 _1977 _1978 _1979 _2001 _2002 _2037 _2039 _2041 _2040 _2042 _2043 _2044 _2045 _2046 _2047 _2052 _2053 _2054 _2154 _2156 _2157 _2158 _2215 _2216 _2217 _2218 _2219 _2220 _2222 _2223 _2224 _2225 _2226 _2227 _2228 _2229 _2230 _2231 _2232 _2233 _2234 _2235 _2236 _2238 _2240 _2242 _2244 _2246 _2248 _2250 _2252 _2254 _2256 _2258 _2260 _2262 _2264 _2266 _2268 _2270 _2272 _2274 _2276 _2278 _2280 _2282 _2284 _2286 _2288 _2289 _2290 _2291 _2292 _2293 _2294 _2295 _2296 _2297 _2298 _2299 _2300 _2301 _2302 _2303 _2305 _2306 _2307 _2308 _2309 _2310 _2311 _2312 _2313 _2314 _2315 _2316 _2317 _2318 _2320 _2322 _2323 _2356 _2357 _2358 _2359 _2360 _2361 _2362 _2363 _2364 _2365 " mangled="_Z3std"/> ! <Function id="_3" name="_GLOBAL__D__home_roman_pygccxml_sources_source_pyplusplus_examples_py_date_time_include_date_time.pypp.hppfOBf0b" returns="_1139" context="_1" location="f0:131" file="f0" line="131" endline="131"/> ! <Function id="_4" name="_GLOBAL__I__home_roman_pygccxml_sources_source_pyplusplus_examples_py_date_time_include_date_time.pypp.hppfOBf0b" returns="_1139" context="_1" location="f0:131" file="f0" line="131" endline="131"/> <Variable id="_5" name="_ZGVN5boost9date_time10date_facetINS_9gregorian4dateEcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE" type="_1256" context="_1" location="f1:372" file="f1" line="372" artificial="1"/> <Function id="_6" name="__static_initialization_and_destruction_0" returns="_1139" context="_1" mangled="_Z41__static_initialization_and_destruction_0ii" location="f0:131" file="f0" line="131" endline="77"> --- 3,8 ---- <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 _70 _71 _72 _73 _74 _75 _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 _481 _482 _483 _484 _485 _486 _487 _488 _489 _490 _491 _492 _493 _494 _495 _496 _497 _498 _499 _500 _501 _502 _503 _504 _505 _506 _507 _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 _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 _620 _621 _622 _623 _625 _626 _627 _628 _629 _630 _631 _632 _633 _634 _635 _636 _637 _638 _639 _640 _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 _765 _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 _808 _809 _810 _811 _812 _813 _814 _815 _816 _817 _818 _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 _1004 _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 _1082 _1084 _1086 _1087 _1088 _1089 _1090 _1091 _1092 _1093 _1094 _1095 _1096 _1097 _1098 _1099 _1100 _1101 _1102 _1103 _1104 _1105 _1106 _1107 _1108 _1109 _1110 _1111 _1112 _1113 _1114 _1115 _1116 _1118 _1117 _1120 _1122 _1124 _1126 _1127 _1128 _1129 _1130 _1131 _1132 _1133 _1134 _1135 _1136 _1137 _1138 _1140 _1141 _1142 _1143 _1145 _1146 _1148 _1149 _1151 _1152 _1154 _1156 _1158 _1160 _1162 _1164 _1166 _1168 _1170 _1171 _1172 _1173 _1174 _1175 _1176 _1081 _1083 _807 _1177 _1179 _1180 _1178 _1181 _1182 _1183 _1184 _1185 _1186 _1187 _1188 _1189 _1190 _1191 _1192 _1193 _1194 _1195 _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 _1235 _1236 _1237 _1238 _1239 _1240 _1241 _1242 _1243 _1244 _1245 _1246 _1247 _1249 _1250 _1251 _1252 _1253 _1255 _1257 _1258 _1259 _1260 _1261 _1263 _1264 _1265 _1266 _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 _1429 _1430 _1431 _1432 _1433 _1434 _1435 _1436 _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 _1490 _1491 _1492 _1493 _1494 _1495 _1496 _1497 _1499 _1498 _1500 _1501 _819 _1502 _1503 _1504 _1505 _1507 _1506 _1509 _1510 _1511 _1512 _1513 _1514 _1515 _1516 _1517 _1518 _1520 _1521 _1522 _1523 _1524 _1525 _1526 _1527 _1528 _1530 _1529 _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 _1561 _1562 _1563 _1564 _1565 _1567 _1568 _1569 _1570 _1571 _1572 _1573 _1574 _1575 _1576 _1578 _1579 _1580 _1581 _1582 _1583 _1584 _1585 _1586 _1587 _1588 _1589 _1590 _1591 _1592 _1593 _1594 _1595 _1596 _1597 _1598 _1599 _1566 _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 " mangled="_Z2::"/> <Namespace id="_2" name="std" context="_1" members="_1752 _1753 _1758 _1759 _1770 _1771 _1776 _1777 _1782 _1783 _1785 _1786 _1787 _1788 _1789 _1790 _1791 _1792 _1793 _1794 _1800 _1801 _1802 _1803 _1804 _1805 _1806 _1807 _1808 _1809 _1810 _1811 _1812 _1813 _1814 _1817 _1818 _1819 _1820 _1821 _1822 _1823 _1824 _1825 _1826 _1827 _1828 _1839 _1840 _1841 _1842 _1843 _1844 _1845 _1846 _1847 _1848 _1849 _1850 _1851 _1852 _1853 _1854 _1855 _1856 _1857 _1858 _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 _1920 _1930 _1931 _1932 _1933 _1934 _1935 _1936 _1937 _1938 _1939 _1940 _1941 _1942 _1943 _1944 _1945 _1946 _1947 _1948 _1949 _1950 _1951 _1952 _1953 _1954 _1955 _1956 _1957 _1958 _1959 _1960 _1961 _1962 _1963 _1964 _1965 _1966 _1967 _1968 _1969 _1970 _1971 _1972 _1973 _1974 _1975 _1976 _1977 _1978 _1979 _2001 _2002 _2037 _2039 _2041 _2040 _2042 _2043 _2044 _2045 _2046 _2047 _2052 _2053 _2054 _2154 _2156 _2157 _2158 _2215 _2216 _2217 _2218 _2219 _2220 _2222 _2223 _2224 _2225 _2226 _2227 _2228 _2229 _2230 _2231 _2232 _2233 _2234 _2235 _2236 _2238 _2240 _2242 _2244 _2246 _2248 _2250 _2252 _2254 _2256 _2258 _2260 _2262 _2264 _2266 _2268 _2270 _2272 _2274 _2276 _2278 _2280 _2282 _2284 _2286 _2288 _2289 _2290 _2291 _2292 _2293 _2294 _2295 _2296 _2297 _2298 _2299 _2300 _2301 _2302 _2303 _2305 _2306 _2307 _2308 _2309 _2310 _2311 _2312 _2313 _2314 _2315 _2316 _2317 _2318 _2320 _2322 _2323 _2356 _2357 _2358 _2359 _2360 _2361 _2362 _2363 _2364 _2365 " mangled="_Z3std"/> ! <Function id="_3" name="_GLOBAL__D__home_roman_pygccxml_sources_source_pyplusplus_examples_py_date_time_include_date_time.pypp.hppbHk4ab" returns="_1139" context="_1" location="f0:131" file="f0" line="131" endline="131"/> ! <Function id="_4" name="_GLOBAL__I__home_roman_pygccxml_sources_source_pyplusplus_examples_py_date_time_include_date_time.pypp.hppbHk4ab" returns="_1139" context="_1" location="f0:131" file="f0" line="131" endline="131"/> <Variable id="_5" name="_ZGVN5boost9date_time10date_facetINS_9gregorian4dateEcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE" type="_1256" context="_1" location="f1:372" file="f1" line="372" artificial="1"/> <Function id="_6" name="__static_initialization_and_destruction_0" returns="_1139" context="_1" mangled="_Z41__static_initialization_and_destruction_0ii" location="f0:131" file="f0" line="131" endline="77"> |
From: Roman <rom...@us...> - 2006-03-29 04:27:06
|
Update of /cvsroot/pygccxml/source/pyplusplus/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31188/pyplusplus/gui Modified Files: wizard.py Log Message: 1. adding most of the aliases needed to functionality needed by user to module builder package 2. updating examples and cleaning unittests Index: wizard.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/gui/wizard.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wizard.py 22 Mar 2006 08:05:35 -0000 1.3 --- wizard.py 29 Mar 2006 04:26:58 -0000 1.4 *************** *** 2,19 **** """ import os - from pygccxml import parser from pyplusplus import module_builder - #Configurating GCC-XML parser - #Basically you should copy here your makefile configuration - parser_configuration = parser.config_t( - #path to GCC-XML binary - gccxml_path=r"%(gccxml_path)s" - , working_directory=r"%(working_dir)s" - , include_paths=%(include_paths)s - , define_symbols=%(define_symbols)s ) - #Creating an instance of class that will help you to expose your declarations ! mb = module_builder.module_builder_t( [r"%(file_path)s"], parser_configuration ) #Well, don't you want to see what is going on? --- 2,14 ---- """ import os from pyplusplus import module_builder #Creating an instance of class that will help you to expose your declarations ! mb = module_builder.module_builder_t( [r"%(file_path)s"] ! , gccxml_path=r"%(gccxml_path)s" ! , working_directory=r"%(working_dir)s" ! , include_paths=%(include_paths)s ! , define_symbols=%(define_symbols)s ) ! #Well, don't you want to see what is going on? *************** *** 25,29 **** #Writing code to file. mb.write_module( './bindings.cpp' ) - """ --- 20,23 ---- |
From: Roman <rom...@us...> - 2006-03-29 04:27:06
|
Update of /cvsroot/pygccxml/source/pyplusplus/examples/py_easybmp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31188/pyplusplus/examples/py_easybmp Modified Files: create_easybmp.py Log Message: 1. adding most of the aliases needed to functionality needed by user to module builder package 2. updating examples and cleaning unittests Index: create_easybmp.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/examples/py_easybmp/create_easybmp.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** create_easybmp.py 21 Mar 2006 08:07:29 -0000 1.13 --- create_easybmp.py 29 Mar 2006 04:26:58 -0000 1.14 *************** *** 7,13 **** import os from environment import settings - from pygccxml import parser from pyplusplus import code_creators - from pyplusplus import decl_wrappers from pyplusplus import module_builder --- 7,11 ---- *************** *** 25,37 **** header_file = os.path.join( settings.easybmp_path, 'EasyBMP.h' ) #create configuration for GCC-XML parser - parser_config = parser.config_t( gccxml_path=settings.gccxml_path - , working_directory=settings.easybmp_path ) #initialize module builder ! mb = module_builder.module_builder_t( [ header_file ], parser_config ) bmp_class = mb.class_( 'BMP' ) call_operator = bmp_class.operator( symbol='()', recursive=False ) call_operator.alias = 'GetRGBAPixel' ! call_operator.call_policies = decl_wrappers.return_internal_reference() #customizing code, before generation mb.build_code_creator( settings.module_name ) --- 23,35 ---- header_file = os.path.join( settings.easybmp_path, 'EasyBMP.h' ) #create configuration for GCC-XML parser #initialize module builder ! mb = module_builder.module_builder_t( [ header_file ] ! , gccxml_path=settings.gccxml_path ! , working_directory=settings.easybmp_path ) bmp_class = mb.class_( 'BMP' ) call_operator = bmp_class.operator( symbol='()', recursive=False ) call_operator.alias = 'GetRGBAPixel' ! call_operator.call_policies = module_builder.call_policies.return_internal_reference() #customizing code, before generation mb.build_code_creator( settings.module_name ) |
From: Roman <rom...@us...> - 2006-03-29 04:27:03
|
Update of /cvsroot/pygccxml/source/pyplusplus/examples/py_date_time In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31188/pyplusplus/examples/py_date_time Modified Files: create_date_time.py Log Message: 1. adding most of the aliases needed to functionality needed by user to module builder package 2. updating examples and cleaning unittests Index: create_date_time.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/examples/py_date_time/create_date_time.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** create_date_time.py 21 Mar 2006 08:07:25 -0000 1.33 --- create_date_time.py 29 Mar 2006 04:26:57 -0000 1.34 *************** *** 20,39 **** def __init__(self): self.__destination_dir = settings.working_dir ! self.__file = os.path.join( settings.date_time_pypp_include, 'date_time.pypp.hpp' ) ! self.__aliases = customization_data.aliases self.__includes = customization_data.includes self.__ns_aliases = customization_data.ns_aliases ! ! self.__parser_config \ = parser.config_t( gccxml_path=settings.gccxml_path , include_paths=[settings.boost_path] , define_symbols=settings.defined_symbols , undefine_symbols=settings.undefined_symbols ) ! ! def _create_xml_file( self ): ! #On windows I have some problems to compile boost.date_time ! #library, so I will use xml files generated on linux ! reader = parser.source_reader_t( self.__parser_config ) destination = os.path.join( settings.date_time_pypp_include, 'date_time.pypp.xml' ) if sys.platform == 'linux2': --- 20,38 ---- def __init__(self): self.__destination_dir = settings.working_dir ! self.__file = os.path.join( settings.date_time_pypp_include, 'date_time.pypp.hpp' ) self.__aliases = customization_data.aliases self.__includes = customization_data.includes self.__ns_aliases = customization_data.ns_aliases ! ! def _create_xml_file( self ): ! #On windows I have some problems to compile boost.date_time ! #library, so I will use xml files generated on linux ! parser_config \ = parser.config_t( gccxml_path=settings.gccxml_path , include_paths=[settings.boost_path] , define_symbols=settings.defined_symbols , undefine_symbols=settings.undefined_symbols ) ! ! reader = parser.source_reader_t( ) destination = os.path.join( settings.date_time_pypp_include, 'date_time.pypp.xml' ) if sys.platform == 'linux2': *************** *** 44,48 **** date_time_xml_file = self._create_xml_file() mb = module_builder.module_builder_t( [ parser.create_gccxml_fc( date_time_xml_file ) ] ! , self.__parser_config ) if sys.platform == 'win32': linux_name = "time_duration<boost::posix_time::time_duration,boost::date_time::time_resolution_traits<boost::date_time::time_resolution_traits_adapted64_impl, micro, 1000000, 6, int> >" --- 43,50 ---- date_time_xml_file = self._create_xml_file() mb = module_builder.module_builder_t( [ parser.create_gccxml_fc( date_time_xml_file ) ] ! , gccxml_path=settings.gccxml_path ! , include_paths=[settings.boost_path] ! , define_symbols=settings.defined_symbols ! , undefine_symbols=settings.undefined_symbols ) if sys.platform == 'win32': linux_name = "time_duration<boost::posix_time::time_duration,boost::date_time::time_resolution_traits<boost::date_time::time_resolution_traits_adapted64_impl, micro, 1000000, 6, int> >" *************** *** 52,57 **** time_duration_impl.name = win_name for name, alias in self.__aliases.items(): ! decl = mb.decl( name ) decl.alias = alias if isinstance( decl, declarations.class_t ): --- 54,61 ---- time_duration_impl.name = win_name + mb.run_query_optimizer() + for name, alias in self.__aliases.items(): ! decl = mb.class_( name ) decl.alias = alias if isinstance( decl, declarations.class_t ): |
From: Roman <rom...@us...> - 2006-03-29 04:23:49
|
Update of /cvsroot/pygccxml/source/pyplusplus/module_builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30165/pyplusplus/module_builder Modified Files: builder.py Log Message: improving "select" methods performance. Now the performance is not a bottleneck any more Index: builder.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/module_builder/builder.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** builder.py 22 Mar 2006 08:05:35 -0000 1.5 --- builder.py 29 Mar 2006 04:23:45 -0000 1.6 *************** *** 15,20 **** class module_builder_t(object): ! def __init__( self, files, gccxml_config=None, compilation_mode=None, cache=None ): object.__init__( self ) self.__global_ns = self.__parse_declarations( files , gccxml_config --- 15,38 ---- class module_builder_t(object): ! def __init__( self ! , files ! , gccxml_path='' ! , working_directory='.' ! , include_paths=None ! , define_symbols=None ! , undefine_symbols=None ! , start_with_declarations=None ! , compilation_verbose=False ! , compilation_mode=None ! , cache=None ): object.__init__( self ) + gccxml_config = parser.config_t( + gccxml_path=gccxml_path + , working_directory=working_directory + , include_paths=include_paths + , define_symbols=define_symbols + , undefine_symbols=undefine_symbols + , start_with_declarations=start_with_declarations + , verbose=compilation_verbose) self.__global_ns = self.__parse_declarations( files , gccxml_config *************** *** 27,30 **** --- 45,54 ---- global_ns = property( _get_global_ns, doc="reference to global namespace" ) + def run_query_optimizer(self): + map( lambda decl: decl.init_optimizer() + , filter( lambda decl: isinstance( decl, decls_package.scopedef_t ) + , decls_package.make_flatten( self.__global_ns ) ) ) + self.__global_ns.init_optimizer() + def __parse_declarations( self, files, gccxml_config, compilation_mode, cache ): if None is gccxml_config: *************** *** 76,80 **** def _get_module( self ): if not self.__code_creator: ! raise RuntimeError( "self.module is equal to None. Did you forget to call create_module function?" ) return self.__code_creator code_creator = property( _get_module, doc="reference to L{code_creators.module_t} instance" ) --- 100,104 ---- def _get_module( self ): if not self.__code_creator: ! raise RuntimeError( "self.module is equal to None. Did you forget to call build_code_creator function?" ) return self.__code_creator code_creator = property( _get_module, doc="reference to L{code_creators.module_t} instance" ) |
From: Roman <rom...@us...> - 2006-03-29 04:23:48
|
Update of /cvsroot/pygccxml/source/pyplusplus/decl_wrappers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30165/pyplusplus/decl_wrappers Modified Files: decl_wrapper.py namespace_wrapper.py scopedef_wrapper.py Log Message: improving "select" methods performance. Now the performance is not a bottleneck any more Index: namespace_wrapper.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/decl_wrappers/namespace_wrapper.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** namespace_wrapper.py 20 Mar 2006 05:47:56 -0000 1.3 --- namespace_wrapper.py 29 Mar 2006 04:23:45 -0000 1.4 *************** *** 13,19 **** --- 13,21 ---- def namespace( self, *args, **keywds ): + keywds['decl_type'] = declarations.namespace_t return self._find_single( declarations.namespace_matcher_t, *args, **keywds ) def namespaces( self, *args, **keywds ): + keywds['decl_type'] = declarations.namespace_t return self._find_multiple( declarations.namespace_matcher_t, *args, **keywds ) Index: decl_wrapper.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/decl_wrappers/decl_wrapper.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** decl_wrapper.py 20 Mar 2006 05:47:56 -0000 1.3 --- decl_wrapper.py 29 Mar 2006 04:23:45 -0000 1.4 *************** *** 6,9 **** --- 6,11 ---- from pygccxml import declarations import algorithm + import sys + import logging __REPOTED_REPLACES = [] *************** *** 14,17 **** --- 16,26 ---- __REPOTED_REPLACES.append( msg ) + #TODO: find better place for it + logger = logging.getLogger('pyplusplus') + __handler = logging.StreamHandler(sys.stdout) + __handler.setFormatter( logging.Formatter('%(message)s') ) + logger.addHandler(__handler) + logger.setLevel(logging.DEBUG) + class ERROR_BEHAVIOUR: PRINT = 'print' Index: scopedef_wrapper.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/decl_wrappers/scopedef_wrapper.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** scopedef_wrapper.py 20 Mar 2006 05:47:56 -0000 1.4 --- scopedef_wrapper.py 29 Mar 2006 04:23:45 -0000 1.5 *************** *** 7,18 **** from pygccxml import declarations import mdecl_wrapper class scopedef_t(decl_wrapper.decl_wrapper_t): ! ! RECURSIVE_DEFAULT = True ! def __init__(self): decl_wrapper.decl_wrapper_t.__init__( self ) def exclude( self ): self.ignore = True --- 7,88 ---- from pygccxml import declarations import mdecl_wrapper + from sets import Set as set + import time class scopedef_t(decl_wrapper.decl_wrapper_t): ! RECURSIVE_DEFAULT = True def __init__(self): decl_wrapper.decl_wrapper_t.__init__( self ) + + self.__optimized = False + self.__type2decls = {} + self.__type2name2decls = {} + self.__type2decls_nr = {} + self.__type2name2decls_nr = {} + self.__all_decls = None + + def __decl_types( self, decl ): + types = [] + bases = list( decl.__class__.__bases__ ) + visited = set() + while bases: + base = bases.pop() + if 'pygccxml' not in base.__module__: + continue + if base in visited: + continue + types.append( base ) + bases.extend( base.__bases__ ) + return types + def init_optimizer(self): + #start_time = time.clock() + + decl_types = [ declarations.declaration_t + , declarations.scopedef_t + , declarations.enumeration_t + , declarations.namespace_t + , declarations.class_t + , declarations.class_declaration_t + , declarations.typedef_t + , declarations.variable_t + , declarations.calldef_t + , declarations.member_calldef_t + , declarations.free_calldef_t + , declarations.operator_t + , declarations.member_function_t + , declarations.constructor_t + , declarations.destructor_t + , declarations.member_operator_t + , declarations.casting_operator_t + , declarations.free_function_t + , declarations.free_operator_t ] + for dtype in decl_types: + self.__type2decls[ dtype ] = [] + self.__type2decls_nr[ dtype ] = [] + self.__type2name2decls[ dtype ] = {} + self.__type2name2decls_nr[ dtype ] = {} + + self.__all_decls = declarations.make_flatten( self.declarations ) + for decl in self.__all_decls: + types = self.__decl_types( decl ) + for type_ in types: + self.__type2decls[ type_ ].append( decl ) + name2decls = self.__type2name2decls[ type_ ] + if not name2decls.has_key( decl.name ): + name2decls[ decl.name ] = [] + name2decls[ decl.name ].append( decl ) + if self is decl.parent: + self.__type2decls_nr[ type_ ].append( decl ) + name2decls_nr = self.__type2name2decls_nr[ type_ ] + if not name2decls_nr.has_key( decl.name ): + name2decls_nr[ decl.name ] = [] + name2decls_nr[ decl.name ].append( decl ) + + #decl_wrapper.logger.info( 'Time took to optimize data strucutres: + #print 'time taken : ', time.clock() - start_time, ' seconds' + + self.__optimized = True + def exclude( self ): self.ignore = True *************** *** 24,46 **** def __create_matcher( self, match_class, *args, **keywds ): if len( args ) == 1 and callable( args[0] ): ! matcher = match_class( [], **keywds) return lambda decl: matcher( decl ) and args[0](decl) else: if 1 == len( args ) and isinstance( args[0], str ): ! keywds['name'] = args[0] ! args = [] ! return match_class(*args, **keywds) def _find_single( self, match_class, *args, **keywds ): matcher = self.__create_matcher( match_class, *args, **keywds ) ! recursive = keywds.get( 'recursive', scopedef_t.RECURSIVE_DEFAULT ) ! return declarations.matcher.get_single( matcher, self.declarations, recursive ) def _find_multiple( self, match_class, *args, **keywds ): matcher = self.__create_matcher( match_class, *args, **keywds ) ! recursive = keywds.get( 'recursive', scopedef_t.RECURSIVE_DEFAULT ) ! found = declarations.matcher.find( matcher, self.declarations, recursive ) ! return mdecl_wrapper.mdecl_wrapper_t( found ) def decl( self, *args, **keywds ): --- 94,169 ---- def __create_matcher( self, match_class, *args, **keywds ): + matcher = match_class( **keywds ) if len( args ) == 1 and callable( args[0] ): ! decl_wrapper.logger.info( 'running query: %s and <user defined function>' % str( matcher ) ) return lambda decl: matcher( decl ) and args[0](decl) else: if 1 == len( args ) and isinstance( args[0], str ): ! matcher.name = args[0] ! decl_wrapper.logger.info( 'running query: %s' % str( matcher ) ) ! return matcher ! ! def __does_query_has_type( self, **keywds ): ! return keywds.has_key( 'decl_type' ) ! ! def __does_query_has_type_and_name( self, *args, **keywds ): ! if len(args) != 1: ! return False ! if not isinstance( args[0], str ): ! return False ! return self.__does_query_has_type_and_name( **keywds ) ! ! def __findout_range( self, matcher, *args, **keywds ): ! recursive = keywds.get( 'recursive', scopedef_t.RECURSIVE_DEFAULT ) ! ! if not self.__optimized: ! decl_wrapper.logger.info( 'running non optimized query - optimization has not been done' ) ! decls = self.declarations ! if recursive: ! decls = declarations.make_flatten( self.declarations ) ! return decls ! ! if self.__does_query_has_type_and_name( *args, **keywds ): ! name = matcher.name ! if matcher.is_full_name(): ! name = matcher.decl_name_only() ! if recursive: ! decl_wrapper.logger.info( 'running type + name optimized query recursively' ) ! return self.__type2name2decls[ keywds['decl_type'] ][ name ] ! else: ! decl_wrapper.logger.info( 'running type + name optimized query non recursively' ) ! return self.__type2name2decls_nr[ keywds['decl_type'] ][ name ] ! elif self.__does_query_has_type( **keywds ): ! if recursive: ! decl_wrapper.logger.info( 'running type optimized query recursively' ) ! return self.__type2decls[ keywds['decl_type'] ] ! else: ! decl_wrapper.logger.info( 'running type optimized query non recursively' ) ! return self.__type2decls_nr[ keywds['decl_type'] ] ! else: ! decl_wrapper.logger.info( 'running non optimized query - query is more complex then type + name' ) ! if recursive: ! return self.__all_decls ! else: ! return self.declarations def _find_single( self, match_class, *args, **keywds ): + decl_wrapper.logger.info( 'running query - started' ) + start_time = time.clock() matcher = self.__create_matcher( match_class, *args, **keywds ) ! decls = self.__findout_range( matcher, *args, **keywds ) ! found = declarations.matcher.get_single( matcher, decls, False ) ! decl_wrapper.logger.info( 'query execution took : %f seconds' % ( time.clock() - start_time ) ) ! decl_wrapper.logger.info( 'running query - done' ) ! return found def _find_multiple( self, match_class, *args, **keywds ): + start_time = time.clock() matcher = self.__create_matcher( match_class, *args, **keywds ) ! decls = self.__findout_range( matcher, *args, **keywds ) ! found = declarations.matcher.find( matcher, decls, False ) ! mfound = mdecl_wrapper.mdecl_wrapper_t( found ) ! decl_wrapper.logger.info( 'query execution took : %f seconds' % ( time.clock() - start_time ) ) ! return mfound def decl( self, *args, **keywds ): *************** *** 59,77 **** --- 182,206 ---- def variable( self, *args, **keywds ): + keywds['decl_type'] = declarations.variable_t return self._find_single( declarations.variable_matcher_t, *args, **keywds ) def variables( self, *args, **keywds ): + keywds['decl_type'] = declarations.variable_t return self._find_multiple( declarations.variable_matcher_t, *args, **keywds ) def calldef( self, *args, **keywds ): + keywds['decl_type'] = declarations.calldef_t return self._find_single( declarations.calldef_matcher_t, *args, **keywds ) def calldefs( self, *args, **keywds ): + keywds['decl_type'] = declarations.calldef_t return self._find_multiple( declarations.calldef_matcher_t, *args, **keywds ) def operator( self, *args, **keywds ): + keywds['decl_type'] = declarations.operator_t return self._find_single( declarations.operator_matcher_t, *args, **keywds ) def operators( self, *args, **keywds ): + keywds['decl_type'] = declarations.operator_t return self._find_multiple( declarations.operator_matcher_t, *args, **keywds ) |
From: Roman <rom...@us...> - 2006-03-29 04:14:58
|
Update of /cvsroot/pygccxml/source/pygccxml/unittests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25176/pygccxml/unittests Modified Files: namespace_matcher_tester.py variable_matcher_tester.py Log Message: adding next functionality: 1. __str__ method for all matchers 2. updating unittests 3. improving performance of matcher.__call__ method Index: variable_matcher_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pygccxml/unittests/variable_matcher_tester.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** variable_matcher_tester.py 2 Mar 2006 05:55:41 -0000 1.2 --- variable_matcher_tester.py 29 Mar 2006 04:14:50 -0000 1.3 *************** *** 27,31 **** criteria = declarations.variable_matcher_t( name='x', type='unsigned int' ) x = declarations.matcher.get_single( criteria, self.declarations ) ! criteria = declarations.variable_matcher_t( name='::bit_fields::fields_t::x' --- 27,33 ---- criteria = declarations.variable_matcher_t( name='x', type='unsigned int' ) x = declarations.matcher.get_single( criteria, self.declarations ) ! ! self.failUnless( str(criteria) == '(decl type==variable_t) and (name==x) and (value type==unsigned int)' ) ! criteria = declarations.variable_matcher_t( name='::bit_fields::fields_t::x' Index: namespace_matcher_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pygccxml/unittests/namespace_matcher_tester.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** namespace_matcher_tester.py 28 Feb 2006 07:11:09 -0000 1.1 --- namespace_matcher_tester.py 29 Mar 2006 04:14:50 -0000 1.2 *************** *** 26,30 **** criteria = declarations.namespace_matcher_t( name='bit_fields' ) x = declarations.matcher.get_single( criteria, self.declarations ) ! def create_suite(): suite = unittest.TestSuite() --- 26,31 ---- criteria = declarations.namespace_matcher_t( name='bit_fields' ) x = declarations.matcher.get_single( criteria, self.declarations ) ! self.failUnless( str(criteria) == '(decl type==namespace_t) and (name==bit_fields)' ) ! def create_suite(): suite = unittest.TestSuite() |
From: Roman <rom...@us...> - 2006-03-29 04:14:58
|
Update of /cvsroot/pygccxml/source/pygccxml/declarations In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25176/pygccxml/declarations Modified Files: filters.py Log Message: adding next functionality: 1. __str__ method for all matchers 2. updating unittests 3. improving performance of matcher.__call__ method Index: filters.py =================================================================== RCS file: /cvsroot/pygccxml/source/pygccxml/declarations/filters.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** filters.py 19 Mar 2006 13:35:39 -0000 1.5 --- filters.py 29 Mar 2006 04:14:50 -0000 1.6 *************** *** 17,20 **** --- 17,23 ---- class matcher_base_t(object): + """matcher_base_t class defines interface for classes that will implement + compare functionality according to some criteria. + """ def __init__( self ): object.__init__( self ) *************** *** 34,40 **** """or-operator (|)""" return or_matcher_t([self, other]) class and_matcher_t(matcher_base_t): ! """Combine several other filters with "and".""" def __init__(self, matchers): matcher_base_t.__init__(self) --- 37,46 ---- """or-operator (|)""" return or_matcher_t([self, other]) + + def __str__( self ): + return "base class for all matchers" class and_matcher_t(matcher_base_t): ! """Combine several other matchers with "&".""" def __init__(self, matchers): matcher_base_t.__init__(self) *************** *** 47,52 **** return True class or_matcher_t(matcher_base_t): ! """Combine several other filters with "or".""" def __init__(self, matchers): matcher_base_t.__init__(self) --- 53,62 ---- return True + def __str__(self): + return " & ".join( map( lambda x: "(%s)" % str( x ), self.matchers ) ) + + class or_matcher_t(matcher_base_t): ! """Combine several other matchers with "|".""" def __init__(self, matchers): matcher_base_t.__init__(self) *************** *** 59,64 **** return False class not_matcher_t(matcher_base_t): ! """Combine several other filters with "or".""" def __init__(self, matcher): matcher_base_t.__init__(self) --- 69,78 ---- return False + def __str__(self): + return " | ".join( map( lambda x: "(%s)" % str( x ), self.matchers ) ) + + class not_matcher_t(matcher_base_t): ! """Return the inverse result of matcher""" def __init__(self, matcher): matcher_base_t.__init__(self) *************** *** 68,81 **** return not self.matcher(decl) class declaration_matcher_t( matcher_base_t ): ! def __init__( self, *args, **keywds ): ! """ ! header and header dir should be absolute! ! decl_type ! name ! header_file ! header_dir """ - #An other option is that #pygccxml will create absolute path using os.path.abspath function. --- 82,109 ---- return not self.matcher(decl) + def __str__(self): + return "~(%s)"%str(self.matcher) + class declaration_matcher_t( matcher_base_t ): ! def __init__( self, **keywds ): ! """ Instance of this class will match declarations by next criteria: ! declaration type - any class that derives from L{pygccxml.declarations.declaration_t} class ! header - file in which declaration has been declarated. ! Header path should be absolute! ! ! header directory - directory to which belongs file, in which ! declaration has been declarated. ! Header directory path should be absolute! ! ! declaration name - name of declaration, could be full name or ! declaration name only. ! ! @param keywds: could contain only next keys: ! decl_type ! name ! header_dir ! header_file ! """ #An other option is that #pygccxml will create absolute path using os.path.abspath function. *************** *** 84,88 **** matcher_base_t.__init__( self ) self.decl_type = keywds.get('decl_type', None) ! self.name = keywds.get('name', None) self.header_dir = keywds.get('header_dir', None) self.header_file = keywds.get('header_file', None) --- 112,123 ---- matcher_base_t.__init__( self ) self.decl_type = keywds.get('decl_type', None) ! self.__name = None ! self.__opt_is_tmpl_inst = None ! self.__opt_tmpl_name = None ! self.__opt_is_full_name = None ! self.__decl_name_only = None ! ! self._set_name( keywds.get('name', None) ) ! self.header_dir = keywds.get('header_dir', None) self.header_file = keywds.get('header_file', None) *************** *** 98,127 **** raise RuntimeError( "Path to header file should be absolute!" ) ! def __call__( self, decl ): ! if None != self.decl_type: ! if not isinstance( decl, self.decl_type ): ! return False ! if None != self.name: ! if not templates.is_instantiation( self.name ): ! if '::' not in self.name: ! if decl.name != self.name: ! return False else: ! if self.name != algorithm.full_name( decl ): ! return False else: ! templ_name = templates.name( self.name ) ! if '::' not in templ_name: ! if self.name != decl.name: ! return False else: ! if self.name != algorithm.full_name( decl ): ! return False ! if None != self.header_dir and decl.location: decl_dir = os.path.abspath( os.path.dirname( decl.location.file_name ) ) decl_dir = utils.normalize_path( decl_dir ) if decl_dir[:len(self.header_dir)] != self.header_dir: return False ! if None != self.header_file and decl.location: decl_file = os.path.abspath( decl.location.file_name ) decl_file = utils.normalize_path( decl_file ) --- 133,194 ---- raise RuntimeError( "Path to header file should be absolute!" ) ! def _get_name(self): ! return self.__name ! ! def _set_name( self, name ): ! self.__name = name ! if not self.__name: ! self.__opt_is_tmpl_inst = None ! self.__opt_tmpl_name = None ! self.__opt_is_full_name = None ! self.__decl_name_only = None ! else: ! self.__opt_is_tmpl_inst = templates.is_instantiation( self.__name ) ! self.__opt_tmpl_name = templates.name( self.__name ) ! if self.__opt_is_tmpl_inst: ! if '::' in self.__opt_tmpl_name: ! self.__opt_is_full_name = True ! self.__decl_name_only = self.__opt_tmpl_name.split('::')[-1] else: ! self.__opt_is_full_name = False ! self.__decl_name_only = self.__opt_tmpl_name else: ! if '::' in self.__name: ! self.__opt_is_full_name = True ! self.__decl_name_only = self.__name.split('::')[-1] else: ! self.__opt_is_full_name = False ! self.__decl_name_only = self.__name ! ! ! name = property( _get_name, _set_name ) ! ! def __str__( self ): ! msg = [] ! if not None is self.decl_type: ! msg.append( '(decl type==%s)' % self.decl_type.__name__ ) ! if not None is self.name: ! msg.append( '(name==%s)' % self.name ) ! if not None is self.header_dir: ! msg.append( '(header dir==%s)' % self.header_dir ) ! if not None is self.header_file: ! msg.append( '(header file==%s)' % self.header_file ) ! if not msg: ! msg.append( 'any' ) ! return ' and '.join( msg ) ! ! def __call__( self, decl ): ! if not None is self.decl_type: ! if not isinstance( decl, self.decl_type ): ! return False ! if not None is self.name: ! if not self.check_name( decl ): ! return False ! if not None is self.header_dir and decl.location: decl_dir = os.path.abspath( os.path.dirname( decl.location.file_name ) ) decl_dir = utils.normalize_path( decl_dir ) if decl_dir[:len(self.header_dir)] != self.header_dir: return False ! if not None is self.header_file and decl.location: decl_file = os.path.abspath( decl.location.file_name ) decl_file = utils.normalize_path( decl_file ) *************** *** 130,147 **** return True class variable_matcher_t( declaration_matcher_t ): ! def __init__( self, *args, **keywds ): """ type could be string or instance of class derived from cpptypes.type_t """ keywds['decl_type'] = variable.variable_t ! declaration_matcher_t.__init__( self, *args, **keywds ) self.type = keywds.get('type', None) - self.value = keywds.get('value', None) def __call__( self, decl ): if not super( variable_matcher_t, self ).__call__( decl ): return False ! if None != self.type: if isinstance( self.type, cpptypes.type_t ): if self.type != decl.type: --- 197,239 ---- return True + def check_name( self, decl ): + assert not None is self.name + + if self.__opt_is_tmpl_inst: + if not self.__opt_is_full_name: + if self.name != decl.name: + return False + else: + if self.name != algorithm.full_name( decl ): + return False + else: + if not self.__opt_is_full_name: + if decl.name != self.name: + return False + else: + if self.name != algorithm.full_name( decl ): + return False + return True + + def is_full_name(self): + return self.__opt_is_full_name + + def _get_decl_name_only(self): + return self.__decl_name_only + decl_name_only = property( _get_decl_name_only ) + class variable_matcher_t( declaration_matcher_t ): ! def __init__( self, **keywds ): """ type could be string or instance of class derived from cpptypes.type_t """ keywds['decl_type'] = variable.variable_t ! declaration_matcher_t.__init__( self, **keywds ) self.type = keywds.get('type', None) def __call__( self, decl ): if not super( variable_matcher_t, self ).__call__( decl ): return False ! if not None is self.type: if isinstance( self.type, cpptypes.type_t ): if self.type != decl.type: *************** *** 152,159 **** return True class namespace_matcher_t( declaration_matcher_t ): ! def __init__( self, *args, **keywds ): keywds['decl_type'] = namespace.namespace_t ! declaration_matcher_t.__init__( self, namespace.namespace_t, *args, **keywds) def __call__( self, decl ): --- 244,262 ---- return True + def __str__( self ): + msg = [ super( variable_matcher_t, self ).__str__() ] + if msg == [ 'any' ]: + msg = [] + if not None is self.type: + msg.append( '(value type==%s)' % str(self.type) ) + if not msg: + msg.append( 'any' ) + return ' and '.join( msg ) + + class namespace_matcher_t( declaration_matcher_t ): ! def __init__( self, **keywds ): keywds['decl_type'] = namespace.namespace_t ! declaration_matcher_t.__init__( self, **keywds) def __call__( self, decl ): *************** *** 162,166 **** class calldef_matcher_t( declaration_matcher_t ): ! def __init__( self, *args, **keywds): """Constructor. --- 265,269 ---- class calldef_matcher_t( declaration_matcher_t ): ! def __init__( self, **keywds): """Constructor. *************** *** 176,180 **** if not keywds.has_key( 'decl_type' ): keywds[ 'decl_type' ] = calldef.calldef_t ! declaration_matcher_t.__init__( self, *args, **keywds ) self.return_type = keywds.get( 'return_type', None ) --- 279,283 ---- if not keywds.has_key( 'decl_type' ): keywds[ 'decl_type' ] = calldef.calldef_t ! declaration_matcher_t.__init__( self, **keywds ) self.return_type = keywds.get( 'return_type', None ) *************** *** 184,188 **** if not super( calldef_matcher_t, self ).__call__( decl ): return False ! if None != self.return_type \ and not self.__compare_types( self.return_type, decl.return_type ): return False --- 287,291 ---- if not super( calldef_matcher_t, self ).__call__( decl ): return False ! if not None is self.return_type \ and not self.__compare_types( self.return_type, decl.return_type ): return False *************** *** 209,217 **** return True class operator_matcher_t( calldef_matcher_t ): ! def __init__( self, *args, **keywds): if not keywds.has_key( 'decl_type' ): keywds['decl_type'] = calldef.operator_t ! calldef_matcher_t.__init__( self, *args, **keywds ) self.symbol = keywds.get( 'symbol', None ) --- 312,337 ---- return True + def __str__( self ): + msg = [ super( calldef_matcher_t, self ).__str__() ] + if msg == [ 'any' ]: + msg = [] + if not None is self.return_type: + msg.append( '(return type==%s)' % str(self.return_type) ) + if self.arg_types: + for i in range( len( self.arg_types ) ): + if self.arg_types[i] is None: + msg.append( '(arg %d type==any)' % i ) + else: + msg.append( '(arg %d type==%s)' % ( i, str( self.arg_types[i] ) ) ) + if not msg: + msg.append( 'any' ) + return ' and '.join( msg ) + + class operator_matcher_t( calldef_matcher_t ): ! def __init__( self, **keywds): if not keywds.has_key( 'decl_type' ): keywds['decl_type'] = calldef.operator_t ! calldef_matcher_t.__init__( self, **keywds ) self.symbol = keywds.get( 'symbol', None ) *************** *** 220,223 **** --- 340,353 ---- return False return None != self.symbol and self.symbol == decl.symbol + + def __str__( self ): + msg = [ super( operator_matcher_t, self ).__str__() ] + if msg == [ 'any' ]: + msg = [] + if not None is self.symbol: + msg.append( '(symbol==%s)' % str(self.symbol) ) + if not msg: + msg.append( 'any' ) + return ' and '.join( msg ) class regex_matcher_t( matcher_base_t ): *************** *** 232,235 **** --- 362,368 ---- text = self.function( decl ) return bool( self.regex.match( text ) ) + + def __str__( self ): + return '(regex=%s)' % self.regex class access_type_matcher_t( matcher_base_t ): *************** *** 242,243 **** --- 375,380 ---- return False return self.access_type == decl.parent.find_out_member_access_type( decl ) + + def __str__( self ): + return '(access type=%s)' % self.access_type + |
From: Roman <rom...@us...> - 2006-03-29 04:11:59
|
Update of /cvsroot/pygccxml/source/pyplusplus/code_creators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23701/pyplusplus/code_creators Modified Files: calldef.py Log Message: fixing bug in wrapper constructor, caused by adding optional to init Index: calldef.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/code_creators/calldef.py,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** calldef.py 23 Mar 2006 08:52:14 -0000 1.49 --- calldef.py 29 Mar 2006 04:11:55 -0000 1.50 *************** *** 580,584 **** args.append( 'PyObject*' ) for index, arg in enumerate( self.declaration.arguments ): ! args.append( arg.type.decl_string + ' ' + self._argument_name(index) ) result.append( ', '.join( args ) ) result.append( ' )' ) --- 580,587 ---- args.append( 'PyObject*' ) for index, arg in enumerate( self.declaration.arguments ): ! arg_text = arg.type.decl_string + ' ' + self._argument_name(index) ! if arg.default_value: ! arg_text = arg_text + '=%s' % arg.default_value ! args.append( arg_text ) result.append( ', '.join( args ) ) result.append( ' )' ) |
From: Matthias B. <mb...@us...> - 2006-03-28 12:13:33
|
Update of /cvsroot/pygccxml/source/pyplusplus/experimental In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10368 Modified Files: pypp_api.py Log Message: Added the method log() and constructor args to enable special logging Index: pypp_api.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/experimental/pypp_api.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pypp_api.py 24 Mar 2006 17:29:16 -0000 1.12 --- pypp_api.py 28 Mar 2006 12:13:24 -0000 1.13 *************** *** 49,53 **** """ ! import os, os.path, re, time # Bring in everything I need from pyplusplus and pygccxml --- 49,53 ---- """ ! import os, os.path, re, time, types # Bring in everything I need from pyplusplus and pygccxml *************** *** 80,83 **** --- 80,86 ---- PRIVATE = ACCESS_TYPES.PRIVATE + QUERY = "query" + DECORATION = "decoration" + def cleanTemplateName(templateName): """ Build a clean template name. """ *************** *** 108,111 **** --- 111,116 ---- multiFile = False, useScope = False, + queryLog = None, + decorationLog = None, verbose = True): """Initialize module. *************** *** 135,138 **** --- 140,147 ---- @param useScope: If true the creators all use scope in their code. @type useScope: bool + @param queryLog: Query log file (file name or file-like object) + @type queryLog: str or file + @param decorationLog: Decoration log file (file name or file-like object) + @type decorationLog: str or file @param verbose: if true output status and command information as building the module. @type verbose: bool *************** *** 168,173 **** --- 177,206 ---- self.mStartTime = None # Begin of the parsing step self.mParseEndTime = None # The time when parsing was finished + + if queryLog: + self.log(QUERY, queryLog) + if decorationLog: + self.log(DECORATION, decorationLog) + print "Initialized module." + def log(self, type, logfile): + """Enable specific logging functionality. + + @param type: Identifies a log stream (QUERY or DECORATION) + @type type: str + @param logfile: The output file name or a file-like object + @type logfile: str or file + """ + if isinstance(logfile, types.StringTypes): + logfile = file(logfile, "wt") + + if type==QUERY: + declwrapper.query_log = logfile + elif type==DECORATION: + declwrapper.decoration_log = logfile + else: + raise ValueError, "Invalid log stream: %s"%type + def parse(self): |
From: Matthias B. <mb...@us...> - 2006-03-28 12:12:19
|
Update of /cvsroot/pygccxml/source/pyplusplus/experimental In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9748 Modified Files: declwrapper.py Log Message: Added support for logging the decoration operations Index: declwrapper.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/experimental/declwrapper.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** declwrapper.py 22 Mar 2006 10:44:56 -0000 1.7 --- declwrapper.py 28 Mar 2006 12:12:09 -0000 1.8 *************** *** 22,25 **** --- 22,26 ---- default_recursive = False query_log = None + decoration_log = None # If this is set to True an attempt to decorate a declaration will *************** *** 121,124 **** --- 122,127 ---- self._checkLock() for d in self._iterContained(): + if decoration_log!=None: + self._logDecoration("expose", d) d.include() return self *************** *** 138,141 **** --- 141,146 ---- self._checkLock() for d in self._iterContained(): + if decoration_log!=None: + self._logDecoration("ignore", d) d.exclude() return self *************** *** 162,165 **** --- 167,172 ---- self._checkLock() for decl in self._iterContained(recursive=False): + if decoration_log!=None: + self._logDecoration("rename(%s)"%name, decl) decl.rename(name) return self *************** *** 173,176 **** --- 180,185 ---- self._checkLock() for decl in self._iterContained(): + if decoration_log!=None: + self._logDecoration("finalize", decl) decl.finalize() return self *************** *** 185,188 **** --- 194,199 ---- self._checkLock() for decl in self._iterContained(): + if decoration_log!=None: + self._logDecoration("setPolicy(...)", decl) decl.call_policies = policy *************** *** 195,198 **** --- 206,211 ---- self._checkLock() for decl in self._iterContained(): + if decoration_log!=None: + self._logDecoration("setHeldType(%s)"%heldtype, decl) decl.held_type = heldType return self *************** *** 205,208 **** --- 218,223 ---- self._checkLock() for decl in self._iterContained(): + if decoration_log!=None: + self._logDecoration("disableKeyWord", decl) decl.use_keywords = False # if ( isinstance(decl, calldef_t) and *************** *** 659,662 **** --- 674,692 ---- yield node + # _logDecoration + def _logDecoration(self, operation, decl): + """Write a line into the decoration log. + + @param operation: Name of the decoration operation + @type operation: str + @param decl: Declaration that was decorated + @type decl: declaration_t + """ + global decoration_log + if self.funcname==None: + print >>decoration_log, "%s,%d;%s; %s "%(self.filename, self.linenr, operation, decl) + else: + print >>decoration_log, "%s,%s(),%d;%s; %s "%(self.filename, self.funcname, self.linenr, operation, decl) + # _sourceInfo def _sourceInfo(self): |
From: Roman <rom...@us...> - 2006-03-26 07:21:02
|
Update of /cvsroot/pygccxml/source/pyplusplus/unittests/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32499/pyplusplus/unittests/data Added Files: pointer_as_arg_to_be_exported.hpp Log Message: Adding unit test to next use case void f( data* x=0 ) Pinter that has null as default value --- NEW FILE: pointer_as_arg_to_be_exported.hpp --- // Copyright 2004 Roman Yakovenko. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef __pointer_as_arg_to_be_exported_hpp__ #define __pointer_as_arg_to_be_exported_hpp__ #include <string> namespace pointer_as_arg{ struct data{}; inline int test_for_null( data* d=0 ){ return d ? 1 : 0; } } #endif//__pointer_as_arg_to_be_exported_hpp__ |
From: Roman <rom...@us...> - 2006-03-26 07:21:01
|
Update of /cvsroot/pygccxml/source/pyplusplus/unittests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32499/pyplusplus/unittests Modified Files: test_all.py Added Files: pointer_as_arg_tester.py Log Message: Adding unit test to next use case void f( data* x=0 ) Pinter that has null as default value --- NEW FILE: pointer_as_arg_tester.py --- # Copyright 2004 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import os import sys import unittest import fundamental_tester_base from pygccxml import declarations from pyplusplus import code_creators class tester_t(fundamental_tester_base.fundamental_tester_base_t): EXTENSION_NAME = 'pointer_as_arg' def __init__( self, *args ): fundamental_tester_base.fundamental_tester_base_t.__init__( self , tester_t.EXTENSION_NAME , *args ) def run_tests(self, module): d = module.data() self.failUnless( module.test_for_null( d ) ) self.failUnless( not module.test_for_null() ) def create_suite(): suite = unittest.TestSuite() suite.addTest( unittest.makeSuite(tester_t)) return suite def run_suite(): unittest.TextTestRunner(verbosity=2).run( create_suite() ) if __name__ == "__main__": run_suite() Index: test_all.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/test_all.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** test_all.py 19 Mar 2006 13:35:39 -0000 1.35 --- test_all.py 26 Mar 2006 07:20:56 -0000 1.36 *************** *** 47,50 **** --- 47,51 ---- import free_function_ignore_bug_tester import optional_bug_tester + import pointer_as_arg_tester def create_suite(times): *************** *** 90,93 **** --- 91,95 ---- , free_function_ignore_bug_tester , optional_bug_tester + , pointer_as_arg_tester ] |
From: Matthias B. <mb...@us...> - 2006-03-24 17:29:21
|
Update of /cvsroot/pygccxml/source/pyplusplus/experimental In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12778 Modified Files: pypp_api.py Log Message: Added some more documentation Index: pypp_api.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/experimental/pypp_api.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pypp_api.py 22 Mar 2006 10:45:32 -0000 1.11 --- pypp_api.py 24 Mar 2006 17:29:16 -0000 1.12 *************** *** 5,10 **** __doc__ = """ - pypp api - ======== This module provides a simplified high-level API for using --- 5,8 ---- *************** *** 12,21 **** Quickstart Usage ! ---------------- - Add quickstart here Detailed Usage ! -------------- Add detailed usage here. --- 10,42 ---- Quickstart Usage ! ================ ! ! 1. Create an instance of the L{ModuleBuilder} class that serves as main ! entry point for controlling pygccxml and pyplusplus. Parameters for ! configuring pygccxml/pyplusplus can be passed in the constructor:: ! ! from pypp_api import * ! ! mb = ModuleBuilder(...) ! ! 2. Parse the header files using L{parse()<ModuleBuilder.parse>} and ! customize your bindings:: ! ! toplevel_namespace = mb.parse() ! ! MyClass = toplevel_namespace.Class("MyClass") ! MyClass.expose() ! ! MyClass.Method("foo").setPolicy(return_internal_reference()) ! ... ! ! 3. Write the C++ source files using ! L{writeModule()<ModuleBuilder.writeModule>}:: ! ! mb.writeModule() Detailed Usage ! ============== Add detailed usage here. |
From: Matthias B. <mb...@us...> - 2006-03-23 08:52:21
|
Update of /cvsroot/pygccxml/source/pyplusplus/code_creators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23447 Modified Files: calldef.py Log Message: Applied the patch that Roman posted to the mailing list (so that a default value of 0 on pointer arguments is actually taken into account) Index: calldef.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/code_creators/calldef.py,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** calldef.py 20 Mar 2006 05:47:56 -0000 1.48 --- calldef.py 23 Mar 2006 08:52:14 -0000 1.49 *************** *** 50,61 **** def _keywords_args(self): result = ['( '] for arg in self.declaration.arguments: if 1 < len( result ): result.append( self._PARAM_SEPARATOR ) ! result.append( algorithm.create_identifier( self, '::boost::python::arg' ) ) result.append( '("%s")' % arg.name ) if self.use_default_arguments and arg.default_value: ! result.append( '=%s' % arg.default_value ) result.append( ' )' ) return ''.join( result ) --- 50,66 ---- def _keywords_args(self): + boost_arg = algorithm.create_identifier( self, '::boost::python::arg' ) + boost_obj = algorithm.create_identifier( self, '::boost::python::object' ) result = ['( '] for arg in self.declaration.arguments: if 1 < len( result ): result.append( self._PARAM_SEPARATOR ) ! result.append( boost_arg ) result.append( '("%s")' % arg.name ) if self.use_default_arguments and arg.default_value: ! if not declarations.is_pointer( arg.type ) or arg.default_value != '0': ! result.append( '=%s' % arg.default_value ) ! else: ! result.append( '=%s()' % boost_obj ) result.append( ' )' ) return ''.join( result ) *************** *** 477,491 **** def _keywords_args(self): if not self.declaration.arguments: ! return '' result = ['( '] for arg in self.declaration.arguments: if 1 < len( result ): result.append( ', ' ) ! result.append( algorithm.create_identifier( self, '::boost::python::arg' ) ) result.append( '("%s")' % arg.name ) if self.use_default_arguments and arg.default_value: ! result.append( '=%s' % arg.default_value ) result.append( ' )' ) ! return ''.join( result ) def _create_arg_code( self, arg ): --- 482,501 ---- def _keywords_args(self): if not self.declaration.arguments: ! return '' ! boost_arg = algorithm.create_identifier( self, '::boost::python::arg' ) ! boost_obj = algorithm.create_identifier( self, '::boost::python::object' ) result = ['( '] for arg in self.declaration.arguments: if 1 < len( result ): result.append( ', ' ) ! result.append( boost_arg ) result.append( '("%s")' % arg.name ) if self.use_default_arguments and arg.default_value: ! if not declarations.is_pointer( arg.type ) or arg.default_value != '0': ! result.append( '=%s' % arg.default_value ) ! else: ! result.append( '=%s()' % boost_obj ) result.append( ' )' ) ! return ''.join( result ) def _create_arg_code( self, arg ): *************** *** 849,850 **** --- 859,863 ---- , [ from_arg , to_arg ] ) \ + '();' + + + |
From: Roman <rom...@us...> - 2006-03-22 11:08:16
|
Update of /cvsroot/pygccxml/source/pygccxml/unittests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16961/pygccxml/unittests Modified Files: autoconfig.py decl_printer_tester.py Log Message: adding unit tester for __str__ functionality Index: decl_printer_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pygccxml/unittests/decl_printer_tester.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** decl_printer_tester.py 6 Mar 2006 05:00:34 -0000 1.1 --- decl_printer_tester.py 22 Mar 2006 11:08:11 -0000 1.2 *************** *** 28,39 **** , 'core_overloads_2.hpp' ] - - def test(self): prj_reader = parser.project_reader_t( self.config ) ! prj_decls = prj_reader.read_files( self.__files , compilation_mode=parser.COMPILATION_MODE.FILE_BY_FILE ) writer = lambda decl: None ! declarations.print_declarations( prj_decls, writer=writer ) def create_suite(): suite = unittest.TestSuite() --- 28,44 ---- , 'core_overloads_2.hpp' ] prj_reader = parser.project_reader_t( self.config ) ! self.decls = prj_reader.read_files( self.__files , compilation_mode=parser.COMPILATION_MODE.FILE_BY_FILE ) + + def test_printer(self): writer = lambda decl: None ! declarations.print_declarations( self.decls, writer=writer ) + def test__str__(self): + decls = declarations.make_flatten(self.decls) + for decl in decls: + str(decl) + def create_suite(): suite = unittest.TestSuite() Index: autoconfig.py =================================================================== RCS file: /cvsroot/pygccxml/source/pygccxml/unittests/autoconfig.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** autoconfig.py 15 Mar 2006 09:27:06 -0000 1.12 --- autoconfig.py 22 Mar 2006 11:08:11 -0000 1.13 *************** *** 73,76 **** --- 73,77 ---- , 'config'#parameter description , 'gccxml'#parameter description + , 'pyplusplus' ] ) except ImportError: |
From: Matthias B. <mb...@us...> - 2006-03-22 10:45:36
|
Update of /cvsroot/pygccxml/source/pyplusplus/experimental In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4703 Modified Files: pypp_api.py Log Message: Added some more doc strings Index: pypp_api.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/experimental/pypp_api.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** pypp_api.py 20 Mar 2006 14:21:32 -0000 1.10 --- pypp_api.py 22 Mar 2006 10:45:32 -0000 1.11 *************** *** 72,75 **** --- 72,76 ---- @group Control methods: parse, buildCreators, writeModule + @group Customizing output: addInclude, setLicense, Template, addStartText, addEndText, addBodyTailText """ def __init__(self, *************** *** 396,402 **** def addInclude(self, headers): ! """ Add additional include file(s). ! These are not parsed but are just added to the generated code. ! Takes either a single header or a list of headers. """ if not isinstance(headers, list): --- 397,407 ---- def addInclude(self, headers): ! """Add additional include file(s). ! ! These are not parsed but are just added to the generated code. ! Takes either a single header or a list of headers. ! ! @param headers: Header name(s) ! @type headers: str or list of str """ if not isinstance(headers, list): *************** *** 418,426 **** --- 423,453 ---- # This set of methods needs further refinement based upon user needs def addBodyTailText(self, text): + """Add C++ source code to the module initialization function. + + @param text: A string containing valid C++ source code. + @type text: str + """ self.addBodyTailCreator(code_creators.custom_text_t(text) ) def addStartText(self, text): + """Add C++ source code to the beginning of the main source file. + + @param text: A string containing valid C++ source code. + @type text: str + """ self.addStartCreator(code_creators.custom_text_t(text) ) + def addEndText(self, text): + """Add C++ source code to the end of the main source file. + + @param text: A string containing valid C++ source code. + @type text: str + """ + self.addEndCreator(code_creators.custom_text_t(text) ) + + def setLicense(self, licenseText): + """ Set the license header to use. """ + self.mLicense = licenseText + def addStartCreator(self, creator): self.mStartCreators.append(creator) *************** *** 429,442 **** self.mBodyTailCreators.append(creator) - def addEndText(self, text): - self.addEndCreator(code_creators.custom_text_t(text) ) - def addEndCreator(self, creator): self.mEndCreators.append(creator) ! ! def setLicense(self, licenseText): ! """ Set the license header to use. """ ! self.mLicense = licenseText ! # ---------- Internal helpers ----------- # def buildTemplateFileContents(self): --- 456,462 ---- self.mBodyTailCreators.append(creator) def addEndCreator(self, creator): self.mEndCreators.append(creator) ! # ---------- Internal helpers ----------- # def buildTemplateFileContents(self): |
From: Matthias B. <mb...@us...> - 2006-03-22 10:44:59
|
Update of /cvsroot/pygccxml/source/pyplusplus/experimental In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4240 Modified Files: declwrapper.py Log Message: Use the __str__ methods for writing the query log Index: declwrapper.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/experimental/declwrapper.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** declwrapper.py 20 Mar 2006 10:52:55 -0000 1.6 --- declwrapper.py 22 Mar 2006 10:44:56 -0000 1.7 *************** *** 78,85 **** print >>query_log, "Filter: %s"%filter for decl in self.decl_handles: ! declstr = getattr(decl, "decl_string", "[no decl_string] "+pygccxml.declarations.full_name(decl)) ! # declstr = pygccxml.declarations.full_name(decl) ! clsstr = decl.__class__.__name__.replace("_t", "") ! print >>query_log, " -> %s [%s]"%(declstr, clsstr) if len(self.decl_handles)==0: print >>query_log, " <no result>" --- 78,82 ---- print >>query_log, "Filter: %s"%filter for decl in self.decl_handles: ! print >>query_log, " -> %s"%decl if len(self.decl_handles)==0: print >>query_log, " <no result>" *************** *** 247,251 **** If fn is None, the string name is not quoted. You can use this form ! to wrap constructors or operators. Example: Class("Foo").cdef("bp::init< const MFoo& >()") --- 244,248 ---- If fn is None, the string name is not quoted. You can use this form ! to wrap constructors or operators. Example:: Class("Foo").cdef("bp::init< const MFoo& >()") |
From: Matthias B. <mb...@us...> - 2006-03-22 10:43:14
|
Update of /cvsroot/pygccxml/source/pygccxml/declarations In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3322 Modified Files: decl_printer.py Log Message: Added some text to the doc string that explains the difference to __str__ Index: decl_printer.py =================================================================== RCS file: /cvsroot/pygccxml/source/pygccxml/declarations/decl_printer.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** decl_printer.py 22 Mar 2006 08:05:35 -0000 1.2 --- decl_printer.py 22 Mar 2006 10:43:12 -0000 1.3 *************** *** 10,14 **** class decl_printer_t( decl_visitor.decl_visitor_t ): ! """ Helper class for printing decl tree. """ JUSTIFY = 20 INDENT_SIZE = 4 --- 10,21 ---- class decl_printer_t( decl_visitor.decl_visitor_t ): ! """Helper class for printing decl tree. ! ! This class provides more information than the __str__() methods do. ! The class is not just meant to provide a unique "id" for a declaration ! but to inspect an entire declaration tree. This is particularly useful ! for new users who want to find out how pyplusplus works and how it ! stores its data. ! """ JUSTIFY = 20 INDENT_SIZE = 4 |