pygccxml-commit Mailing List for C++ Python language bindings (Page 18)
Brought to you by:
mbaas,
roman_yakovenko
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(190) |
Apr
(166) |
May
(170) |
Jun
(75) |
Jul
(105) |
Aug
(131) |
Sep
(99) |
Oct
(84) |
Nov
(67) |
Dec
(54) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(66) |
Feb
(49) |
Mar
(25) |
Apr
(62) |
May
(21) |
Jun
(34) |
Jul
(9) |
Aug
(21) |
Sep
(5) |
Oct
|
Nov
(63) |
Dec
(34) |
2008 |
Jan
(10) |
Feb
(42) |
Mar
(26) |
Apr
(25) |
May
(6) |
Jun
(40) |
Jul
(18) |
Aug
(29) |
Sep
(6) |
Oct
(32) |
Nov
(14) |
Dec
(56) |
2009 |
Jan
(127) |
Feb
(52) |
Mar
(2) |
Apr
(10) |
May
(29) |
Jun
(3) |
Jul
|
Aug
(16) |
Sep
(4) |
Oct
(11) |
Nov
(8) |
Dec
(14) |
2010 |
Jan
(31) |
Feb
(1) |
Mar
(7) |
Apr
(9) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(8) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <rom...@us...> - 2008-10-12 13:34:19
|
Revision: 1432 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1432&view=rev Author: roman_yakovenko Date: 2008-10-12 13:34:12 +0000 (Sun, 12 Oct 2008) Log Message: ----------- update docs Modified Paths: -------------- pyplusplus_dev/docs/history/history.rest website/site_creator/environment.py Modified: pyplusplus_dev/docs/history/history.rest =================================================================== --- pyplusplus_dev/docs/history/history.rest 2008-10-12 10:22:11 UTC (rev 1431) +++ pyplusplus_dev/docs/history/history.rest 2008-10-12 13:34:12 UTC (rev 1432) @@ -298,7 +298,7 @@ 4. New "Py++" defined `return_pointee_value`_ call policy was introduced. -.. _`return_pointee_value` : ../documentation/functions/call_policies.html#py-defined-call-policies +.. _`return_pointee_value` : ../documentation/functions/call_policies/return_pointee_value.html 5. Support for opaque types was added. Read more about this feature `here`__. Modified: website/site_creator/environment.py =================================================================== --- website/site_creator/environment.py 2008-10-12 10:22:11 UTC (rev 1431) +++ website/site_creator/environment.py 2008-10-12 13:34:12 UTC (rev 1432) @@ -21,8 +21,8 @@ production_dir = os.path.join( os.path.split( sources_root )[0], 'production' ) production_www_dir = os.path.join( production_dir, 'www') configuration_file = 'www_configuration' - #templates_dir = os.path.join( development_dir, 'templates', 'offline' ) - templates_dir = os.path.join( development_dir, 'templates', 'online' ) + templates_dir = os.path.join( development_dir, 'templates', 'offline' ) + #templates_dir = os.path.join( development_dir, 'templates', 'online' ) site_css = 'language_binding.css' home_url = 'http://www.language-binding.net' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-12 10:27:16
|
Revision: 1431 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1431&view=rev Author: roman_yakovenko Date: 2008-10-12 10:22:11 +0000 (Sun, 12 Oct 2008) Log Message: ----------- update docs Modified Paths: -------------- developer_scripts/check_links.bat pygccxml_dev/announcement.txt pygccxml_dev/docs/history/history.rest pyplusplus_dev/announcement.txt pyplusplus_dev/contrib/doc_extractors/doxygen.py pyplusplus_dev/docs/history/history.rest Modified: developer_scripts/check_links.bat =================================================================== --- developer_scripts/check_links.bat 2008-10-12 08:14:32 UTC (rev 1430) +++ developer_scripts/check_links.bat 2008-10-12 10:22:11 UTC (rev 1431) @@ -1,3 +1,3 @@ cd D:\dev\language-binding\production\www\ -E:\Python25\Scripts\linkchecker.bat --config=D:\dev\language-binding\sources\developer_scripts\linkcheckerrc index.html +E:\Python25\Scripts\linkchecker.bat --no-warnings index.html Modified: pygccxml_dev/announcement.txt =================================================================== --- pygccxml_dev/announcement.txt 2008-10-12 08:14:32 UTC (rev 1430) +++ pygccxml_dev/announcement.txt 2008-10-12 10:22:11 UTC (rev 1431) @@ -1,6 +1,6 @@ Hello! -I'm pleased to announce the 0.9.0 release of pygccxml. +I'm pleased to announce the 1.0 release of pygccxml. What is pygccxml? ================= @@ -23,34 +23,21 @@ What's new? =========== -Performance ------------ +Features +--------- -Performance was improved. pygccxml is now 30-50% faster. The improvement was -achieved by using "cElementTree" package, "iterparse" functionality, instead of -standard XML SAX API. +* Support for ellipsis was added. +* New expiremental back-end, based on ``.pdb`` (progam database file), was added. -Small features --------------- +* New high-level API wrapper for ``.bsc`` (browse source code file) was added. -* Class calldef_t has new property - "does_throw". It describes whether the - function throws any exception or not. -* "is_base_and_derived" function arguments were changed. The second argument could be - a tuple, which contains classes. The function returns ``True`` if at least one - class derives from the base one. - - Bug fixes --------- -* C++ does not define implicit conversion between an integral type and ``void*``. - "declarations.is_convertible" type traits was fixed. +* Search algorithm, for template instantiated classes, was improved. -* Small bug was fixed in functionality that corrects GCC-XML reported function - default arguments. Reference to "enum" declaration extracted properly. - For a more complete list, please see the news: http://language-binding.net/pygccxml/history/history.html Modified: pygccxml_dev/docs/history/history.rest =================================================================== --- pygccxml_dev/docs/history/history.rest 2008-10-12 08:14:32 UTC (rev 1430) +++ pygccxml_dev/docs/history/history.rest 2008-10-12 10:22:11 UTC (rev 1431) @@ -22,6 +22,7 @@ * Miguel Lobo * Jeremy Sanders * Ben Schleimer +* Gustavo Carneiro ----------- @@ -65,6 +66,8 @@ 7. Search algorithm was improved for template instantiated classes. From now, a spaces within the class name doesn't matter. +8. pygccxml unit tests functionality was improved. Many thanks to Gustavo Carneiro. + ------------- Version 0.9.5 ------------- Modified: pyplusplus_dev/announcement.txt =================================================================== --- pyplusplus_dev/announcement.txt 2008-10-12 08:14:32 UTC (rev 1430) +++ pyplusplus_dev/announcement.txt 2008-10-12 10:22:11 UTC (rev 1431) @@ -1,6 +1,6 @@ Hello! -I'm pleased to announce the 0.9.0 release of Py++. +I'm pleased to announce the 1.0 release of Py++. What is Py++? ============= @@ -21,35 +21,25 @@ Features -------- -* Added exposing of copy constructor, ``operator=`` and ``operator<<``. - * ``operator=`` is exposed under "assign" name - * ``operator<<`` is exposed under "__str__" name +* Algorightm, which defines what virtual functions should be redefined was improved. -* Added new call policies: - * as_tuple - * custom_call_policies - * return_range +* Exposing "C" code became easier - Py++ is able to generate ``ctypes`` friendly code. -* Added an initial support for multi-module development. Now you can mark your - declarations as ``already_exposed`` and `Py++`_ will do the rest. +* Support for ``boost::python::make_constructor`` functionality was added. -* `input_c_buffer`_ - new functions transformation, which allows to pass a Python - sequence to C++ function, instead of pair of arguments: pointer to buffer and size. +* Support for unions and unnamed classes was added. -* Added ability to control generated "include" directives. Now you can ask Py++ - to include a header file, when it generates code for some declaration. +Bug fixes +--------- -* Code generation improvements: system header files (Boost.Python or Py++ defined) - will be included from the generated files only in case the generated code - depends on them. +* Indexing Suite V2 - few bugs were fixed. + + +Contributors: -* Performance: Py++ runs 1.5 - 2 times faster. +* Julian Scheid +* Oliver Schweitzer -* Py++ will generate documentation for automatically constructed properties. -* Added iteration functionality to Boost.Python Indexing Suite V2 ``std::map`` - and ``std::multimap`` containers. - - For a more complete list, with links to documentation, please see the news: http://language-binding.net/pyplusplus/history/history.html Modified: pyplusplus_dev/contrib/doc_extractors/doxygen.py =================================================================== --- pyplusplus_dev/contrib/doc_extractors/doxygen.py 2008-10-12 08:14:32 UTC (rev 1430) +++ pyplusplus_dev/contrib/doc_extractors/doxygen.py 2008-10-12 10:22:11 UTC (rev 1431) @@ -1,112 +1,113 @@ """ -extracting from C++ doxygen documented file -Author G.D. +Fixed and improved version based on "extracting from C++ doxygen documented file Author G.D." and py++ code. + +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) """ -class doc_extractor: - """ - extracts doxigen styled documentation from source - or generates from description - """ - def __init__(self): - #for caching source - self.file_name = None - self.source = None - - def __call__(self, declaration): - try: - if self.file_name != declaration.location.file_name: - self.file_name = declaration.location.file_name - self.source = open(declaration.location.file_name).readlines() - - find_block_end = False - doc_lines = [] - for lcount in xrange(declaration.location.line - 1, -1, -1): - line = source[lcount] - if not find_block_end: - try: - if line.rstrip()[-2:] == "*/": - find_block_end = True - except: - pass - if find_block_end: - try: - if line.lstrip()[:2] == "/*": - find_block_end = False - except: - pass - final_str = clear_str(line) - if not find_block_end and code(line): - break - if final_str: - doc_lines.insert(0, final_str) - - if doc_lines: - doc_lines.insert(0, self.get_generic_doc()) - return ''.join(doc_lines) - - except: - pass - - return self.get_generic_doc(declaration) - - def get_generic_doc(self, declaration): - """ - generate call information about function or method - """ - try: - return "Help on %s\n" % str(declaration) - except: - pass - - return '' - +class doxygen_doc_extractor: + """ + Extracts Doxigen styled documentation from source + or generates from description. + """ + def __init__(self): + #for caching source + self.file_name = None + self.source = None + #__init__ -def clear_str(str): - """ - replace */! by Space and \breaf, \fn, \param, ... - """ - clean = lambda str, sym, change2 = '': str.replace(sym, change2) + def __call__(self, declaration): + try: + if self.file_name != declaration.location.file_name: + self.file_name = declaration.location.file_name + self.source = open(declaration.location.file_name).readlines() - str = reduce(clean, [str, '/', '*', '!', "\brief", "\fn",\ - "@brief", "@fn", "@ref", "\ref"]) - - str = clean(str, "@param", "Param: ") - str = clean(str, "\param", "Param: ") - str = clean(str, "@ingroup", "Group") - str = clean(str, "\ingroup", "Group") - str = clean(str, "@return", "It return") - str = clean(str, "\return", "It return") - return " " + str.lstrip() + find_block_end = False + doc_lines = [] + for lcount in xrange(declaration.location.line-2, -1, -1): + line = self.source[lcount] + if not find_block_end: + try: + print line.rstrip()[-2:] + if line.rstrip()[-2:] == "*/": + find_block_end = True + except: + pass + if find_block_end: + try: + if line.lstrip()[:2] == "/*": + find_block_end = False + except: + pass + final_str = self.clear_str(line) + if not find_block_end and self.is_code(line): + break + if final_str: + doc_lines.insert(0, final_str) + except: + pass + finally: + if doc_lines: + final_doc_lines = [ line.replace("\n","\\n") for line in doc_lines[:-1] ] + final_doc_lines.append(doc_lines[-1].replace("\n","")) + #final_doc_lines.insert(0, self.get_generic_doc(declaration)) + return '\"' + ''.join(final_doc_lines) + '\"' + else: + return '\"\"' + #return '\"'+self.get_generic_doc(declaration)+'\"' + #__call__() - -def code(str): - """ - detect str is code? - """ - try: - beg = str.lstrip()[:2] - return beg != "//" and beg != "/*" - except: - pass - return False + #def get_generic_doc(self, declaration): + #""" + #Generate call information about function or method + #""" + #try: + #return "Help on %s" % str(declaration) + #except: + #pass + #return '' + ##get_generic_doc() -if __name__ == '__main__': - class loc: - def __init__(self, f, l): - self.file_name = f - self.line = l - - class x_decl: - def __init__(self, str, file_name, line): - self.str = str - self.location = loc(file_name, line) - - def __str__(self): - return self.str - - print doc_extractor()(x_decl("myfunc(int x, int y)","core.h",45)) - print doc_extractor()(x_decl("","core.h",209)) - + def clear_str(self, tmp_str): + """ + Replace */! by Space and \breaf, \fn, \param, ... + """ + clean = lambda tmp_str, sym, change2 = '': tmp_str.replace(sym, change2) + + tmp_str = reduce(clean, [tmp_str, '/', '*', '!', "\\brief", "\\fn",\ + "@brief", "@fn", "@ref", "\\ref", "\"", "\'", "\\c"]) + + tmp_str = clean(tmp_str, "@param", "Param:") + tmp_str = clean(tmp_str, "@see", "See:") + tmp_str = clean(tmp_str, "@pre", "Pre-condition:") + tmp_str = clean(tmp_str, "@throws", "Throws:") + tmp_str = clean(tmp_str, "@throw", "Throw:") + tmp_str = clean(tmp_str, "@todo", "TODO:") + tmp_str = clean(tmp_str, "\param", "Param:") + tmp_str = clean(tmp_str, "@ingroup", "Group") + tmp_str = clean(tmp_str, "\ingroup", "Group") + tmp_str = clean(tmp_str, "@return", "It return") + tmp_str = clean(tmp_str, "\\return", "It return") + tmp_str = clean(tmp_str, "\\warning", "Warning:") + tmp_str = clean(tmp_str, "\\WARNING", "Warning:") + tmp_str = clean(tmp_str, "@dot", "[Dot]") + tmp_str = clean(tmp_str, "@enddot", "[/Dot]") + tmp_str = clean(tmp_str, "@code", "[Code]") + tmp_str = clean(tmp_str, "@endcode", "[/Code]") + return tmp_str.lstrip() + #clean_str() + + def is_code(self, tmp_str): + """ + Detect if tmp_str is code + """ + try: + beg = tmp_str.lstrip()[:2] + return beg != "//" and beg != "/*" + except: + pass + return False + #is_code() - +#class doxygen_doc_extractor Modified: pyplusplus_dev/docs/history/history.rest =================================================================== --- pyplusplus_dev/docs/history/history.rest 2008-10-12 08:14:32 UTC (rev 1430) +++ pyplusplus_dev/docs/history/history.rest 2008-10-12 10:22:11 UTC (rev 1431) @@ -1,4 +1,4 @@ -======================== +======================== Py++ development history ======================== @@ -22,6 +22,8 @@ * Meghana Haridev * Julian Scheid * Oliver Schweitzer +* Hernán Ordiales +* Bernd Fritzke ----------- Version 1.0 @@ -148,6 +150,12 @@ .. _`boost::python::make_constructor` : ../documentation/functions/make_constructor.html +5. Support for unions and unnamed classes was added. + +6. Doxygen documentation extractor was improved. Many thanks to Hernán Ordiales. + +7. Py++ documentation was improved. Many thanks to Bernd Fritzke. + ------------- Version 0.9.5 ------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-12 08:17:15
|
Revision: 1430 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1430&view=rev Author: roman_yakovenko Date: 2008-10-12 08:14:32 +0000 (Sun, 12 Oct 2008) Log Message: ----------- update docs Modified Paths: -------------- pyplusplus_dev/docs/documentation/ctypes/ctypes_integration.rest Modified: pyplusplus_dev/docs/documentation/ctypes/ctypes_integration.rest =================================================================== --- pyplusplus_dev/docs/documentation/ctypes/ctypes_integration.rest 2008-10-12 07:08:30 UTC (rev 1429) +++ pyplusplus_dev/docs/documentation/ctypes/ctypes_integration.rest 2008-10-12 08:14:32 UTC (rev 1430) @@ -83,7 +83,7 @@ * to add ability to expose "C" functions without using `Boost.Python`_. -.. _`new call policy was created` : ./../../documentation/functions/call_policies.html#return-addressof +.. _`new call policy was created` : ./../../documentation/functions/call_policies/return_addressof.html .. _`ctypes` : http://docs.python.org/lib/module-ctypes.html .. _`from_address` : http://docs.python.org/lib/ctypes-data-types.html .. _`Py++` : ./../../pyplusplus.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-12 07:08:42
|
Revision: 1429 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1429&view=rev Author: roman_yakovenko Date: 2008-10-12 07:08:30 +0000 (Sun, 12 Oct 2008) Log Message: ----------- remove duplicated "how to ... ?" Modified Paths: -------------- pyplusplus_dev/docs/documentation/how_to/how_to.rest Modified: pyplusplus_dev/docs/documentation/how_to/how_to.rest =================================================================== --- pyplusplus_dev/docs/documentation/how_to/how_to.rest 2008-10-10 21:35:04 UTC (rev 1428) +++ pyplusplus_dev/docs/documentation/how_to/how_to.rest 2008-10-12 07:08:30 UTC (rev 1429) @@ -24,61 +24,7 @@ .. _`Generated file name is too long` : ./file_name_too_long.html -------------------------------------------------------- -How to expose function, which has hand-written wrapper? -------------------------------------------------------- -.. code-block:: C++ - struct window_t{ - ... - void get_size( int& height, int& widht ) const; - }; - -You can not expose ``get_size`` function as is - ``int`` is immutable type in -Python. So, we need to create a wrapper to the function: - -.. code-block:: C++ - - boost::python::tuple get_size_wrapper( const window_t& win ){ - int height(0), width( 0 ); - win.get_size( height, widht ); - return boost::python::make_tuple( height, width ); - } - -.. code-block:: C++ - - class_<window_t>( ... ) - .def( "get_size", &get_size_wrapper ) - ... - ; - -Now, after you know how this problem is solved. I will show how this solution -could be integrated with `Py++`_. - -.. code-block:: Python - - wrapper_code = \ - """ - static boost::python::tuple get_size( const window_t& win ){ - int height(0), width( 0 ); - win.get_size( height, width ); - return boost::python::make_tuple( height, width ); - } - """ - -.. code-block:: Python - - mb = module_builder_t( ... ) - window = mb.class_( "window_t" ) - window.member_function( "get_size" ).exclude() - window.add_wrapper_code( wrapper_code ) - registration_code = 'def( "get_size", &%s::get_size )' % window.wrapper_alias - window.registration_code( registration_code ) - -That's all. - - - .. _`Py++` : ./../../pyplusplus.html .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html .. _`Python`: http://www.python.org This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-10 21:35:47
|
Revision: 1428 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1428&view=rev Author: roman_yakovenko Date: 2008-10-10 21:35:04 +0000 (Fri, 10 Oct 2008) Log Message: ----------- update copyright Modified Paths: -------------- developer_scripts/clean_source_dir.py developer_scripts/file_system_iter.py pydsc_dev/pydsc.py pydsc_dev/setup.py pydsc_dev/unittests/do_not_check/__init__.py pydsc_dev/unittests/tester.py pydsc_dev/unittests/to_be_tested.py pygccxml_dev/README.txt pygccxml_dev/docs/example/example.py pygccxml_dev/docs/users.rest pygccxml_dev/pygccxml/__init__.py pygccxml_dev/pygccxml/declarations/__init__.py pygccxml_dev/pygccxml/declarations/algorithm.py pygccxml_dev/pygccxml/declarations/algorithms_cache.py pygccxml_dev/pygccxml/declarations/call_invocation.py pygccxml_dev/pygccxml/declarations/calldef.py pygccxml_dev/pygccxml/declarations/class_declaration.py pygccxml_dev/pygccxml/declarations/compilers.py pygccxml_dev/pygccxml/declarations/container_traits.py pygccxml_dev/pygccxml/declarations/cpptypes.py pygccxml_dev/pygccxml/declarations/decl_factory.py pygccxml_dev/pygccxml/declarations/decl_printer.py pygccxml_dev/pygccxml/declarations/decl_visitor.py pygccxml_dev/pygccxml/declarations/declaration.py pygccxml_dev/pygccxml/declarations/dependencies.py pygccxml_dev/pygccxml/declarations/enumeration.py pygccxml_dev/pygccxml/declarations/filtering.py pygccxml_dev/pygccxml/declarations/function_traits.py pygccxml_dev/pygccxml/declarations/matcher.py pygccxml_dev/pygccxml/declarations/matchers.py pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py pygccxml_dev/pygccxml/declarations/namespace.py pygccxml_dev/pygccxml/declarations/pattern_parser.py pygccxml_dev/pygccxml/declarations/scopedef.py pygccxml_dev/pygccxml/declarations/templates.py pygccxml_dev/pygccxml/declarations/type_traits.py pygccxml_dev/pygccxml/declarations/type_visitor.py pygccxml_dev/pygccxml/declarations/typedef.py pygccxml_dev/pygccxml/declarations/variable.py pygccxml_dev/pygccxml/parser/__init__.py pygccxml_dev/pygccxml/parser/config.py pygccxml_dev/pygccxml/parser/declarations_cache.py pygccxml_dev/pygccxml/parser/directory_cache.py pygccxml_dev/pygccxml/parser/etree_scanner.py pygccxml_dev/pygccxml/parser/linker.py pygccxml_dev/pygccxml/parser/patcher.py pygccxml_dev/pygccxml/parser/project_reader.py pygccxml_dev/pygccxml/parser/scanner.py pygccxml_dev/pygccxml/parser/source_reader.py pygccxml_dev/pygccxml/utils/__init__.py pygccxml_dev/pygccxml/utils/fs_utils.py pygccxml_dev/setup.py pygccxml_dev/unittests/algorithms_cache_tester.py pygccxml_dev/unittests/attributes_tester.py pygccxml_dev/unittests/autoconfig.py pygccxml_dev/unittests/better_templates_matcher_tester.py pygccxml_dev/unittests/bit_fields_tester.py pygccxml_dev/unittests/cache_enums_tester.py pygccxml_dev/unittests/cached_source_file_tester.py pygccxml_dev/unittests/call_invocation_tester.py pygccxml_dev/unittests/calldef_matcher_tester.py pygccxml_dev/unittests/complex_types_tester.py pygccxml_dev/unittests/copy_constructor_tester.py pygccxml_dev/unittests/core_tester.py pygccxml_dev/unittests/data/abstract_classes.hpp pygccxml_dev/unittests/data/attributes.hpp pygccxml_dev/unittests/data/better_templates_matcher_tester.hpp pygccxml_dev/unittests/data/bit_fields.hpp pygccxml_dev/unittests/data/complex_types.hpp pygccxml_dev/unittests/data/core_cache.hpp pygccxml_dev/unittests/data/core_class_hierarchy.hpp pygccxml_dev/unittests/data/core_diamand_hierarchy_base.hpp pygccxml_dev/unittests/data/core_diamand_hierarchy_derived1.hpp pygccxml_dev/unittests/data/core_diamand_hierarchy_derived2.hpp pygccxml_dev/unittests/data/core_diamand_hierarchy_final_derived.hpp pygccxml_dev/unittests/data/core_membership.hpp pygccxml_dev/unittests/data/core_ns_join_1.hpp pygccxml_dev/unittests/data/core_ns_join_2.hpp pygccxml_dev/unittests/data/core_ns_join_3.hpp pygccxml_dev/unittests/data/core_overloads_1.hpp pygccxml_dev/unittests/data/core_overloads_2.hpp pygccxml_dev/unittests/data/core_types.hpp pygccxml_dev/unittests/data/covariant_returns.hpp pygccxml_dev/unittests/data/declarations_calldef.hpp pygccxml_dev/unittests/data/declarations_comparison.hpp pygccxml_dev/unittests/data/declarations_enums.hpp pygccxml_dev/unittests/data/declarations_for_filtering.hpp pygccxml_dev/unittests/data/declarations_variables.hpp pygccxml_dev/unittests/data/demangled.hpp pygccxml_dev/unittests/data/free_operators.hpp pygccxml_dev/unittests/data/has_public_binary_operator_traits.hpp pygccxml_dev/unittests/data/include_all.hpp pygccxml_dev/unittests/data/include_std.hpp pygccxml_dev/unittests/data/indexing_suites2.hpp pygccxml_dev/unittests/data/patcher.hpp pygccxml_dev/unittests/data/remove_template_defaults.hpp pygccxml_dev/unittests/data/string_traits.hpp pygccxml_dev/unittests/data/type_traits.hpp pygccxml_dev/unittests/data/typedefs1.hpp pygccxml_dev/unittests/data/typedefs2.hpp pygccxml_dev/unittests/data/typedefs_base.hpp pygccxml_dev/unittests/data/unnamed_classes.hpp pygccxml_dev/unittests/data/unnamed_enums_bug1.hpp pygccxml_dev/unittests/data/unnamed_enums_bug2.hpp pygccxml_dev/unittests/data/unnamed_ns_bug.hpp pygccxml_dev/unittests/data/vector_traits.hpp pygccxml_dev/unittests/decl_printer_tester.py pygccxml_dev/unittests/decl_string_tester.py pygccxml_dev/unittests/declaration_files_tester.py pygccxml_dev/unittests/declarations_cache_tester.py pygccxml_dev/unittests/declarations_comparison_tester.py pygccxml_dev/unittests/declarations_tester.py pygccxml_dev/unittests/demangled_tester.py pygccxml_dev/unittests/dependencies_tester.py pygccxml_dev/unittests/file_cache_tester.py pygccxml_dev/unittests/filtering_tester.py pygccxml_dev/unittests/filters_tester.py pygccxml_dev/unittests/find_container_traits_tester.py pygccxml_dev/unittests/free_operators_tester.py pygccxml_dev/unittests/function_traits_tester.py pygccxml_dev/unittests/gccxml_runner_tester.py pygccxml_dev/unittests/has_binary_operator_traits_tester.py pygccxml_dev/unittests/hierarchy_traveling.py pygccxml_dev/unittests/namespace_matcher_tester.py pygccxml_dev/unittests/parser_test_case.py pygccxml_dev/unittests/patcher_tester.py pygccxml_dev/unittests/plain_c_tester.py pygccxml_dev/unittests/profile_parser.py pygccxml_dev/unittests/project_reader_correctness_tester.py pygccxml_dev/unittests/remove_template_defaults_tester.py pygccxml_dev/unittests/source_reader_tester.py pygccxml_dev/unittests/start_with_declarations_tester.py pygccxml_dev/unittests/string_traits_tester.py pygccxml_dev/unittests/templates_tester.py pygccxml_dev/unittests/test_all.py pygccxml_dev/unittests/test_performance.py pygccxml_dev/unittests/text_reader_tester.py pygccxml_dev/unittests/timeit_test_parser.py pygccxml_dev/unittests/type_as_exception_bug_tester.py pygccxml_dev/unittests/type_traits_tester.py pygccxml_dev/unittests/typedefs_tester.py pygccxml_dev/unittests/unnamed_classes_tester.py pygccxml_dev/unittests/unnamed_enums_bug_tester.py pygccxml_dev/unittests/variable_matcher_tester.py pygccxml_dev/unittests/vector_traits_tester.py pygccxml_dev/unittests/xmlfile_reader_tester.py pyplusplus_dev/README.txt pyplusplus_dev/contrib/__init__.py pyplusplus_dev/contrib/goodies/__init__.py pyplusplus_dev/contrib/goodies/dsl_interface.py pyplusplus_dev/contrib/goodies/goodie_overrides.py pyplusplus_dev/contrib/goodies/goodie_perf_overrides.py pyplusplus_dev/contrib/goodies/goodie_utils.py pyplusplus_dev/contrib/pypp_api/pypp_api/__init__.py pyplusplus_dev/contrib/pypp_api/pypp_api/modulebuilder.py pyplusplus_dev/docs/documentation/how_to/file_name_too_long.rest pyplusplus_dev/docs/documentation/how_to/hints.rest pyplusplus_dev/docs/documentation/tutorials/module_builder/generate_code.py pyplusplus_dev/docs/history/history.rest pyplusplus_dev/docs/osdc2006/generate_docs.py pyplusplus_dev/examples/custom_code_creator/generate_code.py pyplusplus_dev/examples/custom_code_creator/sconstruct pyplusplus_dev/examples/pyboost_dev/dev/boost_random/generate_code.py pyplusplus_dev/examples/pyboost_dev/dev/boost_random/random_settings.py pyplusplus_dev/examples/pyboost_dev/dev/boost_random/sconscript pyplusplus_dev/examples/pyboost_dev/dev/crc/crc_export.hpp pyplusplus_dev/examples/pyboost_dev/dev/crc/crc_settings.py pyplusplus_dev/examples/pyboost_dev/dev/crc/generate_code.py pyplusplus_dev/examples/pyboost_dev/dev/crc/sconscript pyplusplus_dev/examples/pyboost_dev/dev/date_time/customization_data.py pyplusplus_dev/examples/pyboost_dev/dev/date_time/date_time_settings.py pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py pyplusplus_dev/examples/pyboost_dev/dev/date_time/sconscript pyplusplus_dev/examples/pyboost_dev/dev/rational/generate_code.py pyplusplus_dev/examples/pyboost_dev/dev/rational/rational_export.hpp pyplusplus_dev/examples/pyboost_dev/dev/rational/rational_settings.py pyplusplus_dev/examples/pyboost_dev/dev/rational/sconscript pyplusplus_dev/examples/pyboost_dev/pyboost/__init__.py pyplusplus_dev/examples/pyboost_dev/pyboost/boost_random/__init__.py pyplusplus_dev/examples/pyboost_dev/pyboost/crc/__init__.py pyplusplus_dev/examples/pyboost_dev/pyboost/date_time/__init__.py pyplusplus_dev/examples/pyboost_dev/pyboost/rational/__init__.py pyplusplus_dev/examples/pyboost_dev/sconstruct pyplusplus_dev/examples/pyboost_dev/setup.py pyplusplus_dev/examples/pyboost_dev/unittestst/boost_random/test_all.py pyplusplus_dev/examples/pyboost_dev/unittestst/crc/test_all.py pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/examples.py pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/gregorian_tester.py pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/local_time_tester.py pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/posix_time_tester.py pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/test_all.py pyplusplus_dev/examples/pyboost_dev/unittestst/rational/test_all.py pyplusplus_dev/examples/pyboost_dev/unittestst/test_all.py pyplusplus_dev/examples/pyeasybmp_dev/pyeasybmp/build_setup.py pyplusplus_dev/examples/pyeasybmp_dev/pyeasybmp/environment.py pyplusplus_dev/examples/pyeasybmp_dev/pyeasybmp/generate_code.py pyplusplus_dev/examples/pyeasybmp_dev/pyeasybmp/sconstruct pyplusplus_dev/examples/pyeasybmp_dev/unittests/grayscale.py pyplusplus_dev/ide/controllers/__init__.py pyplusplus_dev/ide/controllers/controller_main.py pyplusplus_dev/ide/model/__init__.py pyplusplus_dev/ide/model/code_generator.py pyplusplus_dev/ide/model/etree_extension.py pyplusplus_dev/ide/model/settings.py pyplusplus_dev/ide/views/frame_main.py pyplusplus_dev/indexing_suite_v2/docs/indexing_suite_v2.html pyplusplus_dev/pyplusplus/__init__.py pyplusplus_dev/pyplusplus/_logging_/__init__.py pyplusplus_dev/pyplusplus/_logging_/multi_line_formatter.py pyplusplus_dev/pyplusplus/code_creators/__init__.py pyplusplus_dev/pyplusplus/code_creators/algorithm.py pyplusplus_dev/pyplusplus/code_creators/array_1_registrator.py pyplusplus_dev/pyplusplus/code_creators/calldef.py pyplusplus_dev/pyplusplus/code_creators/calldef_transformed.py pyplusplus_dev/pyplusplus/code_creators/calldef_utils.py pyplusplus_dev/pyplusplus/code_creators/class_declaration.py pyplusplus_dev/pyplusplus/code_creators/code_creator.py pyplusplus_dev/pyplusplus/code_creators/compound.py pyplusplus_dev/pyplusplus/code_creators/ctypes_integration_creators.py pyplusplus_dev/pyplusplus/code_creators/custom.py pyplusplus_dev/pyplusplus/code_creators/declaration_based.py pyplusplus_dev/pyplusplus/code_creators/enum.py pyplusplus_dev/pyplusplus/code_creators/exception_translator.py pyplusplus_dev/pyplusplus/code_creators/global_variable.py pyplusplus_dev/pyplusplus/code_creators/include.py pyplusplus_dev/pyplusplus/code_creators/include_directories.py pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py pyplusplus_dev/pyplusplus/code_creators/instruction.py pyplusplus_dev/pyplusplus/code_creators/license.py pyplusplus_dev/pyplusplus/code_creators/member_variable.py pyplusplus_dev/pyplusplus/code_creators/module.py pyplusplus_dev/pyplusplus/code_creators/module_body.py pyplusplus_dev/pyplusplus/code_creators/namespace.py pyplusplus_dev/pyplusplus/code_creators/opaque_type_registrator.py pyplusplus_dev/pyplusplus/code_creators/properties.py pyplusplus_dev/pyplusplus/code_creators/registration_based.py pyplusplus_dev/pyplusplus/code_creators/scoped.py pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py pyplusplus_dev/pyplusplus/code_creators/target_configuration.py pyplusplus_dev/pyplusplus/code_creators/unnamed_enum.py pyplusplus_dev/pyplusplus/code_repository/__init__.py pyplusplus_dev/pyplusplus/code_repository/array_1.py pyplusplus_dev/pyplusplus/code_repository/call_policies.py pyplusplus_dev/pyplusplus/code_repository/convenience.py pyplusplus_dev/pyplusplus/code_repository/ctypes_integration.py pyplusplus_dev/pyplusplus/code_repository/gil_guard.py pyplusplus_dev/pyplusplus/code_repository/named_tuple.py pyplusplus_dev/pyplusplus/code_repository/return_pointee_value.hpp pyplusplus_dev/pyplusplus/code_repository/return_range.py pyplusplus_dev/pyplusplus/decl_wrappers/__init__.py pyplusplus_dev/pyplusplus/decl_wrappers/algorithm.py pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/decl_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/decl_wrapper_printer.py pyplusplus_dev/pyplusplus/decl_wrappers/doc_extractor.py pyplusplus_dev/pyplusplus/decl_wrappers/enumeration_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite1.py pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite2.py pyplusplus_dev/pyplusplus/decl_wrappers/namespace_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/properties.py pyplusplus_dev/pyplusplus/decl_wrappers/python_traits.py pyplusplus_dev/pyplusplus/decl_wrappers/scopedef_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/typedef_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/user_text.py pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py pyplusplus_dev/pyplusplus/file_writers/__init__.py pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py pyplusplus_dev/pyplusplus/file_writers/md5sum_repository.py pyplusplus_dev/pyplusplus/file_writers/multiple_files.py pyplusplus_dev/pyplusplus/file_writers/single_file.py pyplusplus_dev/pyplusplus/file_writers/writer.py pyplusplus_dev/pyplusplus/gui/__init__.py pyplusplus_dev/pyplusplus/gui/freeze.py pyplusplus_dev/pyplusplus/gui/ui.py pyplusplus_dev/pyplusplus/gui/ui_runner.py pyplusplus_dev/pyplusplus/messages/__init__.py pyplusplus_dev/pyplusplus/messages/warnings_.py pyplusplus_dev/pyplusplus/module_builder/__init__.py pyplusplus_dev/pyplusplus/module_builder/builder.py pyplusplus_dev/pyplusplus/module_builder/call_policies.py pyplusplus_dev/pyplusplus/module_creator/__init__.py pyplusplus_dev/pyplusplus/module_creator/call_policies_resolver.py pyplusplus_dev/pyplusplus/module_creator/creator.py pyplusplus_dev/pyplusplus/module_creator/creators_wizard.py pyplusplus_dev/pyplusplus/module_creator/dependencies_manager.py pyplusplus_dev/pyplusplus/module_creator/fake_constructors_manager.py pyplusplus_dev/pyplusplus/module_creator/opaque_types_manager.py pyplusplus_dev/pyplusplus/module_creator/sort_algorithms.py pyplusplus_dev/pyplusplus/module_creator/types_database.py pyplusplus_dev/pyplusplus/utils/__init__.py pyplusplus_dev/scripts/pyplusplus_gui pyplusplus_dev/scripts/pyplusplus_gui.pyw pyplusplus_dev/setup.py pyplusplus_dev/unittests/__init__.py pyplusplus_dev/unittests/abstract_classes_tester.py pyplusplus_dev/unittests/abstract_tester.py pyplusplus_dev/unittests/algorithms_tester.py pyplusplus_dev/unittests/already_exposed_tester.py pyplusplus_dev/unittests/arrays_bug_tester.py pyplusplus_dev/unittests/autoconfig.py pyplusplus_dev/unittests/balanced_files_tester.py pyplusplus_dev/unittests/bool_by_ref_tester.py pyplusplus_dev/unittests/bpmodule_tester.py pyplusplus_dev/unittests/bug_covariant_returns_tester.py pyplusplus_dev/unittests/call_policies_tester.py pyplusplus_dev/unittests/casting_tester.py pyplusplus_dev/unittests/class_order2_tester.py pyplusplus_dev/unittests/class_order3_tester.py pyplusplus_dev/unittests/class_order4_tester.py pyplusplus_dev/unittests/class_order_tester.py pyplusplus_dev/unittests/classes_tester.py pyplusplus_dev/unittests/constructors_bug_tester.py pyplusplus_dev/unittests/convenience_tester.py pyplusplus_dev/unittests/cp_return_addressof_tester.py pyplusplus_dev/unittests/cppexceptions_tester.py pyplusplus_dev/unittests/custom_smart_ptr_classes_tester.py pyplusplus_dev/unittests/custom_string_tester.py pyplusplus_dev/unittests/data/abstract_classes_to_be_exported.hpp pyplusplus_dev/unittests/data/abstract_to_be_exported.hpp pyplusplus_dev/unittests/data/already_exposed_2to_be_exported.hpp pyplusplus_dev/unittests/data/already_exposed_to_be_exported.hpp pyplusplus_dev/unittests/data/arrays_bug_to_be_exported.hpp pyplusplus_dev/unittests/data/balanced_files_to_be_exported.hpp pyplusplus_dev/unittests/data/bug_covariant_returns_to_be_exported.hpp pyplusplus_dev/unittests/data/call_policies_to_be_exported.cpp pyplusplus_dev/unittests/data/call_policies_to_be_exported.hpp pyplusplus_dev/unittests/data/casting_to_be_exported.hpp pyplusplus_dev/unittests/data/class_order2_to_be_exported.hpp pyplusplus_dev/unittests/data/class_order3_to_be_exported.hpp pyplusplus_dev/unittests/data/class_order4_to_be_exported.hpp pyplusplus_dev/unittests/data/class_order_to_be_exported.hpp pyplusplus_dev/unittests/data/classes_to_be_exported.hpp pyplusplus_dev/unittests/data/convenience_to_be_exported.hpp pyplusplus_dev/unittests/data/cp_return_addressof_to_be_exported.hpp pyplusplus_dev/unittests/data/cppexceptions_to_be_exported.hpp pyplusplus_dev/unittests/data/custom_string_to_be_exported.hpp pyplusplus_dev/unittests/data/declarations_order_bug_false_to_be_exported.hpp pyplusplus_dev/unittests/data/declarations_order_bug_true_to_be_exported.hpp pyplusplus_dev/unittests/data/deepcopy_to_be_exported.hpp pyplusplus_dev/unittests/data/default_args_to_be_exported.hpp pyplusplus_dev/unittests/data/duplicate_aliases_to_be_exported.cpp pyplusplus_dev/unittests/data/duplicate_aliases_to_be_exported.hpp pyplusplus_dev/unittests/data/embeded_to_be_exported.hpp pyplusplus_dev/unittests/data/enums_exported_expected.hpp pyplusplus_dev/unittests/data/enums_to_be_exported.hpp pyplusplus_dev/unittests/data/factory_to_be_exported.cpp pyplusplus_dev/unittests/data/factory_to_be_exported.hpp pyplusplus_dev/unittests/data/filesystem_to_be_exported.hpp pyplusplus_dev/unittests/data/final_classes_to_be_exported.hpp pyplusplus_dev/unittests/data/finalizables_to_be_exported.hpp pyplusplus_dev/unittests/data/free_function_ignore_bug_to_be_exported.hpp pyplusplus_dev/unittests/data/free_functions_to_be_exported.hpp pyplusplus_dev/unittests/data/free_operators_to_be_exported.hpp pyplusplus_dev/unittests/data/ft_constructor_to_be_exported.hpp pyplusplus_dev/unittests/data/ft_from_address_to_be_exported.hpp pyplusplus_dev/unittests/data/function_transformations_to_be_exported.hpp pyplusplus_dev/unittests/data/global_variables_to_be_exported.cpp pyplusplus_dev/unittests/data/global_variables_to_be_exported.hpp pyplusplus_dev/unittests/data/hierarchy3_to_be_exported.hpp pyplusplus_dev/unittests/data/index_operator_to_be_exported.hpp pyplusplus_dev/unittests/data/indexing_suites2_to_be_exported.hpp pyplusplus_dev/unittests/data/indexing_suites_to_be_exported.hpp pyplusplus_dev/unittests/data/inner_class_bug_to_be_exported.hpp pyplusplus_dev/unittests/data/inner_tmpl_class_to_be_exported.hpp pyplusplus_dev/unittests/data/internal_classes_to_be_exported.hpp pyplusplus_dev/unittests/data/make_constructor_to_be_exported.hpp pyplusplus_dev/unittests/data/mem_fun_with_exception_to_be_exported.hpp pyplusplus_dev/unittests/data/member_functions_to_be_exported.cpp pyplusplus_dev/unittests/data/member_functions_to_be_exported.hpp pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.cpp pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp pyplusplus_dev/unittests/data/member_variables_to_be_exported.cpp pyplusplus_dev/unittests/data/member_variables_to_be_exported.hpp pyplusplus_dev/unittests/data/module_body_to_be_exported.hpp pyplusplus_dev/unittests/data/namespaces_to_be_exported.hpp pyplusplus_dev/unittests/data/no_init_to_be_exported.hpp pyplusplus_dev/unittests/data/non_overridable_to_be_exported.cpp pyplusplus_dev/unittests/data/non_overridable_to_be_exported.hpp pyplusplus_dev/unittests/data/noncopyable_to_be_exported.hpp pyplusplus_dev/unittests/data/operators_bug_to_be_exported.hpp pyplusplus_dev/unittests/data/operators_to_be_exported.hpp pyplusplus_dev/unittests/data/optional_bug_to_be_exported.hpp pyplusplus_dev/unittests/data/optional_to_be_exported.hpp pyplusplus_dev/unittests/data/overloads_macro_to_be_exported.hpp pyplusplus_dev/unittests/data/override_bug_to_be_exported.hpp pyplusplus_dev/unittests/data/overriden_virtual_functions_bug_to_be_exported.hpp pyplusplus_dev/unittests/data/pointer_as_arg_to_be_exported.hpp pyplusplus_dev/unittests/data/pointer_to_function_as_argument_to_be_exported.hpp pyplusplus_dev/unittests/data/precompiled_header_to_be_exported.hpp pyplusplus_dev/unittests/data/private_assign_to_be_exported.hpp pyplusplus_dev/unittests/data/properties_to_be_exported.hpp pyplusplus_dev/unittests/data/protected_to_be_exported.hpp pyplusplus_dev/unittests/data/recursive_to_be_exported.hpp pyplusplus_dev/unittests/data/regression1_to_be_exported.hpp pyplusplus_dev/unittests/data/regression2_to_be_exported.hpp pyplusplus_dev/unittests/data/regression3_to_be_exported.hpp pyplusplus_dev/unittests/data/return_auto_ptr_to_be_exported.hpp pyplusplus_dev/unittests/data/smart_pointers_to_be_exported.cpp pyplusplus_dev/unittests/data/smart_pointers_to_be_exported.hpp pyplusplus_dev/unittests/data/special_operators_to_be_exported.hpp pyplusplus_dev/unittests/data/split_module_bug_to_be_exported.hpp pyplusplus_dev/unittests/data/split_module_indexing_suite_bug_to_be_exported.hpp pyplusplus_dev/unittests/data/split_module_to_be_exported.hpp pyplusplus_dev/unittests/data/statics_to_be_exported.cpp pyplusplus_dev/unittests/data/statics_to_be_exported.hpp pyplusplus_dev/unittests/data/templates_to_be_exported.hpp pyplusplus_dev/unittests/data/temporary_variable_to_be_exported.hpp pyplusplus_dev/unittests/data/throw_to_be_exported.cpp pyplusplus_dev/unittests/data/throw_to_be_exported.hpp pyplusplus_dev/unittests/data/unnamed_classes_to_be_exported.hpp pyplusplus_dev/unittests/data/unnamed_enums_to_be_exported.hpp pyplusplus_dev/unittests/data/user_text_to_be_exported.hpp pyplusplus_dev/unittests/data/vector3_to_be_exported.cpp pyplusplus_dev/unittests/data/vector3_to_be_exported.hpp pyplusplus_dev/unittests/declarations_order_bug_tester.py pyplusplus_dev/unittests/deepcopy_tester.py pyplusplus_dev/unittests/default_args_tester.py pyplusplus_dev/unittests/duplicate_aliases_tester.py pyplusplus_dev/unittests/dwrapper_printer_tester.py pyplusplus_dev/unittests/embeded_tester.py pyplusplus_dev/unittests/enums_tester.py pyplusplus_dev/unittests/exposed_decls_db_tester.py pyplusplus_dev/unittests/factory_tester.py pyplusplus_dev/unittests/final_classes_tester.py pyplusplus_dev/unittests/finalizables_tester.py pyplusplus_dev/unittests/free_function_ignore_bug_tester.py pyplusplus_dev/unittests/free_functions_tester.py pyplusplus_dev/unittests/free_operators_tester.py pyplusplus_dev/unittests/ft_from_address_tester.py pyplusplus_dev/unittests/ft_inout_tester.py pyplusplus_dev/unittests/function_transformations_tester.py pyplusplus_dev/unittests/fundamental_tester_base.py pyplusplus_dev/unittests/global_variables_tester.py pyplusplus_dev/unittests/gui_tester.py pyplusplus_dev/unittests/gui_wizard_tester.py pyplusplus_dev/unittests/hierarchy3_tester.py pyplusplus_dev/unittests/include_exclude_bug_tester.py pyplusplus_dev/unittests/index_operator_tester.py pyplusplus_dev/unittests/indexing_suites2_tester.py pyplusplus_dev/unittests/indexing_suites_tester.py pyplusplus_dev/unittests/inner_class_bug_tester.py pyplusplus_dev/unittests/inner_tmpl_class_tester.py pyplusplus_dev/unittests/internal_classes_tester.py pyplusplus_dev/unittests/mailing_list_help_tester.py pyplusplus_dev/unittests/make_constructor_tester.py pyplusplus_dev/unittests/mdecl_wrapper_tester.py pyplusplus_dev/unittests/mem_fun_with_exception_tester.py pyplusplus_dev/unittests/member_functions_tester.py pyplusplus_dev/unittests/member_variables_tester.py pyplusplus_dev/unittests/module_body_tester.py pyplusplus_dev/unittests/module_properties_tester.py pyplusplus_dev/unittests/namespaces_tester.py pyplusplus_dev/unittests/no_init_tester.py pyplusplus_dev/unittests/non_overridable_tester.py pyplusplus_dev/unittests/noncopyable_tester.py pyplusplus_dev/unittests/ogre_generate_tester.py pyplusplus_dev/unittests/operators_bug_tester.py pyplusplus_dev/unittests/operators_tester.py pyplusplus_dev/unittests/optional_bug_tester.py pyplusplus_dev/unittests/optional_tester.py pyplusplus_dev/unittests/overloads_macro_tester.py pyplusplus_dev/unittests/override_bug_tester.py pyplusplus_dev/unittests/overriden_virtual_functions_bug_tester.py pyplusplus_dev/unittests/particle_universe_generate_tester.py pyplusplus_dev/unittests/pointer_as_arg_tester.py pyplusplus_dev/unittests/pointer_to_function_as_argument.py pyplusplus_dev/unittests/precompiled_header_tester.py pyplusplus_dev/unittests/private_assign_tester.py pyplusplus_dev/unittests/properties_tester.py pyplusplus_dev/unittests/protected_tester.py pyplusplus_dev/unittests/recursive_tester.py pyplusplus_dev/unittests/regression1_tester.py pyplusplus_dev/unittests/regression2_tester.py pyplusplus_dev/unittests/regression3_tester.py pyplusplus_dev/unittests/return_auto_ptr_tester.py pyplusplus_dev/unittests/smart_pointers_tester.py pyplusplus_dev/unittests/special_operators_tester.py pyplusplus_dev/unittests/split_module_bug_tester.py pyplusplus_dev/unittests/split_module_indexing_suite_bug_tester.py pyplusplus_dev/unittests/split_module_tester.py pyplusplus_dev/unittests/statics_tester.py pyplusplus_dev/unittests/templates_tester.py pyplusplus_dev/unittests/temporary_variable_tester.py pyplusplus_dev/unittests/test_all.py pyplusplus_dev/unittests/throw_tester.py pyplusplus_dev/unittests/tnfox_bugs_tester.py pyplusplus_dev/unittests/transfer_ownership_old_tester.py pyplusplus_dev/unittests/transfer_ownership_tester.py pyplusplus_dev/unittests/unions_tester.py pyplusplus_dev/unittests/unnamed_classes_tester.py pyplusplus_dev/unittests/unnamed_enums_tester.py pyplusplus_dev/unittests/user_text_tester.py pyplusplus_dev/unittests/vector3_tester.py pyplusplus_dev/unittests/vector_with_shared_data_tester.py tags/pygccxml_dev_0.9.5/README.txt tags/pygccxml_dev_0.9.5/docs/example/example.py tags/pygccxml_dev_0.9.5/pygccxml/__init__.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/__init__.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/algorithm.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/algorithms_cache.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/call_invocation.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/calldef.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/class_declaration.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/container_traits.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/cpptypes.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/decl_factory.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/decl_printer.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/decl_visitor.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/declaration.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/dependencies.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/enumeration.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/filtering.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/function_traits.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/matcher.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/matchers.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/mdecl_wrapper.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/namespace.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/pattern_parser.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/scopedef.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/templates.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/type_traits.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/type_visitor.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/typedef.py tags/pygccxml_dev_0.9.5/pygccxml/declarations/variable.py tags/pygccxml_dev_0.9.5/pygccxml/parser/__init__.py tags/pygccxml_dev_0.9.5/pygccxml/parser/config.py tags/pygccxml_dev_0.9.5/pygccxml/parser/declarations_cache.py tags/pygccxml_dev_0.9.5/pygccxml/parser/directory_cache.py tags/pygccxml_dev_0.9.5/pygccxml/parser/etree_scanner.py tags/pygccxml_dev_0.9.5/pygccxml/parser/linker.py tags/pygccxml_dev_0.9.5/pygccxml/parser/patcher.py tags/pygccxml_dev_0.9.5/pygccxml/parser/project_reader.py tags/pygccxml_dev_0.9.5/pygccxml/parser/scanner.py tags/pygccxml_dev_0.9.5/pygccxml/parser/source_reader.py tags/pygccxml_dev_0.9.5/pygccxml/parser/synopsis_scanner.py tags/pygccxml_dev_0.9.5/pygccxml/utils/__init__.py tags/pygccxml_dev_0.9.5/setup.py tags/pygccxml_dev_0.9.5/unittests/algorithms_cache_tester.py tags/pygccxml_dev_0.9.5/unittests/attributes_tester.py tags/pygccxml_dev_0.9.5/unittests/autoconfig.py tags/pygccxml_dev_0.9.5/unittests/bit_fields_tester.py tags/pygccxml_dev_0.9.5/unittests/cache_enums_tester.py tags/pygccxml_dev_0.9.5/unittests/cached_source_file_tester.py tags/pygccxml_dev_0.9.5/unittests/call_invocation_tester.py tags/pygccxml_dev_0.9.5/unittests/calldef_matcher_tester.py tags/pygccxml_dev_0.9.5/unittests/complex_types_tester.py tags/pygccxml_dev_0.9.5/unittests/copy_constructor_tester.py tags/pygccxml_dev_0.9.5/unittests/core_tester.py tags/pygccxml_dev_0.9.5/unittests/data/abstract_classes.hpp tags/pygccxml_dev_0.9.5/unittests/data/attributes.hpp tags/pygccxml_dev_0.9.5/unittests/data/bit_fields.hpp tags/pygccxml_dev_0.9.5/unittests/data/complex_types.hpp tags/pygccxml_dev_0.9.5/unittests/data/core_cache.hpp tags/pygccxml_dev_0.9.5/unittests/data/core_class_hierarchy.hpp tags/pygccxml_dev_0.9.5/unittests/data/core_diamand_hierarchy_base.hpp tags/pygccxml_dev_0.9.5/unittests/data/core_diamand_hierarchy_derived1.hpp tags/pygccxml_dev_0.9.5/unittests/data/core_diamand_hierarchy_derived2.hpp tags/pygccxml_dev_0.9.5/unittests/data/core_diamand_hierarchy_final_derived.hpp tags/pygccxml_dev_0.9.5/unittests/data/core_membership.hpp tags/pygccxml_dev_0.9.5/unittests/data/core_ns_join_1.hpp tags/pygccxml_dev_0.9.5/unittests/data/core_ns_join_2.hpp tags/pygccxml_dev_0.9.5/unittests/data/core_ns_join_3.hpp tags/pygccxml_dev_0.9.5/unittests/data/core_overloads_1.hpp tags/pygccxml_dev_0.9.5/unittests/data/core_overloads_2.hpp tags/pygccxml_dev_0.9.5/unittests/data/core_types.hpp tags/pygccxml_dev_0.9.5/unittests/data/declarations_calldef.hpp tags/pygccxml_dev_0.9.5/unittests/data/declarations_comparison.hpp tags/pygccxml_dev_0.9.5/unittests/data/declarations_enums.hpp tags/pygccxml_dev_0.9.5/unittests/data/declarations_for_filtering.hpp tags/pygccxml_dev_0.9.5/unittests/data/declarations_variables.hpp tags/pygccxml_dev_0.9.5/unittests/data/demangled.hpp tags/pygccxml_dev_0.9.5/unittests/data/free_operators.hpp tags/pygccxml_dev_0.9.5/unittests/data/has_public_binary_operator_traits.hpp tags/pygccxml_dev_0.9.5/unittests/data/include_all.hpp tags/pygccxml_dev_0.9.5/unittests/data/include_std.hpp tags/pygccxml_dev_0.9.5/unittests/data/indexing_suites2.hpp tags/pygccxml_dev_0.9.5/unittests/data/patcher.hpp tags/pygccxml_dev_0.9.5/unittests/data/remove_template_defaults.hpp tags/pygccxml_dev_0.9.5/unittests/data/string_traits.hpp tags/pygccxml_dev_0.9.5/unittests/data/type_traits.hpp tags/pygccxml_dev_0.9.5/unittests/data/typedefs1.hpp tags/pygccxml_dev_0.9.5/unittests/data/typedefs2.hpp tags/pygccxml_dev_0.9.5/unittests/data/typedefs_base.hpp tags/pygccxml_dev_0.9.5/unittests/data/unnamed_classes.hpp tags/pygccxml_dev_0.9.5/unittests/data/unnamed_enums_bug1.hpp tags/pygccxml_dev_0.9.5/unittests/data/unnamed_enums_bug2.hpp tags/pygccxml_dev_0.9.5/unittests/data/unnamed_ns_bug.hpp tags/pygccxml_dev_0.9.5/unittests/data/vector_traits.hpp tags/pygccxml_dev_0.9.5/unittests/decl_printer_tester.py tags/pygccxml_dev_0.9.5/unittests/decl_string_tester.py tags/pygccxml_dev_0.9.5/unittests/declaration_files_tester.py tags/pygccxml_dev_0.9.5/unittests/declarations_cache_tester.py tags/pygccxml_dev_0.9.5/unittests/declarations_comparison_tester.py tags/pygccxml_dev_0.9.5/unittests/declarations_tester.py tags/pygccxml_dev_0.9.5/unittests/demangled_tester.py tags/pygccxml_dev_0.9.5/unittests/dependencies_tester.py tags/pygccxml_dev_0.9.5/unittests/file_cache_tester.py tags/pygccxml_dev_0.9.5/unittests/filtering_tester.py tags/pygccxml_dev_0.9.5/unittests/filters_tester.py tags/pygccxml_dev_0.9.5/unittests/find_container_traits_tester.py tags/pygccxml_dev_0.9.5/unittests/free_operators_tester.py tags/pygccxml_dev_0.9.5/unittests/gccxml_runner_tester.py tags/pygccxml_dev_0.9.5/unittests/has_binary_operator_traits_tester.py tags/pygccxml_dev_0.9.5/unittests/hierarchy_traveling.py tags/pygccxml_dev_0.9.5/unittests/namespace_matcher_tester.py tags/pygccxml_dev_0.9.5/unittests/parser_test_case.py tags/pygccxml_dev_0.9.5/unittests/patcher_tester.py tags/pygccxml_dev_0.9.5/unittests/profile_parser.py tags/pygccxml_dev_0.9.5/unittests/project_reader_correctness_tester.py tags/pygccxml_dev_0.9.5/unittests/remove_template_defaults_tester.py tags/pygccxml_dev_0.9.5/unittests/source_reader_tester.py tags/pygccxml_dev_0.9.5/unittests/start_with_declarations_tester.py tags/pygccxml_dev_0.9.5/unittests/string_traits_tester.py tags/pygccxml_dev_0.9.5/unittests/templates_tester.py tags/pygccxml_dev_0.9.5/unittests/test_all.py tags/pygccxml_dev_0.9.5/unittests/test_performance.py tags/pygccxml_dev_0.9.5/unittests/text_reader_tester.py tags/pygccxml_dev_0.9.5/unittests/timeit_test_parser.py tags/pygccxml_dev_0.9.5/unittests/type_as_exception_bug_tester.py tags/pygccxml_dev_0.9.5/unittests/type_traits_tester.py tags/pygccxml_dev_0.9.5/unittests/typedefs_tester.py tags/pygccxml_dev_0.9.5/unittests/unnamed_classes_tester.py tags/pygccxml_dev_0.9.5/unittests/unnamed_enums_bug_tester.py tags/pygccxml_dev_0.9.5/unittests/variable_matcher_tester.py tags/pygccxml_dev_0.9.5/unittests/vector_traits_tester.py tags/pygccxml_dev_0.9.5/unittests/xmlfile_reader_tester.py tags/pyplusplus_dev_0.9.5/README.txt tags/pyplusplus_dev_0.9.5/contrib/__init__.py tags/pyplusplus_dev_0.9.5/contrib/goodies/__init__.py tags/pyplusplus_dev_0.9.5/contrib/goodies/dsl_interface.py tags/pyplusplus_dev_0.9.5/contrib/goodies/goodie_overrides.py tags/pyplusplus_dev_0.9.5/contrib/goodies/goodie_perf_overrides.py tags/pyplusplus_dev_0.9.5/contrib/goodies/goodie_utils.py tags/pyplusplus_dev_0.9.5/contrib/pypp_api/pypp_api/__init__.py tags/pyplusplus_dev_0.9.5/contrib/pypp_api/pypp_api/modulebuilder.py tags/pyplusplus_dev_0.9.5/docs/documentation/tutorials/module_builder/generate_code.py tags/pyplusplus_dev_0.9.5/docs/osdc2006/generate_docs.py tags/pyplusplus_dev_0.9.5/examples/custom_code_creator/generate_code.py tags/pyplusplus_dev_0.9.5/examples/custom_code_creator/sconstruct tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/boost_random/generate_code.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/boost_random/random_settings.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/boost_random/sconscript tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/crc/crc_export.hpp tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/crc/crc_settings.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/crc/generate_code.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/crc/sconscript tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/date_time/customization_data.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/date_time/date_time_settings.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/date_time/generate_code.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/date_time/sconscript tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/rational/generate_code.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/rational/rational_export.hpp tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/rational/rational_settings.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/dev/rational/sconscript tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/pyboost/__init__.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/pyboost/boost_random/__init__.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/pyboost/crc/__init__.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/pyboost/date_time/__init__.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/pyboost/rational/__init__.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/sconstruct tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/setup.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/unittestst/boost_random/test_all.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/unittestst/crc/test_all.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/unittestst/date_time/examples.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/unittestst/date_time/gregorian_tester.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/unittestst/date_time/local_time_tester.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/unittestst/date_time/posix_time_tester.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/unittestst/date_time/test_all.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/unittestst/rational/test_all.py tags/pyplusplus_dev_0.9.5/examples/pyboost_dev/unittestst/test_all.py tags/pyplusplus_dev_0.9.5/examples/pyeasybmp_dev/pyeasybmp/build_setup.py tags/pyplusplus_dev_0.9.5/examples/pyeasybmp_dev/pyeasybmp/environment.py tags/pyplusplus_dev_0.9.5/examples/pyeasybmp_dev/pyeasybmp/generate_code.py tags/pyplusplus_dev_0.9.5/examples/pyeasybmp_dev/pyeasybmp/sconstruct tags/pyplusplus_dev_0.9.5/examples/pyeasybmp_dev/unittests/grayscale.py tags/pyplusplus_dev_0.9.5/ide/controllers/__init__.py tags/pyplusplus_dev_0.9.5/ide/controllers/controller_main.py tags/pyplusplus_dev_0.9.5/ide/model/__init__.py tags/pyplusplus_dev_0.9.5/ide/model/code_generator.py tags/pyplusplus_dev_0.9.5/ide/model/etree_extension.py tags/pyplusplus_dev_0.9.5/ide/model/settings.py tags/pyplusplus_dev_0.9.5/ide/views/frame_main.py tags/pyplusplus_dev_0.9.5/pyplusplus/__init__.py tags/pyplusplus_dev_0.9.5/pyplusplus/_logging_/__init__.py tags/pyplusplus_dev_0.9.5/pyplusplus/_logging_/multi_line_formatter.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/__init__.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/algorithm.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/array_1_registrator.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/calldef.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/calldef_transformed.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/calldef_utils.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/class_declaration.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/code_creator.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/compound.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/custom.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/declaration_based.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/enum.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/exception_translator.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/global_variable.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/include.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/include_directories.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/indexing_suites.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/instruction.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/license.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/member_variable.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/module.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/module_body.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/namespace.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/opaque_type_registrator.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/properties.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/registration_based.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/scoped.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/smart_pointers.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/target_configuration.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_creators/unnamed_enum.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_repository/__init__.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_repository/array_1.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_repository/call_policies.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_repository/convenience.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_repository/gil_guard.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_repository/named_tuple.py tags/pyplusplus_dev_0.9.5/pyplusplus/code_repository/return_pointee_value.hpp tags/pyplusplus_dev_0.9.5/pyplusplus/code_repository/return_range.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/__init__.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/algorithm.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/call_policies.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/calldef_wrapper.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/class_wrapper.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/decl_wrapper.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/decl_wrapper_printer.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/doc_extractor.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/enumeration_wrapper.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/indexing_suite1.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/indexing_suite2.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/namespace_wrapper.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/properties.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/python_traits.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/scopedef_wrapper.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/typedef_wrapper.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/user_text.py tags/pyplusplus_dev_0.9.5/pyplusplus/decl_wrappers/variable_wrapper.py tags/pyplusplus_dev_0.9.5/pyplusplus/file_writers/__init__.py tags/pyplusplus_dev_0.9.5/pyplusplus/file_writers/class_multiple_files.py tags/pyplusplus_dev_0.9.5/pyplusplus/file_writers/md5sum_repository.py tags/pyplusplus_dev_0.9.5/pyplusplus/file_writers/multiple_files.py tags/pyplusplus_dev_0.9.5/pyplusplus/file_writers/single_file.py tags/pyplusplus_dev_0.9.5/pyplusplus/file_writers/writer.py tags/pyplusplus_dev_0.9.5/pyplusplus/gui/__init__.py tags/pyplusplus_dev_0.9.5/pyplusplus/gui/freeze.py tags/pyplusplus_dev_0.9.5/pyplusplus/gui/ui.py tags/pyplusplus_dev_0.9.5/pyplusplus/gui/ui_runner.py tags/pyplusplus_dev_0.9.5/pyplusplus/messages/__init__.py tags/pyplusplus_dev_0.9.5/pyplusplus/messages/warnings_.py tags/pyplusplus_dev_0.9.5/pyplusplus/module_builder/__init__.py tags/pyplusplus_dev_0.9.5/pyplusplus/module_builder/builder.py tags/pyplusplus_dev_0.9.5/pyplusplus/module_builder/call_policies.py tags/pyplusplus_dev_0.9.5/pyplusplus/module_creator/__init__.py tags/pyplusplus_dev_0.9.5/pyplusplus/module_creator/call_policies_resolver.py tags/pyplusplus_dev_0.9.5/pyplusplus/module_creator/creator.py tags/pyplusplus_dev_0.9.5/pyplusplus/module_creator/creators_wizard.py tags/pyplusplus_dev_0.9.5/pyplusplus/module_creator/dependencies_manager.py tags/pyplusplus_dev_0.9.5/pyplusplus/module_creator/opaque_types_manager.py tags/pyplusplus_dev_0.9.5/pyplusplus/module_creator/sort_algorithms.py tags/pyplusplus_dev_0.9.5/pyplusplus/module_creator/types_database.py tags/pyplusplus_dev_0.9.5/pyplusplus/utils/__init__.py tags/pyplusplus_dev_0.9.5/scripts/pyplusplus_gui tags/pyplusplus_dev_0.9.5/scripts/pyplusplus_gui.pyw tags/pyplusplus_dev_0.9.5/setup.py tags/pyplusplus_dev_0.9.5/unittests/__init__.py tags/pyplusplus_dev_0.9.5/unittests/abstract_classes_tester.py tags/pyplusplus_dev_0.9.5/unittests/abstract_tester.py tags/pyplusplus_dev_0.9.5/unittests/algorithms_tester.py tags/pyplusplus_dev_0.9.5/unittests/already_exposed_tester.py tags/pyplusplus_dev_0.9.5/unittests/arrays_bug_tester.py tags/pyplusplus_dev_0.9.5/unittests/autoconfig.py tags/pyplusplus_dev_0.9.5/unittests/balanced_files_tester.py tags/pyplusplus_dev_0.9.5/unittests/bpmodule_tester.py tags/pyplusplus_dev_0.9.5/unittests/call_policies_tester.py tags/pyplusplus_dev_0.9.5/unittests/casting_tester.py tags/pyplusplus_dev_0.9.5/unittests/class_order2_tester.py tags/pyplusplus_dev_0.9.5/unittests/class_order3_tester.py tags/pyplusplus_dev_0.9.5/unittests/class_order4_tester.py tags/pyplusplus_dev_0.9.5/unittests/class_order_tester.py tags/pyplusplus_dev_0.9.5/unittests/classes_tester.py tags/pyplusplus_dev_0.9.5/unittests/constructors_bug_tester.py tags/pyplusplus_dev_0.9.5/unittests/convenience_tester.py tags/pyplusplus_dev_0.9.5/unittests/cppexceptions_tester.py tags/pyplusplus_dev_0.9.5/unittests/custom_smart_ptr_classes_tester.py tags/pyplusplus_dev_0.9.5/unittests/custom_string_tester.py tags/pyplusplus_dev_0.9.5/unittests/data/abstract_classes_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/abstract_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/already_exposed_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/arrays_bug_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/balanced_files_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/call_policies_to_be_exported.cpp tags/pyplusplus_dev_0.9.5/unittests/data/call_policies_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/casting_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/class_order2_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/class_order3_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/class_order4_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/class_order_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/classes_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/convenience_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/cppexceptions_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/custom_string_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/declarations_order_bug_false_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/declarations_order_bug_true_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/default_args_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/duplicate_aliases_to_be_exported.cpp tags/pyplusplus_dev_0.9.5/unittests/data/duplicate_aliases_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/enums_exported_expected.hpp tags/pyplusplus_dev_0.9.5/unittests/data/enums_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/factory_to_be_exported.cpp tags/pyplusplus_dev_0.9.5/unittests/data/factory_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/filesystem_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/final_classes_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/finalizables_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/free_function_ignore_bug_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/free_functions_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/free_operators_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/ft_constructor_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/function_transformations_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/global_variables_to_be_exported.cpp tags/pyplusplus_dev_0.9.5/unittests/data/global_variables_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/hierarchy3_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/index_operator_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/indexing_suites2_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/indexing_suites_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/inner_class_bug_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/internal_classes_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/mem_fun_with_exception_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/member_functions_to_be_exported.cpp tags/pyplusplus_dev_0.9.5/unittests/data/member_functions_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/member_variables_to_be_exported.cpp tags/pyplusplus_dev_0.9.5/unittests/data/member_variables_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/module_body_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/namespaces_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/no_init_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/non_overridable_to_be_exported.cpp tags/pyplusplus_dev_0.9.5/unittests/data/non_overridable_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/noncopyable_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/operators_bug_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/operators_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/optional_bug_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/optional_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/overloads_macro_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/overriden_virtual_functions_bug_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/pointer_as_arg_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/pointer_to_function_as_argument_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/precompiled_header_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/private_assign_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/properties_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/protected_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/recursive_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/regression1_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/regression2_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/regression3_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/smart_pointers_to_be_exported.cpp tags/pyplusplus_dev_0.9.5/unittests/data/smart_pointers_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/special_operators_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/split_module_bug_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/split_module_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/statics_to_be_exported.cpp tags/pyplusplus_dev_0.9.5/unittests/data/statics_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/templates_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/temporary_variable_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/throw_to_be_exported.cpp tags/pyplusplus_dev_0.9.5/unittests/data/throw_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/unnamed_classes_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/unnamed_enums_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/user_text_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/data/vector3_to_be_exported.cpp tags/pyplusplus_dev_0.9.5/unittests/data/vector3_to_be_exported.hpp tags/pyplusplus_dev_0.9.5/unittests/declarations_order_bug_tester.py tags/pyplusplus_dev_0.9.5/unittests/default_args_tester.py tags/pyplusplus_dev_0.9.5/unittests/duplicate_aliases_tester.py tags/pyplusplus_dev_0.9.5/unittests/dwrapper_printer_tester.py tags/pyplusplus_dev_0.9.5/unittests/enums_tester.py tags/pyplusplus_dev_0.9.5/unittests/exposed_decls_db_tester.py tags/pyplusplus_dev_0.9.5/unittests/factory_tester.py tags/pyplusplus_dev_0.9.5/unittests/final_classes_tester.py tags/pyplusplus_dev_0.9.5/unittests/finalizables_tester.py tags/pyplusplus_dev_0.9.5/unittests/free_function_ignore_bug_tester.py tags/pyplusplus_dev_0.9.5/unittests/free_functions_tester.py tags/pyplusplus_dev_0.9.5/unittests/free_operators_tester.py tags/pyplusplus_dev_0.9.5/unittests/function_transformations_tester.py tags/pyplusplus_dev_0.9.5/unittests/fundamental_tester_base.py tags/pyplusplus_dev_0.9.5/unittests/global_variables_tester.py tags/pyplusplus_dev_0.9.5/unittests/gui_tester.py tags/pyplusplus_dev_0.9.5/unittests/gui_wizard_tester.py tags/pyplusplus_dev_0.9.5/unittests/hierarchy3_tester.py tags/pyplusplus_dev_0.9.5/unittests/include_exclude_bug_tester.py tags/pyplusplus_dev_0.9.5/unittests/index_operator_tester.py tags/pyplusplus_dev_0.9.5/unittests/indexing_suites2_tester.py tags/pyplusplus_dev_0.9.5/unittests/indexing_suites_tester.py tags/pyplusplus_dev_0.9.5/unittests/inner_class_bug_tester.py tags/pyplusplus_dev_0.9.5/unittests/internal_classes_tester.py tags/pyplusplus_dev_0.9.5/unittests/mailing_list_help_tester.py tags/pyplusplus_dev_0.9.5/unittests/mdecl_wrapper_tester.py tags/pyplusplus_dev_0.9.5/unittests/mem_fun_with_exception_tester.py tags/pyplusplus_dev_0.9.5/unittests/member_functions_tester.py tags/pyplusplus_dev_0.9.5/unittests/member_variables_tester.py tags/pyplusplus_dev_0.9.5/unittests/module_body_tester.py tags/pyplusplus_dev_0.9.5/unittests/module_properties_tester.py tags/pyplusplus_dev_0.9.5/unittests/namespaces_tester.py tags/pyplusplus_dev_0.9.5/unittests/no_init_tester.py tags/pyplusplus_dev_0.9.5/unittests/non_overridable_tester.py tags/pyplusplus_dev_0.9.5/unittests/noncopyable_tester.py tags/pyplusplus_dev_0.9.5/unittests/ogre_generate_tester.py tags/pyplusplus_dev_0.9.5/unittests/operators_bug_tester.py tags/pyplusplus_dev_0.9.5/unittests/operators_tester.py tags/pyplusplus_dev_0.9.5/unittests/optional_bug_tester.py tags/pyplusplus_dev_0.9.5/unittests/optional_tester.py tags/pyplusplus_dev_0.9.5/unittests/overloads_macro_tester.py tags/pyplusplus_dev_0.9.5/unittests/overriden_virtual_functions_bug_tester.py tags/pyplusplus_dev_0.9.5/unittests/pointer_as_arg_tester.py tags/pyplusplus_dev_0.9.5/unittests/pointer_to_function_as_argument.py tags/pyplusplus_dev_0.9.5/unittests/precompiled_header_tester.py tags/pyplusplus_dev_0.9.5/unittests/private_assign_tester.py tags/pyplusplus_dev_0.9.5/unittests/properties_tester.py tags/pyplusplus_dev_0.9.5/unittests/protected_tester.py tags/pyplusplus_dev_0.9.5/unittests/recursive_tester.py tags/pyplusplus_dev_0.9.5/unittests/regression1_tester.py tags/pyplusplus_dev_0.9.5/unittests/regression2_tester.py tags/pyplusplus_dev_0.9.5/unittests/regression3_tester.py tags/pyplusplus_dev_0.9.5/unittests/smart_pointers_tester.py tags/pyplusplus_dev_0.9.5/unittests/special_operators_tester.py tags/pyplusplus_dev_0.9.5/unittests/split_module_bug_tester.py tags/pyplusplus_dev_0.9.5/unittests/split_module_tester.py tags/pyplusplus_dev_0.9.5/unittests/statics_tester.py tags/pyplusplus_dev_0.9.5/unittests/templates_tester.py tags/pyplusplus_dev_0.9.5/unittests/temporary_variable_tester.py tags/pyplusplus_dev_0.9.5/unittests/test_all.py tags/pyplusplus_dev_0.9.5/unittests/throw_tester.py tags/pyplusplus_dev_0.9.5/unittests/tnfox_bugs_tester.py tags/pyplusplus_dev_0.9.5/unittests/transfer_ownership_old_tester.py tags/pyplusplus_dev_0.9.5/unittests/transfer_ownership_tester.py tags/pyplusplus_dev_0.9.5/unittests/unnamed_classes_tester.py tags/pyplusplus_dev_0.9.5/unittests/unnamed_enums_tester.py tags/pyplusplus_dev_0.9.5/unittests/user_text_tester.py tags/pyplusplus_dev_0.9.5/unittests/vector3_tester.py tags/pyplusplus_dev_0.9.5/unittests/vector_with_shared_data_tester.py website/site_creator/file_system_iter.py Added Paths: ----------- pyplusplus_dev/docs/documentation/indexing_suite_v2_files/overview.png pyplusplus_dev/docs/documentation/indexing_suite_v2_files/proxy.png pyplusplus_dev/docs/documentation/indexing_suite_v2_files/proxy_detached.png pyplusplus_dev/indexing_suite_v2/docs/indexing_suite_v2_files/overview.png pyplusplus_dev/indexing_suite_v2/docs/indexing_suite_v2_files/proxy.png pyplusplus_dev/indexing_suite_v2/docs/indexing_suite_v2_files/proxy_detached.png Modified: developer_scripts/clean_source_dir.py =================================================================== --- developer_scripts/clean_source_dir.py 2008-10-06 15:01:03 UTC (rev 1427) +++ developer_scripts/clean_source_dir.py 2008-10-10 21:35:04 UTC (rev 1428) @@ -1,4 +1,4 @@ -# Copyright 2004 Roman Yakovenko. +# Copyright 2004-2008 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) Modified: developer_scripts/file_system_iter.py =========... [truncated message content] |
From: <rom...@us...> - 2008-10-06 15:03:45
|
Revision: 1427 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1427&view=rev Author: roman_yakovenko Date: 2008-10-06 15:01:03 +0000 (Mon, 06 Oct 2008) Log Message: ----------- update documentation Modified Paths: -------------- pyplusplus_dev/docs/documentation/functions/call_policies/return_pointee_value.rest Modified: pyplusplus_dev/docs/documentation/functions/call_policies/return_pointee_value.rest =================================================================== --- pyplusplus_dev/docs/documentation/functions/call_policies/return_pointee_value.rest 2008-10-05 21:22:28 UTC (rev 1426) +++ pyplusplus_dev/docs/documentation/functions/call_policies/return_pointee_value.rest 2008-10-06 15:01:03 UTC (rev 1427) @@ -8,16 +8,93 @@ Definition ---------- -Class ``return_pointee_value`` is a model of `ResultConverterGenerator`_ which -can be used to wrap C++ functions returning any pointer, such that the pointee of -return value is copied into a new Python object. +Class ``return_pointee_value`` is a model of `ResultConverterGenerator`_ which +can be used to wrap C++ functions, that return a pointer to a C++ object. The +policy implements the following logic: -------- -Example -------- +.. code-block:: C++ + if( <<<return value is NULL pointer>>> ){ + return None; + } + else{ + return boost::python::object( *<<<return value>>> ); + } + +The return type of the function should be ``T*``. + +It passes the value of the pointee to `Python`_, thus the conversion for ``T`` +is used. This call policy could be used to return pointers to `Python`_, which +types are not known to `Boost.Python`_, but only a conversion for the pointees. + +Therefore this policy should be used to return pointers to objects, whose types +were wrapped with other tools, such as SWIG\SIP. + +Another usage of this call policy is to return to Python new object, which contains +copy of ``(*return value)``. + +Please note: This policy does not take ownership of the wrapped pointer. If the +object pointed to is deleted in C++, the python-object will become invalid too, +if your custom conversion depends on the original object. + +-------- +Examples +-------- + +Unknown type +------------ + +This technique and example was contributed by Maximilian Matthe. + .. code-block:: C++ + struct int_wrapper{ + int_wrapper(int v) + : val(v) + {} + + int val; + }; + + //we will expose the following function + int_wrapper* return_int_wrapper(){ + static int_wrapper w(42); + return &w; + } + + //the Boost.Python custom converter + struct convert_int_wrapper{ + static PyObject* convert(int_wrapper const& w){ + boost::python::object value(w.val); + return boost::python::incref( value.ptr() ); + } + }; + + + BOOST_PYTHON_MODULE(my_module){ + using namespace boost::python; + //register our custom converter + to_python_converter<int_wrapper, convert_int_wrapper, false>(); + + def( "return_int_wrapper" + , &return_int_wrapper + , return_value_policy<return_pointee_value>() ); + } + +Python code: + +.. code-block:: Python + + import my_module + + assert 42 == my_module.return_int_wrapper() + + +Return pointee value +-------------------- + +.. code-block:: C++ + float* get_value(){ static float value = 0.5; return &value; @@ -57,7 +134,6 @@ assert None is my_module.get_null_value() - .. _`ResultConverterGenerator` : http://boost.org/libs/python/doc/v2/ResultConverter.html#ResultConverterGenerator-concept .. _`CallPolicies` : http://www.boost.org/libs/python/doc/v2/CallPolicies.html#CallPolicies-concept This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-05 21:22:33
|
Revision: 1426 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1426&view=rev Author: roman_yakovenko Date: 2008-10-05 21:22:28 +0000 (Sun, 05 Oct 2008) Log Message: ----------- improve Py++ - in case different content is going to be written to the same file, Py++ will raise exception Modified Paths: -------------- pyplusplus_dev/pyplusplus/file_writers/multiple_files.py Modified: pyplusplus_dev/pyplusplus/file_writers/multiple_files.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/multiple_files.py 2008-10-05 20:26:38 UTC (rev 1425) +++ pyplusplus_dev/pyplusplus/file_writers/multiple_files.py 2008-10-05 21:22:28 UTC (rev 1426) @@ -51,6 +51,15 @@ def write_file( self, fpath, content ): + if fpath in self.written_files: + msg = ['Py++ is going to write different content to the same file(%s).' % fpath] + msg.append('The following is a short list of possible explanations for this behaviour:' ) + msg.append('* Py++ bug, in this case, please report it' ) + msg.append('* module_builder_t contains two or more classes with the same alias') + msg.append('* module_builder_t contains two or more classes with the same wrapper alias') + msg.append('Please carefully review Py++ warning messages. It should contain an additional information.') + raise RuntimeError( os.linesep.join(msg) ) + self.written_files.append( fpath ) writer.writer_t.write_file( fpath, content, self.files_sum_repository, self.encoding ) @@ -133,7 +142,7 @@ return None if not isinstance( code_creator.declaration.indexing_suite, decl_wrappers.indexing_suite2_t ): return None - + #sometimes, for some reason I expose containers as regular classes ( hash_map ) #and in this case I do generate include to classes = ( code_creators.indexing_suite1_t, code_creators.indexing_suite2_t ) @@ -142,7 +151,7 @@ break else: return None - + try: element_type = code_creator.declaration.indexing_suite.element_type class_traits = declarations.class_traits @@ -150,20 +159,20 @@ return None value_class = class_traits.get_declaration( element_type ) if value_class.less_than_comparable and value_class.equality_comparable: - return None #Py++ doesn't create value traits for class that has + return None #Py++ doesn't create value traits for class that has # = and < operators available return self.create_value_traits_header_name( value_class ) except RuntimeError, error: decls_logger = _logging_.loggers.declarations if not messages.filter_disabled_msgs([messages.W1042], code_creator.declaration.disabled_messages ): - return #user disabled property warning + return #user disabled property warning decls_logger.warn( "%s;%s" % ( code_creator.declaration, messages.W1042 ) ) def create_include_code( self, creators, head_headers=None, tail_headers=None ): answer = [] normalize = code_creators.include_directories_t.normalize unique_headers = code_creators.code_creator_t.unique_headers - + if head_headers: answer.extend( map( lambda header: '#include "%s"' % normalize( header ) , head_headers ) ) @@ -171,11 +180,11 @@ dependend_on_headers = [] for creator in creators: dependend_on_headers.extend( creator.get_system_headers( recursive=True ) ) - - dependend_on_headers = unique_headers( map( normalize, dependend_on_headers ) ) - + + dependend_on_headers = unique_headers( map( normalize, dependend_on_headers ) ) + for include_cc in self.__predefined_include_creators: - if include_cc.is_system: + if include_cc.is_system: if include_cc.header in dependend_on_headers: answer.append( include_cc.create() ) else:# user header file - always include @@ -389,11 +398,11 @@ self.write_code_repository( self.__directory_path ) self.save_exposed_decls_db( self.__directory_path ) - + self.extmodule.do_include_dirs_optimization() self.split_values_traits() - self.split_classes() + self.split_classes() self.split_enums() self.split_global_variables() self.split_free_functions() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-05 20:26:49
|
Revision: 1425 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1425&view=rev Author: roman_yakovenko Date: 2008-10-05 20:26:38 +0000 (Sun, 05 Oct 2008) Log Message: ----------- adding new warning Modified Paths: -------------- pyplusplus_dev/pyplusplus/messages/warnings_.py pyplusplus_dev/pyplusplus/module_creator/dependencies_manager.py pyplusplus_dev/unittests/duplicate_aliases_tester.py Modified: pyplusplus_dev/pyplusplus/messages/warnings_.py =================================================================== --- pyplusplus_dev/pyplusplus/messages/warnings_.py 2008-10-05 20:21:17 UTC (rev 1424) +++ pyplusplus_dev/pyplusplus/messages/warnings_.py 2008-10-05 20:26:38 UTC (rev 1425) @@ -32,6 +32,10 @@ class execution_error( message_type ): prefix = 'execution error' +class code_generation_error( message_type ): + prefix = 'code generation error' + + W0000 = warning( '%s' ) #general message, usefull in few cases W1000 = compilation_error( @@ -246,6 +250,16 @@ W1064 = compilation_error( 'Py++ can not expose "%s" as "fake constructor" of "%s".' ' Only the following function types supported: %s' ) +W1065 = code_generation_error( + 'There are two or more classes that use same class wrapper alias("%s"). ' + 'Duplicated class wrapper aliases causes few problems, but the main one is that during ' + 'files generation Py++ uses class wrapper aliases for the file names. ' + 'Py++ will rewrite the file content and at best will introduce compile time error. ' + 'The worst case scenario: you will discover the problem during run-time.' + 'Use `wrapper_alias` property to change class wrapper alias value' + 'Other classes : %s' ) + + warnings = globals() all_warning_msgs = [] Modified: pyplusplus_dev/pyplusplus/module_creator/dependencies_manager.py =================================================================== --- pyplusplus_dev/pyplusplus/module_creator/dependencies_manager.py 2008-10-05 20:21:17 UTC (rev 1424) +++ pyplusplus_dev/pyplusplus/module_creator/dependencies_manager.py 2008-10-05 20:26:38 UTC (rev 1425) @@ -11,7 +11,46 @@ from pygccxml import declarations from pyplusplus import decl_wrappers +class duplicated_names_reporter_t(object): + def __init__( self, decls, value_getter, msg ): + self.decls = decls + self.get_value = value_getter + self.msg = msg + def __select( self ): + duplicated = {} + for decl in self.decls: + value = self.get_value( decl ) + if not duplicated.has_key( value ): + duplicated[ value ] = set() + duplicated[ value ].add( decl ) + result = duplicated.copy() + for value, buggy_decls in duplicated.items(): + if 1 == len( buggy_decls ): + del result[ value ] + return result + + def __report_single( self, control_decl, duplicated, logger ): + value = self.get_value( control_decl ) + if value not in duplicated: + return + buggy_decls = duplicated[value].copy() + buggy_decls.remove( control_decl ) + warning = self.msg % ( value, os.linesep.join( map( str, buggy_decls ) ) ) + logger.warn( "%s;%s" % ( str( control_decl ), warning ) ) + + def report( self, logger ): + duplicated = self.__select() + for decl in self.decls: + self.__report_single( decl, duplicated, logger ) + +duplicated_aliases_reporter \ + = lambda decls: duplicated_names_reporter_t( decls, lambda d: d.alias, messages.W1047 ) + +duplicated_wrapper_aliases_reporter \ + = lambda decls: duplicated_names_reporter_t( decls, lambda d: d.wrapper_alias, messages.W1065 ) + + class manager_t( object ): def __init__( self, logger ): object.__init__( self ) @@ -21,41 +60,6 @@ def add_exported( self, decl ): self.__exported_decls.append( decl ) - def __select_duplicate_aliases( self, decls ): - duplicated = {} - for decl in decls: - if not duplicated.has_key( decl.alias ): - duplicated[ decl.alias ] = set() - duplicated[ decl.alias ].add( decl ) - for alias, buggy_decls in duplicated.items(): - if 1 == len( buggy_decls ): - del duplicated[ alias ] - return duplicated - - def __report_duplicate_aliases_impl( self, control_decl, duplicated ): - if control_decl.alias in duplicated: - buggy_decls = duplicated[control_decl.alias].copy() - buggy_decls.remove( control_decl ) - warning = messages.W1047 % ( control_decl.alias - , os.linesep.join( map( str, buggy_decls ) ) ) - self.__logger.warn( "%s;%s" % ( control_decl, warning ) ) - - if isinstance( control_decl, declarations.class_t ): - query = lambda i_decl: isinstance( i_decl, declarations.class_types ) \ - and i_decl.ignore == False - i_decls = control_decl.classes( query, recursive=False, allow_empty=True ) - i_duplicated = self.__select_duplicate_aliases( i_decls ) - for i_decl in i_decls: - self.__report_duplicate_aliases_impl( i_decl, i_duplicated ) - - def __report_duplicate_aliases( self ): - decls = filter( lambda decl: isinstance( decl, declarations.class_types ) \ - and isinstance( decl.parent, declarations.namespace_t ) - , self.__exported_decls ) - duplicated = self.__select_duplicate_aliases( decls ) - for decl in decls: - self.__report_duplicate_aliases_impl( decl, duplicated ) - def __is_std_decl( self, decl ): #Every class under std should be exported by Boost.Python and\\or Py++ #Also this is not the case right now, I prefer to hide the warnings @@ -76,46 +80,46 @@ if decl.already_exposed: return [] dependencies = decl.i_depend_on_them(recursive=False) - + if isinstance( decl, declarations.class_t ): dependencies = filter( lambda d: d.access_type != declarations.ACCESS_TYPES.PRIVATE - , dependencies ) - + , dependencies ) + return dependencies - def __has_unexposed_dependency( self, exported_ids, depend_on_decl, dependency ): + def __has_unexposed_dependency( self, exported_ids, depend_on_decl, dependency ): sptr_traits = declarations.smart_pointer_traits - + if None is depend_on_decl: return - + if self.__is_std_decl( depend_on_decl ): - return - + return + if sptr_traits.is_smart_pointer( depend_on_decl ): try: value_type = sptr_traits.value_type( depend_on_decl ) return self.__has_unexposed_dependency( exported_ids, value_type, dependency ) except RuntimeError: - pass - + pass + if isinstance( depend_on_decl, decl_wrappers.decl_wrapper_t ): if depend_on_decl.already_exposed: - return + return if isinstance( depend_on_decl, declarations.class_types ): if depend_on_decl.opaque: - return + return if dependency.hint == "base class": return #base class for some class don't have to be exported if isinstance( depend_on_decl, declarations.variable_t ): if not decl.expose_value: - return - + return + if isinstance( dependency.decl, declarations.variable_t ): #the only dependency of the variable is its type if not dependency.decl.expose_value: - return - + return + if dependency.hint == "return type": #in this case we don't check, the return type but the function if isinstance( dependency.decl, declarations.calldef_t ): @@ -124,13 +128,13 @@ return return id( depend_on_decl ) not in exported_ids - + def __find_out_used_but_not_exported( self ): used_not_exported = [] exported_ids = set( map( lambda d: id( d ), self.__exported_decls ) ) for decl in self.__exported_decls: - for dependency in self.__build_dependencies( decl ): - depend_on_decl = dependency.find_out_depend_on_declaration() + for dependency in self.__build_dependencies( decl ): + depend_on_decl = dependency.find_out_depend_on_declaration() if self.__has_unexposed_dependency( exported_ids, depend_on_decl, dependency ): if messages.filter_disabled_msgs([messages.W1040], depend_on_decl.disabled_messages ): #need to report dependency errors @@ -153,9 +157,43 @@ decls.append( os.linesep + ' ' + str( dependency.declaration ) ) return "%s;%s" % ( depend_on_decl, messages.W1040 % ''.join( decls ) ) + def __report_duplicated_aliases( self ): + decls = filter( lambda decl: isinstance( decl, declarations.class_types ) \ + and isinstance( decl.parent, declarations.namespace_t ) + , self.__exported_decls ) + + dar = duplicated_aliases_reporter( decls ) + dar.report( self.__logger ) + + classes = filter( lambda c: isinstance( c, declarations.class_t ), decls ) + query = lambda decl: isinstance( decl, declarations.class_types ) \ + and decl.ignore == False \ + and decl._already_exposed == False + + for cls in classes: + internal_decls = cls.decls( query, recursive=False, allow_empty=True) + dar = duplicated_aliases_reporter( internal_decls ) + dar.report( self.__logger ) + + def __report_duplicated_wrapper_aliases( self ): + decls = filter( lambda decl: isinstance( decl, declarations.class_t ) \ + and isinstance( decl.parent, declarations.namespace_t ) + , self.__exported_decls ) + + dwar = duplicated_wrapper_aliases_reporter( decls ) + dwar.report( self.__logger ) + + query = lambda decl: decl.ignore == False and decl._already_exposed == False + + for cls in decls: + internal_decls = cls.classes( query, recursive=False, allow_empty=True) + dwar = duplicated_wrapper_aliases_reporter( internal_decls ) + dwar.report( self.__logger ) + def inform_user( self ): used_not_exported_decls = self.__find_out_used_but_not_exported() groups = self.__group_by_unexposed( used_not_exported_decls ) for group in groups.itervalues(): self.__logger.warn( self.__create_dependencies_msg( group ) ) - self.__report_duplicate_aliases() + self.__report_duplicated_aliases() + self.__report_duplicated_wrapper_aliases() Modified: pyplusplus_dev/unittests/duplicate_aliases_tester.py =================================================================== --- pyplusplus_dev/unittests/duplicate_aliases_tester.py 2008-10-05 20:21:17 UTC (rev 1424) +++ pyplusplus_dev/unittests/duplicate_aliases_tester.py 2008-10-05 20:26:38 UTC (rev 1425) @@ -21,6 +21,7 @@ def customize(self, mb): classes = mb.classes( lambda decl: 'duplicate_aliases' in decl.name ) classes.alias = 'duplicate_aliases' + classes.wrapper_alias = 'wrapper_duplicate_aliases' def run_tests( self, module): #check compilation This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-05 20:21:20
|
Revision: 1424 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1424&view=rev Author: roman_yakovenko Date: 2008-10-05 20:21:17 +0000 (Sun, 05 Oct 2008) Log Message: ----------- update gccxml to the latest one Modified Paths: -------------- gccxml_bin/v09/linux2/bin/gccxml gccxml_bin/v09/linux2/bin/gccxml_cc1plus This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-05 15:32:48
|
Revision: 1423 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1423&view=rev Author: roman_yakovenko Date: 2008-10-05 14:30:04 +0000 (Sun, 05 Oct 2008) Log Message: ----------- adding missing declaration for dependency manager Modified Paths: -------------- pyplusplus_dev/pyplusplus/module_creator/creator.py Modified: pyplusplus_dev/pyplusplus/module_creator/creator.py =================================================================== --- pyplusplus_dev/pyplusplus/module_creator/creator.py 2008-10-05 13:48:35 UTC (rev 1422) +++ pyplusplus_dev/pyplusplus/module_creator/creator.py 2008-10-05 14:30:04 UTC (rev 1423) @@ -651,6 +651,7 @@ for fc in cls_decl.fake_constructors: if self.__fc_manager.should_generate_code( fc ): + self.__dependencies_manager.add_exported( fc ) cls_cc.adopt_creator( code_creators.make_constructor_t( fc ) ) self.curr_decl = cls_decl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-05 13:51:16
|
Revision: 1422 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1422&view=rev Author: roman_yakovenko Date: 2008-10-05 13:48:35 +0000 (Sun, 05 Oct 2008) Log Message: ----------- remove implemented feature Modified Paths: -------------- pyplusplus_dev/docs/peps/peps_index.rest Modified: pyplusplus_dev/docs/peps/peps_index.rest =================================================================== --- pyplusplus_dev/docs/peps/peps_index.rest 2008-10-05 13:19:47 UTC (rev 1421) +++ pyplusplus_dev/docs/peps/peps_index.rest 2008-10-05 13:48:35 UTC (rev 1422) @@ -13,35 +13,6 @@ For small features, the description of the feature and it's implementation will be written here. Big features will get their own page. ---------------- -Unnamed classes ---------------- - -There is no technical reason why unnamed classes/structs/unions are not exported - -by `Py++`_: - -.. code-block:: C++ - - class Foo{ - union { - struct { - float r,g,b,a; - }; - float val[4]; - }; - }; - - -Implementation details ----------------------- - -As it seems to me, the only code that should be changed is -"pyplusplus/module_creator/creator.py" file. To be more specific: all code creators, -for declarations in unnamed classes, should be created under named class. - -The coding itself should take something like 4 - 5 hours, including unit test. - ------------------------------------------ Domain Specific Language ( DSL ) challenge ------------------------------------------ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-05 13:22:29
|
Revision: 1421 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1421&view=rev Author: roman_yakovenko Date: 2008-10-05 13:19:47 +0000 (Sun, 05 Oct 2008) Log Message: ----------- refactoring call_policies.rest Added Paths: ----------- pyplusplus_dev/docs/documentation/functions/call_policies/ pyplusplus_dev/docs/documentation/functions/call_policies/as_tuple.rest pyplusplus_dev/docs/documentation/functions/call_policies/call_policies.rest pyplusplus_dev/docs/documentation/functions/call_policies/custom_call_policies.rest pyplusplus_dev/docs/documentation/functions/call_policies/return_addressof.rest pyplusplus_dev/docs/documentation/functions/call_policies/return_pointee_value.rest pyplusplus_dev/docs/documentation/functions/call_policies/return_range.rest pyplusplus_dev/docs/documentation/functions/call_policies/www_configuration.py Removed Paths: ------------- pyplusplus_dev/docs/documentation/functions/call_policies.rest Added: pyplusplus_dev/docs/documentation/functions/call_policies/as_tuple.rest =================================================================== --- pyplusplus_dev/docs/documentation/functions/call_policies/as_tuple.rest (rev 0) +++ pyplusplus_dev/docs/documentation/functions/call_policies/as_tuple.rest 2008-10-05 13:19:47 UTC (rev 1421) @@ -0,0 +1,87 @@ +======== +as_tuple +======== + +.. contents:: Table of contents + +---------- +Definition +---------- + +Class ``as_tuple`` is a model of `ResultConverterGenerator`_ which +can be used to wrap C++ functions returning a pointer to arrays with fixed size. +The policy will construct a Python tuple from the array and handle the array memory. + +------- +Example +------- + +.. code-block:: C++ + + struct vector3{ + ... + + float* clone_raw_data() const{ + float* values = new float[3]; + //copy values + return values; + } + + const flow* get_raw_data() const{ + return m_values; + } + + private: + float m_values[3]; + }; + + namespace bpl = boost::python; + namespace pypp_cp = pyplusplus::call_policies; + BOOST_PYTHON_MODULE(my_module){ + bpl::class_< vector3 >( "vector3" ) + .def( "clone_raw_data" + , &::vector3::clone_raw_data + , bpl::return_value_policy< pypp_cp::arrays::as_tuple< 3, pypp_cp::memory_managers::delete_ > >() ) + .def( "get_raw_data" + , &::vector3::get_raw_data + , bpl::return_value_policy< pypp_cp::arrays::as_tuple< 3, pypp_cp::memory_managers::none > >() ) ); + } + +------------------ +``as_tuple`` class +------------------ + +``as_tuple`` is a template class that takes few arguments: + +1. the array size - compile time constant + +2. memory management policy - a class, which will manage the return value. + There are two built-in memory managers: + + * delete\_ - the array will be deleted after it was copied to tuple, using + ``operator delete[]`` + + * none - do nothing + +The `Py++`_ code is slightly different from the C++ one, but it is definitely shorter: + +.. code-block:: Python + + from pyplusplus import module_builder + from pyplusplus.module_builder import call_policies + + mb = module_builder.module_builder_t( ... ) + mb.member_function( 'clone_raw_data' ).call_policies \ + = call_policies.convert_array_to_tuple( 3, call_policies.memory_managers.delete_ ) + mb.member_function( 'get_raw_data' ).call_policies \ + = call_policies.convert_array_to_tuple( 3, call_policies.memory_managers.none ) + + +.. _`ResultConverterGenerator` : http://boost.org/libs/python/doc/v2/ResultConverter.html#ResultConverterGenerator-concept +.. _`CallPolicies` : http://www.boost.org/libs/python/doc/v2/CallPolicies.html#CallPolicies-concept + +.. _`Py++` : ./../../../pyplusplus.html +.. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html +.. _`Python`: http://www.python.org +.. _`GCC-XML`: http://www.gccxml.org + Added: pyplusplus_dev/docs/documentation/functions/call_policies/call_policies.rest =================================================================== --- pyplusplus_dev/docs/documentation/functions/call_policies/call_policies.rest (rev 0) +++ pyplusplus_dev/docs/documentation/functions/call_policies/call_policies.rest 2008-10-05 13:19:47 UTC (rev 1421) @@ -0,0 +1,202 @@ +============= +Call policies +============= + +.. contents:: Table of contents + +------------ +Introduction +------------ + +`Boost.Python`_ has a `nice introduction`__ to call policies. `"Call policies concept"`_ +document will provide you with formal definition. + +.. __ : http://boost.org/libs/python/doc/tutorial/doc/html/python/functions.html#python.call_policies +.. _`"Call policies concept"` : http://boost.org/libs/python/doc/v2/CallPolicies.html#CallPolicies-concept + +------ +Syntax +------ + +The call policies in `Py++`_ are named exactly as in `Boost.Python`_, only the +syntax is slightly different. For instance, this call policy: + +.. code-block:: C++ + + return_internal_reference< 1, with_custodian_and_ward<1, 2> >() + +becomes in `Py++`_ + +.. code-block:: Python + + return_internal_reference( 1, with_custodian_and_ward(1, 2) ) + +`Py++`_ supports all call policies presented in `Boost.Python`_. + +------------- +Usage example +------------- + +Every "callable" object in `Py++`_ has ``call_policies`` property. + +C++ code: + + .. code-block:: C++ + + struct data{...}; + const data& do_smth( const data& d, int x ); + + void return_second_arg( int x, int y ); + + typedef struct opaque_ *opaque_pointer; + opaque_pointer get_opaque(); + +Python code: + + .. code-block:: Python + + from pyplusplus import module_builder + from pyplusplus.module_builder import call_policies + + mb = module_builder.module_builder_t( ... ) + mb.free_function( 'return_second_arg' ).call_policies = call_policies.return_arg( 2 ) + #---------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + mb.member_function( 'do_smth' ).call_policies = call_policies.return_self() + #-------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + mb.calldef( 'get_opaque' ).call_policies + = call_policies.return_value_policy( call_policies.return_opaque_pointer ) + +-------- +Defaults +-------- + +`Py++`_ is able to "guess" few call policies, base on analysis of return type +and\\or callable name: + +* ``default_call_policies``: + + * `Python`_ immutable type returned by value: C++ fundamental types, ``std::string``, enumerations + + * user-defined type ( class ) returned by value + + * return type is ``const char*`` + +* ``return_value_policy`` + + * ``return_opaque_pointer`` + + * return type is ``void*`` + + * return type is ``const void*`` + + * return type is ``T*`` and ``T`` is a user defined opaque type + + ``class_t`` and ``class_declaration_t`` classes have ``opaque`` property. + You have to set it to ``True``, if you want `Py++`_ to create this call + policy automatically for all functions, that use ``T*`` as return type. + + * ``copy_const_reference`` + + * return type is ``const T&`` + + * for member ``operator[]`` that returns const reference to immutable type + + * ``return_by_value`` + + * return type is ``const wchar_t*`` + + * ``copy_non_const_reference`` + + * return type is ``T&``, for member ``operator[]`` that returns reference to immutable type + + * ``return_internal_reference`` + + * return type is ``T&``, for member ``operator[]`` + +* ``return_self`` + + This call policy will be used for ``operator=``. + +--------------------- +Missing call policies +--------------------- + +If you don't specify call policy for a function and it needs one, few things will +happen: + +* `Py++`_ prints a warning message + +* `Py++`_ generates code with + + .. code-block:: C++ + + /* undefined call policies */ + + comment, instead of call policy. If `Py++`_ was wrong and function doesn't + need call policy the generate code will compile fine, otherwise you will get a + compilation error. + + +------------ +Special case +------------ + +Before you read this paragraph consider to read `Boost.Python`_ `return_opaque_pointer documentation`_. + +``return_value_policy( return_opaque_pointer )`` is a special policy for `Boost.Python`_. +In this case, it requires from you to define specialization for the +``boost::python::type_id`` function on the type pointed to by returned pointer. +`Py++`_ will generate the required code. + + +Actually you should define ``boost::python::type_id`` specialization also in case +a function takes the opaque type as an argument. `Py++`_ can do it for you, all +you need is to mark a declaration as opaque. + +Example: + +.. code-block:: C++ + + struct identity_impl_t{}; + typedef identity_impl_t* identity; + + struct world_t{ + + world_t( identity id ); + + identity get_id() const; + + ... + }; + +`Py++`_ code: + +.. code-block:: Python + + mb = module_builder_t(...) + mb.class_( 'identity_impl_t' ).opaque = True + + +.. _`return_opaque_pointer documentation` : http://boost.org/libs/python/doc/v2/return_opaque_pointer.html + +-------------------------- +Py++ defined call policies +-------------------------- + +`Py++`_ defines few call policies. I hope you will find them useful. I don't mind +to contribute them to `Boost.Python`_ library, but I don't have enough free time +to "boostify" them. + +.. _`new indexing suite` : ./../../containers.html +.. _`this file` : http://pygccxml.svn.sourceforge.net/viewvc/pygccxml/pyplusplus_dev/pyplusplus/code_repository/call_policies.py?view=markup + +.. _`ResultConverterGenerator` : http://boost.org/libs/python/doc/v2/ResultConverter.html#ResultConverterGenerator-concept +.. _`CallPolicies` : http://www.boost.org/libs/python/doc/v2/CallPolicies.html#CallPolicies-concept + +.. _`Py++` : ./../../../pyplusplus.html +.. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html +.. _`Python`: http://www.python.org +.. _`GCC-XML`: http://www.gccxml.org + Added: pyplusplus_dev/docs/documentation/functions/call_policies/custom_call_policies.rest =================================================================== --- pyplusplus_dev/docs/documentation/functions/call_policies/custom_call_policies.rest (rev 0) +++ pyplusplus_dev/docs/documentation/functions/call_policies/custom_call_policies.rest 2008-10-05 13:19:47 UTC (rev 1421) @@ -0,0 +1,39 @@ +==================== +custom_call_policies +==================== + +.. contents:: Table of contents + +---------- +Definition +---------- + +``custom_call_policies`` is a special call policy, which allows you to integrate +the call policies, you defined, with `Py++`_ + +------- +Example +------- + +.. code-block:: Python + + from pyplusplus import module_builder + from pyplusplus.module_builder import call_policies + + mb = module_builder.module_builder_t( ... ) + mb.free_function( ... ).call_policies \ + = call_policies.custom_call_policies( <<<your call policies code>>> ) + + Optionally you can specify name of the header file, which should be included: + +.. code-block:: Python + + mb.free_function( ... ).call_policies \ + = call_policies.custom_call_policies( <<<your call policies code>>>, "xyz.hpp" ) + + +.. _`Py++` : ./../../../pyplusplus.html +.. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html +.. _`Python`: http://www.python.org +.. _`GCC-XML`: http://www.gccxml.org + Added: pyplusplus_dev/docs/documentation/functions/call_policies/return_addressof.rest =================================================================== --- pyplusplus_dev/docs/documentation/functions/call_policies/return_addressof.rest (rev 0) +++ pyplusplus_dev/docs/documentation/functions/call_policies/return_addressof.rest 2008-10-05 13:19:47 UTC (rev 1421) @@ -0,0 +1,65 @@ +================ +return_addressof +================ + +.. contents:: Table of contents + +---------- +Definition +---------- + +Class ``return_addressof`` is a model of `ResultConverterGenerator`_ which +can be used to wrap C++ functions returning any pointer, such that the pointer +value is converted to ``unsigned int`` and it is copied into a new Python object. + +This call policy was created to be used with ``ctypes`` package and provide access +to some raw\\low level data, without creating wrappers. + +Pay attention: you have to manage the memory by your own. + +------- +Example +------- + +.. code-block:: C++ + + int* get_value(){ + static int buffer[] = { 0,1,2,3,4 }; + return buffer; + } + + namespace bpl = boost::python; + BOOST_PYTHON_MODULE(my_module){ + def( "get_value" + , bpl::return_value_policy< pyplusplus::call_policies::return_addressof<> >() ); + } + +The `Py++`_ code is not that different from what you already know: + +.. code-block:: Python + + from pyplusplus import module_builder + from pyplusplus.module_builder import call_policies + + mb = module_builder.module_builder_t( ... ) + mb.free_function( return_type='float *' ).call_policies \ + = call_policies.return_value_policy( call_policies.return_addressof ) + +Python code: + +.. code-block:: Python + + import ctypes + import my_module + + buffer_type = ctypes.c_int * 5 + buffer = buffer_type.from_address( my_module.get_value() ) + assert [0,1,2,3,4] == list( buffer ) + +.. _`ResultConverterGenerator` : http://boost.org/libs/python/doc/v2/ResultConverter.html#ResultConverterGenerator-concept + +.. _`Py++` : ./../../../pyplusplus.html +.. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html +.. _`Python`: http://www.python.org +.. _`GCC-XML`: http://www.gccxml.org + Added: pyplusplus_dev/docs/documentation/functions/call_policies/return_pointee_value.rest =================================================================== --- pyplusplus_dev/docs/documentation/functions/call_policies/return_pointee_value.rest (rev 0) +++ pyplusplus_dev/docs/documentation/functions/call_policies/return_pointee_value.rest 2008-10-05 13:19:47 UTC (rev 1421) @@ -0,0 +1,68 @@ +==================== +return_pointee_value +==================== + +.. contents:: Table of contents + +---------- +Definition +---------- + +Class ``return_pointee_value`` is a model of `ResultConverterGenerator`_ which +can be used to wrap C++ functions returning any pointer, such that the pointee of +return value is copied into a new Python object. + +------- +Example +------- + +.. code-block:: C++ + + float* get_value(){ + static float value = 0.5; + return &value; + } + + float* get_null_value(){ + return (float*)( 0 ); + } + + namespace bpl = boost::python; + BOOST_PYTHON_MODULE(my_module){ + def( "get_value" + , bpl::return_value_policy< pyplusplus::call_policies::return_pointee_value<> >() ); + + def( "get_null_value" + , bpl::return_value_policy< pyplusplus::call_policies::return_pointee_value<> >() ); + } + +The `Py++`_ code is not that different from what you already know: + +.. code-block:: Python + + from pyplusplus import module_builder + from pyplusplus.module_builder import call_policies + + mb = module_builder.module_builder_t( ... ) + mb.free_function( return_type='float *' ).call_policies \ + = call_policies.return_value_policy( call_policies.return_pointee_value ) + +Python code: + +.. code-block:: Python + + import my_module + + assert 0.5 == my_module.get_value() + assert None is my_module.get_null_value() + + + +.. _`ResultConverterGenerator` : http://boost.org/libs/python/doc/v2/ResultConverter.html#ResultConverterGenerator-concept +.. _`CallPolicies` : http://www.boost.org/libs/python/doc/v2/CallPolicies.html#CallPolicies-concept + +.. _`Py++` : ./../../../pyplusplus.html +.. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html +.. _`Python`: http://www.python.org +.. _`GCC-XML`: http://www.gccxml.org + Added: pyplusplus_dev/docs/documentation/functions/call_policies/return_range.rest =================================================================== --- pyplusplus_dev/docs/documentation/functions/call_policies/return_range.rest (rev 0) +++ pyplusplus_dev/docs/documentation/functions/call_policies/return_range.rest 2008-10-05 13:19:47 UTC (rev 1421) @@ -0,0 +1,233 @@ +============= +return_range +============= + +.. contents:: Table of contents + +---------- +Definition +---------- + +Class ``return_range`` is a model of `CallPolicies`_, which can be used to wrap +C++ functions that return a pointer to some array. The new call policy constructs +object, which provides a regular `Python`_ `sequence`_ interface. + +.. _`sequence` : http://docs.python.org/lib/typesseq.html + +------- +Example +------- + +.. code-block:: C++ + + struct image_t{ + + ... + + const unsigned char* get_data() const{ + return m_raw_data; + } + + ssize_t get_width() const{ + return m_width; + } + + ssize_t get_height() const{ + return m_height; + } + + private: + unsigned long m_width; + unsigned long m_height; + unsigned char* m_raw_data; + }; + +Before introducing the whole solution, I would like to describe "return_range" +interface. + +---------------------- +``return_range`` class +---------------------- + +.. code-block:: C++ + + template < typename TGetSize + , typename TValueType + , typename TValuePolicies=boost::python::default_call_policies > + struct return_range : boost::python::default_call_policies + { ... }; + +`Boost.Python`_ call policies are stateless classes, which do not care any +information about the invoked function or object. In our case we have to pass +the following information: + +* the array size + +* the array type + +* "__getitem__" call policies for the array elements + + +``TGetSize`` parameter +++++++++++++++++++++++ + +``TGetSize`` is a class, which is responsible to find out the size of the returned +array. + +``TGetSize`` class must have: + +* default constructor + +* call operator with the following signature: + + .. code-block:: C++ + + ssize_t operator()( boost::python::tuple args ); + + ``args`` is a tuple of arguments, the function was called with. + + Pay attention: this operator will be invoked **after** the function. This + call policy is **not thread-safe**! + +For our case, the following class could be defined: + +.. code-block:: C++ + + struct image_data_size_t{ + ssize_t operator()( boost::python::tuple args ){ + namespace bpl = boost::python; + bpl::object self = args[0]; + image_t& img = bpl::extract< image_t& >( self ); + return img.get_width() * img.get_height(); + } + }; + +Passing all arguments, instead of single "self" argument gives you an ability +to treat functions, where the user asked to get access to the part of the array. + +.. code-block:: C++ + + struct image_t{ + ... + const unsigned char* get_data(ssize_t offset) const{ + //check that offset represents a legal value + ... + return &m_raw_data[offset]; + } + ... + }; + +The following "get size" class treats this situation: + +.. code-block:: C++ + + struct image_data_size_t{ + ssize_t operator()( boost::python::tuple args ){ + namespace bpl = boost::python; + bpl::object self = args[0]; + image_t& img = bpl::extract< image_t& >( self ); + bpl::object offset_obj = args[1]; + ssize_t offset = bpl::extract< ssize_t >( offset_obj ); + return img.get_width() * img.get_height() - offset; + } + }; + + +``TValueType`` parameter +++++++++++++++++++++++++ + +``TValueType`` is a type of array element. In our case it is ``unsigned char``. + +``TValuePolicies`` parameter +++++++++++++++++++++++++++++ + +``TValuePolicies`` is a "call policy" class, which will be applied when the array +element is returned to `Python`_. This is a call policy for "__getitem__" function. + +``unsigned char`` is mapped to immutable type in `Python`_, so I have to use +``default_call_policies``. ``default_call_policies`` is a default value for +``TValuePolicies`` parameter. + + +I think, now you are ready to see the whole solution: + +.. code-block:: C++ + + namespace bpl = boost::python; + namespace ppc = pyplusplus::call_policies; + + BOOST_PYTHON_MODULE(my_module){ + bpl::class_< image_t >( "image_t" ) + .def( "get_width", &image_t::get_width ) + .def( "get_height", &image_t::get_height ) + .def( "get_raw_data", ppc::return_range< image_size_t, unsigned char >() ); + } + +Py++ integration +~~~~~~~~~~~~~~~~ + +The `Py++`_ code is not that different from what you already know: + +.. code-block:: Python + + from pyplusplus import module_builder + from pyplusplus.module_builder import call_policies + + image_size_code = \ + """ + struct image_data_size_t{ + ssize_t operator()( boost::python::tuple args ){ + namespace bpl = boost::python; + bpl::object self = args[0]; + image_t& img = bpl::extract< image_t& >( self ); + return img.get_width() * img.get_height(); + } + }; + """ + + mb = module_builder.module_builder_t( ... ) + image = mb.class_( 'image_t' ) + image.add_declaration_code( image_size_code ) + get_raw_data = image.mem_fun( 'get_raw_data' ) + get_raw_data.call_policies \ + = call_policies.return_range( get_raw_data, "image_data_size_t" ) + +call_policies.return_range arguments: + +1. A reference to function. `Py++`_ will extract by itself the type of the array + element. + +2. A name of "get size" class. + +3. A call policies for "__getitem__" function. `Py++`_ will analyze the array + element type. If the type is mapped to immutable type, than ``default_call_policies`` + is used, otherwise you have to specify call policies. + + +Python usage code: + +.. code-block:: Python + + from my_module import * + + img = image_t(...) + for p in img.get_raw_data(): + print p + +Dependencies +~~~~~~~~~~~~ + +The new call policy depends on `new indexing suite`_ and `Py++`_ :-). But if you +want you can extract the relevant piece of code from `this file`_. + +.. _`new indexing suite` : ./../../containers.html +.. _`this file` : http://pygccxml.svn.sourceforge.net/viewvc/pygccxml/pyplusplus_dev/pyplusplus/code_repository/call_policies.py?view=markup + +.. _`ResultConverterGenerator` : http://boost.org/libs/python/doc/v2/ResultConverter.html#ResultConverterGenerator-concept +.. _`CallPolicies` : http://www.boost.org/libs/python/doc/v2/CallPolicies.html#CallPolicies-concept + +.. _`Py++` : ./../../../pyplusplus.html +.. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html +.. _`Python`: http://www.python.org +.. _`GCC-XML`: http://www.gccxml.org + Added: pyplusplus_dev/docs/documentation/functions/call_policies/www_configuration.py =================================================================== --- pyplusplus_dev/docs/documentation/functions/call_policies/www_configuration.py (rev 0) +++ pyplusplus_dev/docs/documentation/functions/call_policies/www_configuration.py 2008-10-05 13:19:47 UTC (rev 1421) @@ -0,0 +1,6 @@ +name = 'call policies' +#main_html_file = 'index.html' + +names = { 'call_policies' : 'call policies' +} + Deleted: pyplusplus_dev/docs/documentation/functions/call_policies.rest =================================================================== --- pyplusplus_dev/docs/documentation/functions/call_policies.rest 2008-10-05 12:35:30 UTC (rev 1420) +++ pyplusplus_dev/docs/documentation/functions/call_policies.rest 2008-10-05 13:19:47 UTC (rev 1421) @@ -1,606 +0,0 @@ -============= -Call policies -============= - -.. contents:: Table of contents - ------------- -Introduction ------------- - -`Boost.Python`_ has a `nice introduction`__ to call policies. `"Call policies concept"`_ -document will provide you with formal definition. - -.. __ : http://boost.org/libs/python/doc/tutorial/doc/html/python/functions.html#python.call_policies -.. _`"Call policies concept"` : http://boost.org/libs/python/doc/v2/CallPolicies.html#CallPolicies-concept - ------- -Syntax ------- - -The call policies in `Py++`_ are named exactly as in `Boost.Python`_, only the -syntax is slightly different. For instance, this call policy: - -.. code-block:: C++ - - return_internal_reference< 1, with_custodian_and_ward<1, 2> >() - -becomes in `Py++`_ - -.. code-block:: Python - - return_internal_reference( 1, with_custodian_and_ward(1, 2) ) - -`Py++`_ supports all call policies presented in `Boost.Python`_. - -------------- -Usage example -------------- - -Every "callable" object in `Py++`_ has ``call_policies`` property. - -C++ code: - - .. code-block:: C++ - - struct data{...}; - const data& do_smth( const data& d, int x ); - - void return_second_arg( int x, int y ); - - typedef struct opaque_ *opaque_pointer; - opaque_pointer get_opaque(); - -Python code: - - .. code-block:: Python - - from pyplusplus import module_builder - from pyplusplus.module_builder import call_policies - - mb = module_builder.module_builder_t( ... ) - mb.free_function( 'return_second_arg' ).call_policies = call_policies.return_arg( 2 ) - #---------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - mb.member_function( 'do_smth' ).call_policies = call_policies.return_self() - #-------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - mb.calldef( 'get_opaque' ).call_policies - = call_policies.return_value_policy( call_policies.return_opaque_pointer ) - --------- -Defaults --------- - -`Py++`_ is able to "guess" few call policies, base on analysis of return type -and\\or callable name: - -* ``default_call_policies``: - - * `Python`_ immutable type returned by value: C++ fundamental types, ``std::string``, enumerations - - * user-defined type ( class ) returned by value - - * return type is ``const char*`` - -* ``return_value_policy`` - - * ``return_opaque_pointer`` - - * return type is ``void*`` - - * return type is ``const void*`` - - * return type is ``T*`` and ``T`` is a user defined opaque type - - ``class_t`` and ``class_declaration_t`` classes have ``opaque`` property. - You have to set it to ``True``, if you want `Py++`_ to create this call - policy automatically for all functions, that use ``T*`` as return type. - - * ``copy_const_reference`` - - * return type is ``const T&`` - - * for member ``operator[]`` that returns const reference to immutable type - - * ``return_by_value`` - - * return type is ``const wchar_t*`` - - * ``copy_non_const_reference`` - - * return type is ``T&``, for member ``operator[]`` that returns reference to immutable type - - * ``return_internal_reference`` - - * return type is ``T&``, for member ``operator[]`` - -* ``return_self`` - - This call policy will be used for ``operator=``. - ---------------------- -Missing call policies ---------------------- - -If you don't specify call policy for a function and it needs one, few things will -happen: - -* `Py++`_ prints a warning message - -* `Py++`_ generates code with - - .. code-block:: C++ - - /* undefined call policies */ - - comment, instead of call policy. If `Py++`_ was wrong and function doesn't - need call policy the generate code will compile fine, otherwise you will get a - compilation error. - - ------------- -Special case ------------- - -Before you read this paragraph consider to read `Boost.Python`_ `return_opaque_pointer documentation`_. - -``return_value_policy( return_opaque_pointer )`` is a special policy for `Boost.Python`_. -In this case, it requires from you to define specialization for the -``boost::python::type_id`` function on the type pointed to by returned pointer. -`Py++`_ will generate the required code. - - -Actually you should define ``boost::python::type_id`` specialization also in case -a function takes the opaque type as an argument. `Py++`_ can do it for you, all -you need is to mark a declaration as opaque. - -Example: - -.. code-block:: C++ - - struct identity_impl_t{}; - typedef identity_impl_t* identity; - - struct world_t{ - - world_t( identity id ); - - identity get_id() const; - - ... - }; - -`Py++`_ code: - -.. code-block:: Python - - mb = module_builder_t(...) - mb.class_( 'identity_impl_t' ).opaque = True - - -.. _`return_opaque_pointer documentation` : http://boost.org/libs/python/doc/v2/return_opaque_pointer.html - --------------------------- -Py++ defined call policies --------------------------- - -custom_call_policies --------------------- - -``custom_call_policies`` policies functionality was born to allow you to define -your own call polices and use them with same level of convenience as built-in ones. - -The usage is pretty simple: - -.. code-block:: Python - - from pyplusplus import module_builder - from pyplusplus.module_builder import call_policies - - mb = module_builder.module_builder_t( ... ) - mb.free_function( ... ).call_policies \ - = call_policies.custom_call_policies( <<<your call policies code>>> ) - - Optionally you can specify name of the header file, which should be included: - -.. code-block:: Python - - mb.free_function( ... ).call_policies \ - = call_policies.custom_call_policies( <<<your call policies code>>>, "xyz.hpp" ) - -return_addressof ----------------- - -Class ``return_addressof`` is a model of `ResultConverterGenerator`_ which -can be used to wrap C++ functions returning any pointer, such that the pointer -value is converted to ``unsigned int`` and it is copied into a new Python object. - -This call policy was created to be used with ``ctypes`` package and provide access -to some raw\\low level data, without creating wrappers. - -Pay attention: you have to manage the memory by your own. - -Example -~~~~~~~ - -.. code-block:: C++ - - int* get_value(){ - static int buffer[] = { 0,1,2,3,4 }; - return buffer; - } - - namespace bpl = boost::python; - BOOST_PYTHON_MODULE(my_module){ - def( "get_value" - , bpl::return_value_policy< pyplusplus::call_policies::return_addressof<> >() ); - } - -The `Py++`_ code is not that different from what you already know: - -.. code-block:: Python - - from pyplusplus import module_builder - from pyplusplus.module_builder import call_policies - - mb = module_builder.module_builder_t( ... ) - mb.free_function( return_type='float *' ).call_policies \ - = call_policies.return_value_policy( call_policies.return_addressof ) - -Python code: - -.. code-block:: Python - - import ctypes - import my_module - - buffer_type = ctypes.c_int * 5 - buffer = buffer_type.from_address( my_module.get_value() ) - assert [0,1,2,3,4] == list( buffer ) - - -return_pointee_value --------------------- - -Class ``return_pointee_value`` is a model of `ResultConverterGenerator`_ which -can be used to wrap C++ functions returning any pointer, such that the pointee of -return value is copied into a new Python object. - -Example -~~~~~~~ - -.. code-block:: C++ - - float* get_value(){ - static float value = 0.5; - return &value; - } - - float* get_null_value(){ - return (float*)( 0 ); - } - - namespace bpl = boost::python; - BOOST_PYTHON_MODULE(my_module){ - def( "get_value" - , bpl::return_value_policy< pyplusplus::call_policies::return_pointee_value<> >() ); - - def( "get_null_value" - , bpl::return_value_policy< pyplusplus::call_policies::return_pointee_value<> >() ); - } - -The `Py++`_ code is not that different from what you already know: - -.. code-block:: Python - - from pyplusplus import module_builder - from pyplusplus.module_builder import call_policies - - mb = module_builder.module_builder_t( ... ) - mb.free_function( return_type='float *' ).call_policies \ - = call_policies.return_value_policy( call_policies.return_pointee_value ) - -Python code: - -.. code-block:: Python - - import my_module - - assert 0.5 == my_module.get_value() - assert None is my_module.get_null_value() - -as_tuple --------- - -Class ``as_tuple`` is a model of `ResultConverterGenerator`_ which -can be used to wrap C++ functions returning a pointer to arrays with fixed size. -The policy will construct a Python tuple from the array and treat the array memory. - -Example -~~~~~~~ - -.. code-block:: C++ - - struct vector3{ - ... - - float* clone_raw_data() const{ - float* values = new float[3]; - //copy values - return values; - } - - const flow* get_raw_data() const{ - return m_values; - } - - private: - float m_values[3]; - }; - - namespace bpl = boost::python; - namespace pypp_cp = pyplusplus::call_policies; - BOOST_PYTHON_MODULE(my_module){ - bpl::class_< vector3 >( "vector3" ) - .def( "clone_raw_data" - , &::vector3::clone_raw_data - , bpl::return_value_policy< pypp_cp::arrays::as_tuple< 3, pypp_cp::memory_managers::delete_ > >() ) - .def( "get_raw_data" - , &::vector3::get_raw_data - , bpl::return_value_policy< pypp_cp::arrays::as_tuple< 3, pypp_cp::memory_managers::none > >() ) ); - } - -``as_tuple`` class -~~~~~~~~~~~~~~~~~~ -``as_tuple`` is a template class that takes few arguments: - -1. the size of the array - compile time constant - -2. memory management policy - a class, which will manage the return value. - There are two built-in memory managers: - - * delete\_ - the array will be deleted after it was copied to tuple, using - ``operator delete[]`` - - * none - do nothing - - -The `Py++`_ code is slightly different from the C++ one, but it is definitely shorter: - -.. code-block:: Python - - from pyplusplus import module_builder - from pyplusplus.module_builder import call_policies - - mb = module_builder.module_builder_t( ... ) - mb.member_function( 'clone_raw_data' ).call_policies \ - = call_policies.convert_array_to_tuple( 3, call_policies.memory_managers.delete_ ) - mb.member_function( 'get_raw_data' ).call_policies \ - = call_policies.convert_array_to_tuple( 3, call_policies.memory_managers.none ) - -return_range ------------- - -Class ``return_range`` is a model of `CallPolicies`_, which can be used to wrap -C++ functions that return a pointer to some array. The new call policy constructs -object, which provides a regular `Python`_ `sequence`_ interface. - -.. _`sequence` : http://docs.python.org/lib/typesseq.html - - -Example -~~~~~~~ - -.. code-block:: C++ - - struct image_t{ - - ... - - const unsigned char* get_data() const{ - return m_raw_data; - } - - ssize_t get_width() const{ - return m_width; - } - - ssize_t get_height() const{ - return m_height; - } - - private: - unsigned long m_width; - unsigned long m_height; - unsigned char* m_raw_data; - }; - -Before introducing the whole solution, I would like to describe "return_range" -interface. - -``return_range`` definition -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. code-block:: C++ - - template < typename TGetSize - , typename TValueType - , typename TValuePolicies=boost::python::default_call_policies > - struct return_range : boost::python::default_call_policies - { ... }; - -`Boost.Python`_ call policies are stateless classes, which do not care any -information about the invoked function or object. In out case we have to pass -dependency_libraries information: - -* the size of array - -* array type - -* "__getitem__" call policies for array elements - - -``TGetSize`` parameter -++++++++++++++++++++++ - -``TGetSize`` is a class, which is responsible to find out the size of the returned -array. - -``TGetSize`` class must have: - -* default constructor - -* call operator with the following signature: - - .. code-block:: C++ - - ssize_t operator()( boost::python::tuple args ); - - ``args`` is a tuple of arguments, the function was called with. - - Pay attention: this operator will be invoked **after** the function. This - call policy is **not thread-safe**! - -For our case, the following class could be defined: - -.. code-block:: C++ - - struct image_data_size_t{ - ssize_t operator()( boost::python::tuple args ){ - namespace bpl = boost::python; - bpl::object self = args[0]; - image_t& img = bpl::extract< image_t& >( self ); - return img.get_width() * img.get_height(); - } - }; - -Passing all arguments, instead of single "self" argument gives you an ability -to treat functions, where the user asked to get access to the part of the array. - -.. code-block:: C++ - - struct image_t{ - ... - const unsigned char* get_data(ssize_t offset) const{ - //check that offset represents a legal value - ... - return &m_raw_data[offset]; - } - ... - }; - -The following "get size" class treats this situation: - -.. code-block:: C++ - - struct image_data_size_t{ - ssize_t operator()( boost::python::tuple args ){ - namespace bpl = boost::python; - bpl::object self = args[0]; - image_t& img = bpl::extract< image_t& >( self ); - bpl::object offset_obj = args[1]; - ssize_t offset = bpl::extract< ssize_t >( offset_obj ); - return img.get_width() * img.get_height() - offset; - } - }; - - -``TValueType`` parameter -++++++++++++++++++++++++ - -``TValueType`` is a type of array element. In our case it is ``unsigned char``. - -``TValuePolicies`` parameter -++++++++++++++++++++++++++++ - -``TValuePolicies`` is a "call policy" class, which will be applied when the array -element is returned to `Python`_. This is a call policy for "__getitem__" function. - -``unsigned char`` is mapped to immutable type in `Python`_, so I have to use -``default_call_policies``. ``default_call_policies`` is a default value for -``TValuePolicies`` parameter. - - -I think, now you are ready to see the whole solution: - -.. code-block:: C++ - - namespace bpl = boost::python; - namespace ppc = pyplusplus::call_policies; - - BOOST_PYTHON_MODULE(my_module){ - bpl::class_< image_t >( "image_t" ) - .def( "get_width", &image_t::get_width ) - .def( "get_height", &image_t::get_height ) - .def( "get_raw_data", ppc::return_range< image_size_t, unsigned char >() ); - } - -Py++ integration -~~~~~~~~~~~~~~~~ - -The `Py++`_ code is not that different from what you already know: - -.. code-block:: Python - - from pyplusplus import module_builder - from pyplusplus.module_builder import call_policies - - image_size_code = \ - """ - struct image_data_size_t{ - ssize_t operator()( boost::python::tuple args ){ - namespace bpl = boost::python; - bpl::object self = args[0]; - image_t& img = bpl::extract< image_t& >( self ); - return img.get_width() * img.get_height(); - } - }; - """ - - mb = module_builder.module_builder_t( ... ) - image = mb.class_( 'image_t' ) - image.add_declaration_code( image_size_code ) - get_raw_data = image.mem_fun( 'get_raw_data' ) - get_raw_data.call_policies \ - = call_policies.return_range( get_raw_data, "image_data_size_t" ) - -call_policies.return_range arguments: - -1. A reference to function. `Py++`_ will extract by itself the type of the array - element. - -2. A name of "get size" class. - -3. A call policies for "__getitem__" function. `Py++`_ will analyze the array - element type. If the type is mapped to immutable type, than ``default_call_policies`` - is used, otherwise you have to specify call policies. - - -Python usage code: - -.. code-block:: Python - - from my_module import * - - img = image_t(...) - for p in img.get_raw_data(): - print p - -Dependencies -~~~~~~~~~~~~ - -The new call policy depends on `new indexing suite`_ and `Py++`_ :-). But if you -want you can extract the relevant piece of code from `this file`_. - -.. _`new indexing suite` : ./../containers.html -.. _`this file` : http://pygccxml.svn.sourceforge.net/viewvc/pygccxml/pyplusplus_dev/pyplusplus/code_repository/call_policies.py?view=markup - -.. _`ResultConverterGenerator` : http://boost.org/libs/python/doc/v2/ResultConverter.html#ResultConverterGenerator-concept -.. _`CallPolicies` : http://www.boost.org/libs/python/doc/v2/CallPolicies.html#CallPolicies-concept - -.. _`Py++` : ./../../pyplusplus.html -.. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html -.. _`Python`: http://www.python.org -.. _`GCC-XML`: http://www.gccxml.org - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-05 12:38:11
|
Revision: 1420 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1420&view=rev Author: roman_yakovenko Date: 2008-10-05 12:35:30 +0000 (Sun, 05 Oct 2008) Log Message: ----------- small cosmetic changes Modified Paths: -------------- pyplusplus_dev/docs/documentation/functions/call_policies.rest Modified: pyplusplus_dev/docs/documentation/functions/call_policies.rest =================================================================== --- pyplusplus_dev/docs/documentation/functions/call_policies.rest 2008-10-05 10:05:46 UTC (rev 1419) +++ pyplusplus_dev/docs/documentation/functions/call_policies.rest 2008-10-05 12:35:30 UTC (rev 1420) @@ -73,7 +73,7 @@ -------- `Py++`_ is able to "guess" few call policies, base on analysis of return type -and\\or operator name: +and\\or callable name: * ``default_call_policies``: @@ -134,7 +134,7 @@ /* undefined call policies */ - comment, in place of call policy. If `Py++`_ was wrong and function doesn't + comment, instead of call policy. If `Py++`_ was wrong and function doesn't need call policy the generate code will compile fine, otherwise you will get a compilation error. @@ -153,7 +153,7 @@ Actually you should define ``boost::python::type_id`` specialization also in case a function takes the opaque type as an argument. `Py++`_ can do it for you, all -you need is to say to mark a declaration as opaque. +you need is to mark a declaration as opaque. Example: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-05 10:08:27
|
Revision: 1419 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1419&view=rev Author: roman_yakovenko Date: 2008-10-05 10:05:46 +0000 (Sun, 05 Oct 2008) Log Message: ----------- fix testers Modified Paths: -------------- pygccxml_dev/unittests/data/type_traits.hpp pygccxml_dev/unittests/find_container_traits_tester.py pygccxml_dev/unittests/type_traits_tester.py Modified: pygccxml_dev/unittests/data/type_traits.hpp =================================================================== --- pygccxml_dev/unittests/data/type_traits.hpp 2008-10-05 09:45:58 UTC (rev 1418) +++ pygccxml_dev/unittests/data/type_traits.hpp 2008-10-05 10:05:46 UTC (rev 1419) @@ -187,6 +187,10 @@ typedef detail::dd_t dd_t; typedef detail::f_t f_t; typedef detail::g_t g_t; + + typedef detail::const_container const_container_t; + typedef detail::const_item const_item_t; + } namespace no{ typedef std::string string_type; @@ -194,10 +198,7 @@ typedef std::vector< int > vector_of_int_type; typedef std::set< std::string > string_set_type; typedef std::multimap< std::string, std::string > s2s_multimap_type; - typedef detail::vertex vertex_type; - typedef detail::const_container const_container_t; - typedef detail::const_item const_item_t; - + typedef detail::vertex vertex_type; } } @@ -544,11 +545,13 @@ struct x{ x(){} }; +} + +namespace no{ + typedef details::const_item const_item; typedef details::const_container const_container; -} -namespace no{ class y{ private: y(){} Modified: pygccxml_dev/unittests/find_container_traits_tester.py =================================================================== --- pygccxml_dev/unittests/find_container_traits_tester.py 2008-10-05 09:45:58 UTC (rev 1418) +++ pygccxml_dev/unittests/find_container_traits_tester.py 2008-10-05 10:05:46 UTC (rev 1419) @@ -67,7 +67,7 @@ def test_multimap( self ): m = self.global_ns.class_( lambda decl: decl.name.startswith( 'multimap' ) ) traits = declarations.find_container_traits( m ) - self.failUness( m.partial_name == 'multimap< int, int >' ) + self.failUnless( m.partial_name == 'multimap< int, int >' ) def test_recursive_partial_name( self ): f1 = self.global_ns.free_fun( 'f1' ) Modified: pygccxml_dev/unittests/type_traits_tester.py =================================================================== --- pygccxml_dev/unittests/type_traits_tester.py 2008-10-05 09:45:58 UTC (rev 1418) +++ pygccxml_dev/unittests/type_traits_tester.py 2008-10-05 10:05:46 UTC (rev 1419) @@ -247,8 +247,8 @@ code = "struct const_item{ const int values[10]; };" global_ns = parser.parse_string( code , config )[0] ci = global_ns.class_( 'const_item' ) - self.failUnless( len( ci.declarations ) == 5 ) - #constructor, copy constructor, destructor, operator=, variable + self.failUnless( len( ci.declarations ) == 3 ) + #copy constructor, destructor, variable def create_suite(): suite = unittest.TestSuite() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-05 09:48:39
|
Revision: 1418 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1418&view=rev Author: roman_yakovenko Date: 2008-10-05 09:45:58 +0000 (Sun, 05 Oct 2008) Log Message: ----------- update gccxml Modified Paths: -------------- gccxml_bin/v09/win32/bin/gccxml.exe gccxml_bin/v09/win32/bin/gccxml_cc1plus.exe This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-04 18:17:51
|
Revision: 1417 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1417&view=rev Author: roman_yakovenko Date: 2008-10-04 18:17:42 +0000 (Sat, 04 Oct 2008) Log Message: ----------- update tester Modified Paths: -------------- pygccxml_dev/unittests/dependencies_tester.py Modified: pygccxml_dev/unittests/dependencies_tester.py =================================================================== --- pygccxml_dev/unittests/dependencies_tester.py 2008-10-02 06:21:50 UTC (rev 1416) +++ pygccxml_dev/unittests/dependencies_tester.py 2008-10-04 18:17:42 UTC (rev 1417) @@ -76,8 +76,7 @@ self.failUnless( len(dependencies) == 3 ) used_types = map( lambda dependency: dependency.depend_on_it.decl_string , dependencies ) - - self.failUnless( used_types == [ 'int', 'bool', 'int' ] ) + self.failUnless( used_types == [ 'int', 'int', 'bool'] ) some_exception = ns.class_( 'some_exception_t' ) other_exception = ns.class_( 'other_exception_t' ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-10-02 06:22:01
|
Revision: 1416 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1416&view=rev Author: roman_yakovenko Date: 2008-10-02 06:21:50 +0000 (Thu, 02 Oct 2008) Log Message: ----------- small bug fix in "inout" function transformation Modified Paths: -------------- pyplusplus_dev/pyplusplus/function_transformers/transformers.py pyplusplus_dev/unittests/data/ft_inout_bugs_to_be_exported.hpp pyplusplus_dev/unittests/ft_inout_tester.py Modified: pyplusplus_dev/pyplusplus/function_transformers/transformers.py =================================================================== --- pyplusplus_dev/pyplusplus/function_transformers/transformers.py 2008-09-14 12:43:42 UTC (rev 1415) +++ pyplusplus_dev/pyplusplus/function_transformers/transformers.py 2008-10-02 06:21:50 UTC (rev 1416) @@ -243,7 +243,7 @@ tmpl = string.Template( '$name = boost::python::extract< $type >( pyplus_conv::get_out_argument( $py_result, "$name" ) );' ) store_py_result_in_arg = tmpl.substitute( name=self.arg.name - , type=self.arg.type.decl_string + , type=remove_ref_or_ptr( self.arg.type ).decl_string , py_result=controller.py_result_variable.name ) controller.add_py_post_call_code( store_py_result_in_arg ) Modified: pyplusplus_dev/unittests/data/ft_inout_bugs_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/ft_inout_bugs_to_be_exported.hpp 2008-09-14 12:43:42 UTC (rev 1415) +++ pyplusplus_dev/unittests/data/ft_inout_bugs_to_be_exported.hpp 2008-10-02 06:21:50 UTC (rev 1416) @@ -17,4 +17,8 @@ } }; +inline void call_set_flag( base& x, bool value, bool& flag ){ + x.set_flag( value, flag ); } + +} Modified: pyplusplus_dev/unittests/ft_inout_tester.py =================================================================== --- pyplusplus_dev/unittests/ft_inout_tester.py 2008-09-14 12:43:42 UTC (rev 1415) +++ pyplusplus_dev/unittests/ft_inout_tester.py 2008-10-02 06:21:50 UTC (rev 1416) @@ -28,6 +28,19 @@ set_flag = mb.calldefs( 'set_flag' ) set_flag.add_transformation( ft.inout(1) ) + call_set_flag = mb.calldefs( 'call_set_flag' ) + call_set_flag.add_transformation( ft.inout(2) ) + + def create_py_inventor( self, module ): + class pyinventor( module.base ): + def __init__( self ): + module.base.__init__( self ) + + def set_flag( self, value, flag ): + flag = not value + return flag + return pyinventor() + def run_tests(self, module): x = False self.failUnless( True == module.set_flag( True, x ) ) @@ -35,11 +48,25 @@ b = module.base() self.failUnless( True == b.set_flag( True, x ) ) self.failUnless( False == b.set_flag( False, x ) ) + + self.failUnless( True == module.call_set_flag( b, True, x ) ) + self.failUnless( False == module.call_set_flag( b, False, x ) ) + inventor = module.inventor() self.failUnless( False == inventor.set_flag( True, x ) ) self.failUnless( True == inventor.set_flag( False, x ) ) + self.failUnless( False == module.call_set_flag( inventor, True, x ) ) + self.failUnless( True == module.call_set_flag( inventor, False, x ) ) + inventor = self.create_py_inventor( module ) + self.failUnless( False == inventor.set_flag( True, x ) ) + self.failUnless( True == inventor.set_flag( False, x ) ) + + self.failUnless( False == module.call_set_flag( inventor, True, x ) ) + self.failUnless( True == module.call_set_flag( inventor, False, x ) ) + + def create_suite(): suite = unittest.TestSuite() suite.addTest( unittest.makeSuite(tester_t)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-09-14 12:43:32
|
Revision: 1415 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1415&view=rev Author: roman_yakovenko Date: 2008-09-14 12:43:42 +0000 (Sun, 14 Sep 2008) Log Message: ----------- improve documentation style Modified Paths: -------------- pygccxml_dev/docs/pygccxml.rest pygccxml_dev/docs/query_interface.rest pygccxml_dev/docs/upgrade_issues.rest pyplusplus_dev/docs/documentation/architecture.rest pyplusplus_dev/docs/documentation/ctypes/this_and_sizeof.rest pyplusplus_dev/docs/documentation/functions/call_policies.rest pyplusplus_dev/docs/documentation/how_to/best_practices.rest pyplusplus_dev/docs/documentation/how_to/templates.rest pyplusplus_dev/docs/documentation/inserting_code.rest pyplusplus_dev/docs/documentation/multi_module_development.rest pyplusplus_dev/docs/documentation/split_module.rest pyplusplus_dev/docs/documentation/tutorials/module_builder/module_builder.rest Modified: pygccxml_dev/docs/pygccxml.rest =================================================================== --- pygccxml_dev/docs/pygccxml.rest 2008-09-11 19:03:08 UTC (rev 1414) +++ pygccxml_dev/docs/pygccxml.rest 2008-09-14 12:43:42 UTC (rev 1415) @@ -56,7 +56,7 @@ #global_ns is the reference to declarations, which describes global( :: ) namespace global_ns.free_functions( "do_smth", return_type='void', arg_types=[None,'int'] ) -``None`` means "any type". In my opinion the code is prety clear and readable. +``None`` means "any type". In my opinion, the code is prety clear and readable. If you want to know more about provided API read `query interface`__ document or API documentation. Modified: pygccxml_dev/docs/query_interface.rest =================================================================== --- pygccxml_dev/docs/query_interface.rest 2008-09-11 19:03:08 UTC (rev 1414) +++ pygccxml_dev/docs/query_interface.rest 2008-09-14 12:43:42 UTC (rev 1415) @@ -25,8 +25,8 @@ global_ns.member_functions( function=query, arg_types=[None, 'int &'] ) The example is complex, but still readable. In many cases you will find -yourself looking for one or many declarations using one or two properties of that -declaration(s). For example: +yourself, looking for one or many declarations, using one or two declaration properties. +For example: .. code-block:: Python Modified: pygccxml_dev/docs/upgrade_issues.rest =================================================================== --- pygccxml_dev/docs/upgrade_issues.rest 2008-09-11 19:03:08 UTC (rev 1414) +++ pygccxml_dev/docs/upgrade_issues.rest 2008-09-14 12:43:42 UTC (rev 1415) @@ -199,7 +199,7 @@ #f is "calldef_t" instance for arg in f.arguments: - arg.default_value = <new default value or None> + arg.default_value = <<<new default value or None>>> ------------- Modified: pyplusplus_dev/docs/documentation/architecture.rest =================================================================== --- pyplusplus_dev/docs/documentation/architecture.rest 2008-09-11 19:03:08 UTC (rev 1414) +++ pyplusplus_dev/docs/documentation/architecture.rest 2008-09-14 12:43:42 UTC (rev 1415) @@ -88,14 +88,10 @@ .. code-block:: Python mb = module_builder_t( ... ) - -.. code-block:: Python - + details = mb.namespace( 'details' ) details.exclude() - -.. code-block:: Python - + my_class = mb.class_( 'my_class' ) my_class.rename("MyClass") Modified: pyplusplus_dev/docs/documentation/ctypes/this_and_sizeof.rest =================================================================== --- pyplusplus_dev/docs/documentation/ctypes/this_and_sizeof.rest 2008-09-11 19:03:08 UTC (rev 1414) +++ pyplusplus_dev/docs/documentation/ctypes/this_and_sizeof.rest 2008-09-14 12:43:42 UTC (rev 1415) @@ -18,7 +18,7 @@ .. code-block:: Python mb = module_builder_t( ... ) - cls = mb.class_( <your class> ) + cls = mb.class_( <<<your class>>> ) cls.expose_this = True cls.expose_sizeof = True @@ -28,7 +28,7 @@ .. code-block:: Python import ctypes - from <your module> import <your class> as data_t + from <<<your module>>> import <<<your class>>> as data_t d = data_t() print d.this Modified: pyplusplus_dev/docs/documentation/functions/call_policies.rest =================================================================== --- pyplusplus_dev/docs/documentation/functions/call_policies.rest 2008-09-11 19:03:08 UTC (rev 1414) +++ pyplusplus_dev/docs/documentation/functions/call_policies.rest 2008-09-14 12:43:42 UTC (rev 1415) @@ -200,14 +200,14 @@ mb = module_builder.module_builder_t( ... ) mb.free_function( ... ).call_policies \ - = call_policies.custom_call_policies( your call policies code ) + = call_policies.custom_call_policies( <<<your call policies code>>> ) Optionally you can specify name of the header file, which should be included: .. code-block:: Python mb.free_function( ... ).call_policies \ - = call_policies.custom_call_policies( your call policies code, "xyz.hpp" ) + = call_policies.custom_call_policies( <<<your call policies code>>>, "xyz.hpp" ) return_addressof ---------------- Modified: pyplusplus_dev/docs/documentation/how_to/best_practices.rest =================================================================== --- pyplusplus_dev/docs/documentation/how_to/best_practices.rest 2008-09-11 19:03:08 UTC (rev 1414) +++ pyplusplus_dev/docs/documentation/how_to/best_practices.rest 2008-09-14 12:43:42 UTC (rev 1415) @@ -44,7 +44,7 @@ .. code-block:: Python from module_builder import * - mb = module_builder_t( ..., cache=file_cache_t( path to project cache file ), ... ) + mb = module_builder_t( ..., cache=file_cache_t( <<<path to project cache file>>> ), ... ) * Single header file, will also improve performance compiling the generated bindings. Modified: pyplusplus_dev/docs/documentation/how_to/templates.rest =================================================================== --- pyplusplus_dev/docs/documentation/how_to/templates.rest 2008-09-11 19:03:08 UTC (rev 1414) +++ pyplusplus_dev/docs/documentation/how_to/templates.rest 2008-09-14 12:43:42 UTC (rev 1415) @@ -73,7 +73,7 @@ code = generate_instantiations_string( ... ) - mb = module_builder_t( [ create_text_fc( code ), other header files ], ... ) + mb = module_builder_t( [ create_text_fc( code ), <<<other file names>>> ], ... ) ... Function ``create_text_fc`` allows you to extract declarations from the string, Modified: pyplusplus_dev/docs/documentation/inserting_code.rest =================================================================== --- pyplusplus_dev/docs/documentation/inserting_code.rest 2008-09-11 19:03:08 UTC (rev 1414) +++ pyplusplus_dev/docs/documentation/inserting_code.rest 2008-09-14 12:43:42 UTC (rev 1415) @@ -182,16 +182,23 @@ def inject_code( cls ): constructors = cls.constructors() constructors.body = class instance registration code - cls.null_constructor_body = class instance registration code - cls.copy_constructor_body = class instance registration code + #if you need to add code to default or copy constructor only + #than you can you the following shortcuts + cls.null_constructor_body = <<<your code>>> + cls.copy_constructor_body = <<<your code>>> + #which will update the appropriate ``body`` property. + + #If you want to add code to the class destructor, + #use ``add_destructor_code`` method + cls.add_destructor_code( <<<your code>>> ) + + #If you need to add new class variables: + cls.add_wrapper_code( <<<variable declaration>>> ) - cls.add_wrapper_code( destructor declaration and definition code ) - cls.add_wrapper_code( the new class variable definition code ) - .. code-block:: Python mb = module_builder_t( ... ) - for cls in mb.classes( relevant classes only ): + for cls in mb.classes( <<<relevant classes only>>> ): inject_code( cls ) ------------ Modified: pyplusplus_dev/docs/documentation/multi_module_development.rest =================================================================== --- pyplusplus_dev/docs/documentation/multi_module_development.rest 2008-09-11 19:03:08 UTC (rev 1414) +++ pyplusplus_dev/docs/documentation/multi_module_development.rest 2008-09-14 12:43:42 UTC (rev 1415) @@ -146,7 +146,7 @@ .. code-block:: Python mb = module_builder_t( ... ) - mb.register_module_dependency( other module generated code directory ) + mb.register_module_dependency( <<<other module generated code directory>>> ) ------ Modified: pyplusplus_dev/docs/documentation/split_module.rest =================================================================== --- pyplusplus_dev/docs/documentation/split_module.rest 2008-09-11 19:03:08 UTC (rev 1414) +++ pyplusplus_dev/docs/documentation/split_module.rest 2008-09-14 12:43:42 UTC (rev 1415) @@ -40,7 +40,7 @@ mb = module_builder.module_builder_t(...) mb.build_code_creator( ... ) - mb.write_module( file name ) + mb.write_module( <<<file name>>> ) -------------- Multiple files @@ -92,7 +92,7 @@ mb = module_builder.module_builder_t(...) mb.build_code_creator( ... ) - mb.split_module( directory name ) + mb.split_module( <<<directory name>>> ) ------------------------------------------------------------- @@ -133,7 +133,7 @@ mb = module_builder.module_builder_t(...) mb.build_code_creator( ... ) - mb.split_module( directory name, [ list of huge classes names ] ) + mb.split_module( <<<directory name>>>, [ <<<list of huge classes names>>> ] ) --------------------------- Fixed set of multiple files @@ -154,7 +154,7 @@ mb = module_builder.module_builder_t(...) mb.build_code_creator( ... ) - mb.balanced_split_module( directory name, number of generated source files ) + mb.balanced_split_module( <<<directory name>>>, <<<number of generated source files>>> ) ------------------ Modified: pyplusplus_dev/docs/documentation/tutorials/module_builder/module_builder.rest =================================================================== --- pyplusplus_dev/docs/documentation/tutorials/module_builder/module_builder.rest 2008-09-11 19:03:08 UTC (rev 1414) +++ pyplusplus_dev/docs/documentation/tutorials/module_builder/module_builder.rest 2008-09-14 12:43:42 UTC (rev 1415) @@ -126,7 +126,7 @@ .. code-block:: Python - mb.code_creator.license = your license text + mb.code_creator.license = <<<your license text>>> After you call this function, I recommend you not to change declarations configuration. In most cases the change will take effect, in some cases it will This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-09-11 19:02:58
|
Revision: 1414 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1414&view=rev Author: roman_yakovenko Date: 2008-09-11 19:03:08 +0000 (Thu, 11 Sep 2008) Log Message: ----------- add new test case Modified Paths: -------------- pyplusplus_dev/unittests/data/indexing_suites_to_be_exported.hpp pyplusplus_dev/unittests/indexing_suites_tester.py Added Paths: ----------- pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.cpp pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp Modified: pyplusplus_dev/unittests/data/indexing_suites_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/indexing_suites_to_be_exported.hpp 2008-09-11 18:59:42 UTC (rev 1413) +++ pyplusplus_dev/unittests/data/indexing_suites_to_be_exported.hpp 2008-09-11 19:03:08 UTC (rev 1414) @@ -15,6 +15,14 @@ inline void do_nothing( const strings_t& ){} +inline strings_t get_names(){ + strings_t names; + names.push_back( "a" ); + names.push_back( "a" ); + names.push_back( "a" ); + return names; +} + struct item_t{ item_t() : value( -1 ){} Added: pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.cpp =================================================================== --- pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.cpp (rev 0) +++ pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.cpp 2008-09-11 19:03:08 UTC (rev 1414) @@ -0,0 +1,51 @@ +// 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) + +#include "member_variables_protected_to_be_exported.hpp" + +namespace member_variables{ + +int point::instance_count = 0; +const point::color point::default_color = point::red; + +unsigned int get_a(const bit_fields_t& inst){ + return inst.a; +} + +void set_a( bit_fields_t& inst, unsigned int new_value ){ + inst.a = new_value; +} + +unsigned int get_b(const bit_fields_t& inst){ + return inst.b; +} + +namespace pointers{ + +std::auto_ptr<tree_node_t> create_tree(){ + std::auto_ptr<tree_node_t> root( new tree_node_t() ); + root->data = new data_t(); + root->data->value = 0; + + root->left = new tree_node_t( root.get() ); + root->left->data = new data_t(); + root->left->data->value = 1; + + return root; +} + +} + +namespace statics{ + std::string mem_var_str_t::class_name( "mem_var_str_t" ); +} + + +namespace ctypes{ + int xxx = 1997; + int* image_t::none_image = &xxx; +} + +} Added: pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp (rev 0) +++ pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp 2008-09-11 19:03:08 UTC (rev 1414) @@ -0,0 +1,197 @@ +// 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 __member_variables_protected_to_be_exported_hpp__ +#define __member_variables_protected_to_be_exported_hpp__ +#include <memory> +#include <string> +#include <iostream> + +namespace member_variables{ + +struct point{ + enum color{ red, green, blue }; + + point() + : prefered_color( blue ) + , x( -1 ) + , y( 2 ) + {++instance_count;} + + point( const point& other ) + : prefered_color( other.prefered_color ) + , x( other.x ) + , y( other.y ) + {} + + ~point() + { --instance_count; } +protected: + int x; + int y; + const color prefered_color; + static int instance_count; + static const color default_color; +}; + +struct bit_fields_t{ + friend unsigned int get_a(const bit_fields_t& inst); + friend void set_a( bit_fields_t& inst, unsigned int new_value ); + friend unsigned int get_b(const bit_fields_t& inst); + + bit_fields_t() + : b(28){} +protected: + unsigned int a : 1; + unsigned int : 0; + const unsigned int b : 11; +}; + +unsigned int get_a(const bit_fields_t& inst); +void set_a( bit_fields_t& inst, unsigned int new_value ); +unsigned int get_b(const bit_fields_t& inst); + +struct array_t{ + array_t(){ + for( int i = 0; i < 10; ++i ){ + ivars[i] = -i; + } + } + + struct variable_t{ + variable_t() : value(-9){} + int value; + }; + + int get_ivars_item( int index ){ + return ivars[index]; + } +protected: + const variable_t vars[3]; + int ivars[10]; + int ivars2[10]; +}; + +namespace pointers{ + +struct tree_node_t; + +struct data_t{ + friend struct tree_node_t; + friend std::auto_ptr<tree_node_t> create_tree(); + data_t() : value( 201 ) {} +protected: + int value; + static char* reserved; +}; + +struct tree_node_t{ +protected: + data_t *data; + tree_node_t *left; + tree_node_t *right; + const tree_node_t *parent; +public: + tree_node_t(const tree_node_t* parent=0) + : data(0) + , left( 0 ) + , right( 0 ) + , parent( parent ) + {} + + ~tree_node_t(){ + std::cout << "\n~tree_node_t"; + } + friend std::auto_ptr<tree_node_t> create_tree(); +}; + +std::auto_ptr<tree_node_t> create_tree(); + +} + +namespace reference{ + +enum EFruit{ apple, orange }; + +struct fundamental_t{ + fundamental_t( EFruit& fruit, const int& i ) + : m_fruit( fruit ), m_i( i ) + {} +protected: + EFruit& m_fruit; + const int& m_i; +}; + +struct A{}; + + +struct B { + B( A& a_ ): a( a_ ){} +protected: + A& a; +}; + +struct C { + C( A& a_ ): a( a_ ){} +protected: + const A& a; +}; + +} + +namespace statics{ + +struct mem_var_str_t{ +protected: + static std::string class_name; +public: + std::string identity(std::string x){ return x; } +}; + +} + +namespace bugs{ +struct allocator_ { + void * (*alloc) (unsigned); + void (*dispose) (void *p); +}; + +typedef struct allocator_ *allocator_t; + +struct faulty { +protected: + allocator_t allocator; +}; + +} + + +namespace ctypes{ + struct image_t{ + image_t(){ + data = new int[5]; + for(int i=0; i<5; i++){ + data[i] = i; + } + } + int* data; + + static int* none_image; + }; + + class Andy{ + protected: + Andy() : userData(NULL) {} + + virtual ~Andy() {} + + public: + void * userData; + }; + +} + +} +#endif//__member_variables_protected_to_be_exported_hpp__ Modified: pyplusplus_dev/unittests/indexing_suites_tester.py =================================================================== --- pyplusplus_dev/unittests/indexing_suites_tester.py 2008-09-11 18:59:42 UTC (rev 1413) +++ pyplusplus_dev/unittests/indexing_suites_tester.py 2008-09-11 19:03:08 UTC (rev 1414) @@ -41,6 +41,9 @@ items.append( item ) self.failUnless( module.get_value( items, 0 ).value == 1977 ) self.failUnless( len( items ) == 1 ) + names = module.get_names() + self.failUnless( len( names ) == 3 ) + self.failUnless( names[0] == names[1] == names[2]== "a" ) def create_suite(): suite = unittest.TestSuite() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-09-11 18:59:32
|
Revision: 1413 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1413&view=rev Author: roman_yakovenko Date: 2008-09-11 18:59:42 +0000 (Thu, 11 Sep 2008) Log Message: ----------- fix few bugs related to default\copy constructors Modified Paths: -------------- pyplusplus_dev/pyplusplus/code_creators/calldef.py pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py pyplusplus_dev/pyplusplus/module_creator/creator.py pyplusplus_dev/unittests/algorithms_tester.py Modified: pyplusplus_dev/pyplusplus/code_creators/calldef.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/calldef.py 2008-09-05 19:41:29 UTC (rev 1412) +++ pyplusplus_dev/pyplusplus/code_creators/calldef.py 2008-09-11 18:59:42 UTC (rev 1413) @@ -1010,18 +1010,22 @@ """ Creates wrapper class constructor from wrapped class instance. """ - def __init__( self, class_ ): + def __init__( self, constructor ): code_creator.code_creator_t.__init__( self ) - declaration_based.declaration_based_t.__init__( self, declaration=class_ ) + declaration_based.declaration_based_t.__init__( self, declaration=constructor ) + + @property + def parent_class( self ): + return self.declaration.parent def _create_declaration(self): result = [] - result.append( self.declaration.wrapper_alias ) + result.append( self.parent_class.wrapper_alias ) result.append( '(' ) if not self.target_configuration.boost_python_has_wrapper_held_type \ - or self.declaration.require_self_reference: + or self.parent_class.require_self_reference: result.append( 'PyObject* self, ' ) - declarated = declarations.declarated_t( self.declaration ) + declarated = declarations.declarated_t( self.parent_class ) const_decl = declarations.const_t( declarated ) const_ref_decl = declarations.reference_t( const_decl ) identifier = algorithm.create_identifier( self, const_ref_decl.decl_string ) @@ -1030,7 +1034,7 @@ return ''.join( result ) def _create_constructor_call( self ): - answer = [ algorithm.create_identifier( self, self.declaration.decl_string ) ] + answer = [ algorithm.create_identifier( self, self.parent_class.decl_string ) ] answer.append( '( arg )' ) return ''.join( answer ) @@ -1039,7 +1043,7 @@ answer.append( ': ' + self._create_constructor_call() ) answer.append( ' , ' + self.parent.boost_wrapper_identifier + '(){' ) answer.append( self.indent( '// copy constructor' ) ) - answer.append( self.indent( self.declaration.copy_constructor_body ) ) + answer.append( self.indent( self.declaration.body ) ) answer.append( '}' ) return os.linesep.join( answer ) @@ -1051,23 +1055,27 @@ """ Creates wrapper for compiler generated null constructor. """ - def __init__( self, class_ ): + def __init__( self, constructor ): code_creator.code_creator_t.__init__( self ) - declaration_based.declaration_based_t.__init__( self, declaration=class_ ) - + declaration_based.declaration_based_t.__init__( self, declaration=constructor ) + + @property + def parent_class( self ): + return self.declaration.parent + def _create_constructor_call( self ): - return algorithm.create_identifier( self, self.declaration.decl_string ) + '()' + return algorithm.create_identifier( self, self.parent_class.decl_string ) + '()' def _create_impl(self): - answer = [ self.declaration.wrapper_alias + '(' ] + answer = [ self.parent_class.wrapper_alias + '(' ] if not self.target_configuration.boost_python_has_wrapper_held_type \ - or self.declaration.require_self_reference: + or self.parent_class.require_self_reference: answer[0] = answer[0] + 'PyObject* self' answer[0] = answer[0] + ')' answer.append( ': ' + self._create_constructor_call() ) answer.append( ' , ' + self.parent.boost_wrapper_identifier + '(){' ) answer.append( self.indent( '// null constructor' ) ) - answer.append( self.indent( self.declaration.null_constructor_body ) ) + answer.append( self.indent( self.declaration.body ) ) answer.append( '}' ) return os.linesep.join( answer ) Modified: pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2008-09-05 19:41:29 UTC (rev 1412) +++ pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2008-09-11 18:59:42 UTC (rev 1413) @@ -185,8 +185,6 @@ self._registration_code_tail = [] self._declaration_code = [] self._wrapper_code = [] - self._null_constructor_body = '' - self._copy_constructor_body = '' self._destructor_code = [] self._exception_translation_code = None self._properties = [] @@ -298,16 +296,29 @@ return self._wrapper_code def _get_null_constructor_body(self): - return self._null_constructor_body + c = self.find_trivial_constructor() + if c: + return c.body + else: + return '' def _set_null_constructor_body(self, body): - self._null_constructor_body = body + c = self.find_trivial_constructor() + if c: + c.body = body null_constructor_body = property( _get_null_constructor_body, _set_null_constructor_body - , doc="null constructor code, that will be added as is to the null constructor of class-wrapper") + , doc="null constructor code, that will be added as is to the null constructor of class-wrapper" ) def _get_copy_constructor_body(self): - return self._copy_constructor_body + c = self.find_copy_constructor() + if c: + return c.body + else: + return '' + def _set_copy_constructor_body(self, body): - self._copy_constructor_body = body + c = self.find_copy_constructor() + if c: + c.body = body copy_constructor_body = property( _get_copy_constructor_body, _set_copy_constructor_body , doc="copy constructor code, that will be added as is to the copy constructor of class-wrapper") Modified: pyplusplus_dev/pyplusplus/module_creator/creator.py =================================================================== --- pyplusplus_dev/pyplusplus/module_creator/creator.py 2008-09-05 19:41:29 UTC (rev 1412) +++ pyplusplus_dev/pyplusplus/module_creator/creator.py 2008-09-11 18:59:42 UTC (rev 1413) @@ -594,12 +594,12 @@ copy_constr = self.curr_decl.find_copy_constructor() if not self.curr_decl.noncopyable and copy_constr and copy_constr.is_artificial: - cccc = code_creators.copy_constructor_wrapper_t( class_=self.curr_decl) + cccc = code_creators.copy_constructor_wrapper_t( constructor=copy_constr) wrapper.adopt_creator( cccc ) trivial_constr = self.curr_decl.find_trivial_constructor() if trivial_constr and trivial_constr.is_artificial and not noncopyable_vars: - tcons = code_creators.null_constructor_wrapper_t( class_=self.curr_decl ) + tcons = code_creators.null_constructor_wrapper_t( constructor=trivial_constr ) wrapper.adopt_creator( tcons ) exposed = self.expose_overloaded_mem_fun_using_macro( cls_decl, cls_cc ) Modified: pyplusplus_dev/unittests/algorithms_tester.py =================================================================== --- pyplusplus_dev/unittests/algorithms_tester.py 2008-09-05 19:41:29 UTC (rev 1412) +++ pyplusplus_dev/unittests/algorithms_tester.py 2008-09-11 18:59:42 UTC (rev 1413) @@ -268,7 +268,41 @@ self.failUnless( do_smth.exportable == False ) print do_smth.why_not_exportable() + +class constructors_code_tester_t( unittest.TestCase ): + def test(self): + code = """ + namespace xyz{ + struct Y; + + struct X{ + X(); + X( const X& ); + X( Y* ); + }; + } + """ + + mb = module_builder.module_builder_t( + [ module_builder.create_text_fc( code ) ] + , gccxml_path=autoconfig.gccxml.executable ) + + x = mb.class_( 'X' ) + x.include() + x.constructors().body = ' //all constructors body' + x.null_constructor_body = ' //null constructor body' + x.copy_constructor_body = ' //copy constructor body' + + mb.build_code_creator( 'XXX' ) + code = mb.code_creator.create() + tmp = code.split( x.null_constructor_body ) + self.failUnless( len( tmp ) == 2 ) + tmp = code.split( x.copy_constructor_body ) + self.failUnless( len( tmp ) == 2 ) + tmp = code.split( ' //all constructors body' ) + self.failUnless( len( tmp ) == 2 ) + def create_suite(): suite = unittest.TestSuite() suite.addTest( unittest.makeSuite(doc_extractor_tester_t)) @@ -283,6 +317,7 @@ suite.addTest( unittest.makeSuite(exclude_erronious_tester_t)) suite.addTest( unittest.makeSuite(use_function_signature_bug_tester_t)) suite.addTest( unittest.makeSuite(exclude_ellipsis_tester_t)) + suite.addTest( unittest.makeSuite(constructors_code_tester_t)) return suite def run_suite(): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-09-05 19:41:43
|
Revision: 1412 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1412&view=rev Author: roman_yakovenko Date: 2008-09-05 19:41:29 +0000 (Fri, 05 Sep 2008) Log Message: ----------- addnew test data - protected variables Modified Paths: -------------- pyplusplus_dev/unittests/data/no_init_to_be_exported.hpp Modified: pyplusplus_dev/unittests/data/no_init_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/no_init_to_be_exported.hpp 2008-09-05 19:39:55 UTC (rev 1411) +++ pyplusplus_dev/unittests/data/no_init_to_be_exported.hpp 2008-09-05 19:41:29 UTC (rev 1412) @@ -54,7 +54,24 @@ private: map_iterator_t(){}; }; +/* +class Data{ +private: + Data(){} +}; +class Value : public Data{ +public: + int get1() { return 1; } +}; + +class Primitive : public Value +{}; + +class Boolean : public Primitive{ + bool value; +}; +*/ } #endif//__no_init_to_be_exported_hpp__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-09-05 19:39:54
|
Revision: 1411 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1411&view=rev Author: roman_yakovenko Date: 2008-09-05 19:39:55 +0000 (Fri, 05 Sep 2008) Log Message: ----------- small refactoring to improve no_init handling Modified Paths: -------------- pyplusplus_dev/pyplusplus/code_creators/class_declaration.py pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py Modified: pyplusplus_dev/pyplusplus/code_creators/class_declaration.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2008-09-03 12:01:18 UTC (rev 1410) +++ pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2008-09-05 19:39:55 UTC (rev 1411) @@ -217,38 +217,18 @@ if self.documentation: result.append( ', %s' % self.documentation ) used_init = None - inits = filter( lambda x: isinstance( x, calldef.constructor_t ), self.creators ) - has_nonpublic_destructor = declarations.has_destructor( self.declaration ) \ - and not declarations.has_public_destructor( self.declaration ) - - #select all public constructors and exclude copy constructor - cs = self.declaration.constructors( lambda c: not c.is_copy_constructor and c.access_type == 'public' - , recursive=False, allow_empty=True ) - has_suitable_constructor = bool( cs ) - if cs and len(cs) == 1 and cs[0].is_trivial_constructor and self.declaration.find_noncopyable_vars(): - has_suitable_constructor = False + inits = filter( lambda x: isinstance( x, calldef.constructor_t ), self.creators ) trivial_constructor = self.declaration.find_trivial_constructor() - - if has_nonpublic_destructor \ - or ( self.declaration.is_abstract and not self.wrapper ) \ - or not has_suitable_constructor: + + if self.declaration.no_init: result.append( ", " ) result.append( algorithm.create_identifier( self, '::boost::python::no_init' ) ) - elif not trivial_constructor or trivial_constructor.access_type != 'public': + else: if inits: used_init = inits[0] result.append( ", " ) result.append( used_init.create_init_code() ) - elif self.declaration.indexing_suite: - pass #in this case all constructors are exposed by indexing suite - else:#it is possible to class to have public accessed constructor - #that could not be exported by boost.python library - #for example constructor takes as argument pointer to function - result.append( ", " ) - result.append( algorithm.create_identifier( self, '::boost::python::no_init' ) ) - else: - pass result.append( ' )' ) return ( ''.join( result ), used_init ) Modified: pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2008-09-03 12:01:18 UTC (rev 1410) +++ pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2008-09-05 19:39:55 UTC (rev 1411) @@ -196,6 +196,7 @@ self._expose_this = None self._expose_sizeof = None self._fake_constructors = [] + self._no_init = None @property def fake_constructors(self): @@ -685,3 +686,38 @@ return False else: return True + + def _get_no_init( self ): + if None is self._no_init and False == bool( self.indexing_suite ): + #select all public constructors and exclude copy constructor + cs = self.constructors( lambda c: not c.is_copy_constructor and c.access_type == 'public' + , recursive=False, allow_empty=True ) + + has_suitable_constructor = bool( cs ) + if cs and len(cs) == 1 and cs[0].is_trivial_constructor and self.find_noncopyable_vars(): + has_suitable_constructor = False + + has_nonpublic_destructor = declarations.has_destructor( self ) \ + and not declarations.has_public_destructor( self ) + + trivial_constructor = self.find_trivial_constructor() + + if has_nonpublic_destructor \ + or ( self.is_abstract and not self.is_wrapper_needed() ) \ + or not has_suitable_constructor: + self._no_init = True + elif not trivial_constructor or trivial_constructor.access_type != 'public': + exportable_cs = filter( lambda c: c.exportable and c.ignore == False + , cs ) + if not exportable_cs: + self._no_init = True + else: + pass + if None is self._no_init: + self._no_init = False + return self._no_init + def _set_no_init( self, value ): + self._no_init = value + + no_init = property( _get_no_init, _set_no_init + , doc="If True, class will be registered with 'boost::python::no_init'" ) \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-09-03 12:01:08
|
Revision: 1410 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1410&view=rev Author: roman_yakovenko Date: 2008-09-03 12:01:18 +0000 (Wed, 03 Sep 2008) Log Message: ----------- fix spelling mistakes found by Bernd Fritzke Modified Paths: -------------- pyplusplus_dev/docs/documentation/how_to/file_name_too_long.rest pyplusplus_dev/docs/peps/dsl_challenge.rest pyplusplus_dev/pyplusplus/decl_wrappers/algorithm.py pyplusplus_dev/pyplusplus/module_builder/builder.py Modified: pyplusplus_dev/docs/documentation/how_to/file_name_too_long.rest =================================================================== --- pyplusplus_dev/docs/documentation/how_to/file_name_too_long.rest 2008-08-26 19:01:31 UTC (rev 1409) +++ pyplusplus_dev/docs/documentation/how_to/file_name_too_long.rest 2008-09-03 12:01:18 UTC (rev 1410) @@ -20,7 +20,7 @@ As you know, a class name in `Python`_ has few `constraints`_ and `Py++`_ is aware of them. "holder< int >" is illegal class name, so `Py++`_ will generate another -one - "holder_less_int_grate\_". Pretty ugly and even long, but at least it is +one - "holder_less_int_greater\_". Pretty ugly and even long, but at least it is legal one. .. _`constraints` : http://www.python.org/doc/current/ref/identifiers.html Modified: pyplusplus_dev/docs/peps/dsl_challenge.rest =================================================================== --- pyplusplus_dev/docs/peps/dsl_challenge.rest 2008-08-26 19:01:31 UTC (rev 1409) +++ pyplusplus_dev/docs/peps/dsl_challenge.rest 2008-09-03 12:01:18 UTC (rev 1410) @@ -117,7 +117,7 @@ PointTmpl = mb.module.template('Point') Point = PointTmpl( 'int' ) - This is a trivial example, which is why it looks grate. Consider the following class: + This is a trivial example, which is why it looks great. Consider the following class: .. code-block:: C++ Modified: pyplusplus_dev/pyplusplus/decl_wrappers/algorithm.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/algorithm.py 2008-08-26 19:01:31 UTC (rev 1409) +++ pyplusplus_dev/pyplusplus/decl_wrappers/algorithm.py 2008-09-03 12:01:18 UTC (rev 1410) @@ -62,7 +62,7 @@ return name replace_table = { '<' : '_less_' - , '>' : '_grate_' + , '>' : '_greater_' , '::' : '_scope_' , ',' : '_comma_' , ' ' : '_' Modified: pyplusplus_dev/pyplusplus/module_builder/builder.py =================================================================== --- pyplusplus_dev/pyplusplus/module_builder/builder.py 2008-08-26 19:01:31 UTC (rev 1409) +++ pyplusplus_dev/pyplusplus/module_builder/builder.py 2008-09-03 12:01:18 UTC (rev 1410) @@ -522,7 +522,6 @@ """Please see L{decl_wrappers.scopedef_t} class documentation""" return self.global_ns.operator( name=name , symbol=symbol - , function=function , decl_type=decl_type , return_type=return_type , arg_types=arg_types @@ -534,7 +533,6 @@ """Please see L{decl_wrappers.scopedef_t} class documentation""" return self.global_ns.operators( name=name , symbol=symbol - , function=function , decl_type=decl_type , return_type=return_type , arg_types=arg_types This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-08-26 19:01:21
|
Revision: 1409 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1409&view=rev Author: roman_yakovenko Date: 2008-08-26 19:01:31 +0000 (Tue, 26 Aug 2008) Log Message: ----------- adding new test case from Gustavo Carneiro Modified Paths: -------------- pygccxml_dev/unittests/data/remove_template_defaults.hpp pygccxml_dev/unittests/find_container_traits_tester.py Modified: pygccxml_dev/unittests/data/remove_template_defaults.hpp =================================================================== --- pygccxml_dev/unittests/data/remove_template_defaults.hpp 2008-08-26 11:23:56 UTC (rev 1408) +++ pygccxml_dev/unittests/data/remove_template_defaults.hpp 2008-08-26 19:01:31 UTC (rev 1409) @@ -76,6 +76,9 @@ typedef std::map< int, double > m_i2d; typedef std::map< std::wstring, double > m_wstr2d; typedef std::map< const std::vector< int >, m_wstr2d > m_v_i2m_wstr2d; + + inline std::map<std::string, int> f2(){} + } namespace multimaps{ Modified: pygccxml_dev/unittests/find_container_traits_tester.py =================================================================== --- pygccxml_dev/unittests/find_container_traits_tester.py 2008-08-26 11:23:56 UTC (rev 1408) +++ pygccxml_dev/unittests/find_container_traits_tester.py 2008-08-26 19:01:31 UTC (rev 1409) @@ -65,16 +65,25 @@ self.__cmp_traits( 'hmm_i2d', declarations.hash_multimap_traits, "hash_multimap< int, double >", 'int' ) def test_multimap( self ): - mm = self.global_ns.classes( lambda decl: decl.name.startswith( 'multimap' ) ) - for m in mm: - traits = declarations.find_container_traits( m ) - print m.partial_name + m = self.global_ns.class_( lambda decl: decl.name.startswith( 'multimap' ) ) + traits = declarations.find_container_traits( m ) + self.failUness( m.partial_name == 'multimap< int, int >' ) def test_recursive_partial_name( self ): f1 = self.global_ns.free_fun( 'f1' ) t1 = declarations.class_traits.get_declaration( f1.arguments[0].type ) self.failUnless( 'type< std::set< std::vector< int > > >' == t1.partial_name ) + def test_remove_defaults_partial_name_namespace( self ): + f2 = self.global_ns.free_fun( 'f2' ) + type_info = f2.return_type + traits = declarations.find_container_traits( type_info ) + cls = traits .class_declaration( type_info ) + decl_string = cls.partial_decl_string #traits.remove_defaults(type_info) + key_type_string = traits.key_type(type_info).partial_decl_string + self.assert_(decl_string.startswith('::std::'), "declaration string %r doesn't start with 'std::'" % decl_string) + self.assert_(key_type_string.startswith('::std::'), "key type string %r doesn't start with 'std::'" % key_type_string) + def test_from_ogre( self ): x = 'map<std::string, bool (*)(std::string&, Ogre::MaterialScriptContext&), std::less<std::string>, std::allocator<std::pair<std::string const, bool (*)(std::string&, Ogre::MaterialScriptContext&)> > >' ct = declarations.find_container_traits( x ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2008-08-26 11:23:47
|
Revision: 1408 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1408&view=rev Author: roman_yakovenko Date: 2008-08-26 11:23:56 +0000 (Tue, 26 Aug 2008) Log Message: ----------- add key_type functionality for container_traits add element_type and key_type caching Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/algorithms_cache.py pygccxml_dev/pygccxml/declarations/container_traits.py pygccxml_dev/unittests/find_container_traits_tester.py pygccxml_dev/unittests/vector_traits_tester.py Modified: pygccxml_dev/pygccxml/declarations/algorithms_cache.py =================================================================== --- pygccxml_dev/pygccxml/declarations/algorithms_cache.py 2008-08-26 08:55:58 UTC (rev 1407) +++ pygccxml_dev/pygccxml/declarations/algorithms_cache.py 2008-08-26 11:23:56 UTC (rev 1408) @@ -17,7 +17,9 @@ self._access_type = None self._demangled_name = None self._declaration_path = None - self._partial_declaration_path = None + self._partial_declaration_path = None + self._container_key_type = None + self._container_element_type = None def disable( self ): self._enabled = False @@ -31,27 +33,22 @@ def _get_full_name( self ): return self._full_name - def _set_full_name( self, fname ): if not self.enabled: fname = None - self._full_name = fname - + self._full_name = fname full_name = property( _get_full_name, _set_full_name ) def _get_full_partial_name( self ): return self._full_partial_name - def _set_full_partial_name( self, fname ): if not self.enabled: fname = None - self._full_partial_name = fname - + self._full_partial_name = fname full_partial_name = property( _get_full_partial_name, _set_full_partial_name ) def _get_access_type( self ): return self._access_type - def _set_access_type( self, access_type ): if not self.enabled: access_type = None @@ -60,35 +57,45 @@ def _get_demangled_name( self ): return self._demangled_name - def _set_demangled_name( self, demangled_name ): if not self.enabled: demangled_name = None - self._demangled_name = demangled_name - + self._demangled_name = demangled_name demangled_name = property( _get_demangled_name, _set_demangled_name ) def _get_declaration_path( self ): return self._declaration_path - def _set_declaration_path( self, declaration_path ): if not self.enabled: declaration_path = None self._declaration_path = declaration_path - declaration_path = property( _get_declaration_path, _set_declaration_path ) def _get_partial_declaration_path( self ): return self._partial_declaration_path - def _set_partial_declaration_path( self, partial_declaration_path ): if not self.enabled: partial_declaration_path = None self._partial_declaration_path = partial_declaration_path - partial_declaration_path = property( _get_partial_declaration_path , _set_partial_declaration_path ) + def _get_container_element_type( self ): + return self._container_element_type + def _set_container_element_type( self, etype ): + if not self.enabled: + etype = None + self._container_element_type = etype + container_element_type = property( _get_container_element_type, _set_container_element_type ) + + def _get_container_key_type( self ): + return self._container_key_type + def _set_container_key_type( self, ktype ): + if not self.enabled: + ktype = None + self._container_key_type = ktype + container_key_type = property( _get_container_key_type, _set_container_key_type ) + def reset( self ): self.full_name = None self.full_partial_name = None @@ -96,6 +103,8 @@ self.demangled_name = None self.declaration_path = None self.partial_declaration_path = None + self.container_key_type = None + self.container_element_type = None def reset_name_based( self ): self.full_name = None @@ -103,6 +112,8 @@ self.demangled_name = None self.declaration_path = None self.partial_declaration_path = None + self.container_key_type = None + self.container_element_type = None def reset_access_type( self ): self.access_type = None @@ -124,7 +135,6 @@ def _get_remove_alias( self ): return self._remove_alias - def _set_remove_alias( self, remove_alias ): if not type_algs_cache_t.enabled: remove_alias = None @@ -134,4 +144,4 @@ def reset(self): self.remove_alias = None - \ No newline at end of file + Modified: pygccxml_dev/pygccxml/declarations/container_traits.py =================================================================== --- pygccxml_dev/pygccxml/declarations/container_traits.py 2008-08-26 08:55:58 UTC (rev 1407) +++ pygccxml_dev/pygccxml/declarations/container_traits.py 2008-08-26 11:23:56 UTC (rev 1408) @@ -312,21 +312,54 @@ raise TypeError( 'Type "%s" is not instantiation of std::%s' % ( type.decl_string, self.name() ) ) return cls + def is_sequence( self, type ): + #raise exception if type is not container + unused = self.class_declaration( type ) + return self.key_type_index is None + + def is_mapping( self, type ): + return not self.is_sequence( type ) + + def __find_xxx_type( self, type, xxx_index, xxx_typedef, cache_property_name ): + cls = self.class_declaration( type ) + result = getattr( cls.cache, cache_property_name ) + if not result: + if isinstance( cls, class_declaration.class_t ): + xxx_type = cls.typedef( xxx_typedef, recursive=False ).type + result = type_traits.remove_declarated( xxx_type ) + else: + xxx_type_str = templates.args( cls.name )[xxx_index] + result = type_traits.impl_details.find_value_type( cls.top_parent, xxx_type_str ) + if None is result: + raise RuntimeError( "Unable to find out %s '%s' key\\value type." + % ( self.name(), cls.decl_string ) ) + setattr( cls.cache, cache_property_name, result ) + return result + def element_type( self, type ): """returns reference to the class value\\mapped type declaration""" - cls = self.class_declaration( type ) - if isinstance( cls, class_declaration.class_t ): - value_type = cls.typedef( self.element_type_typedef, recursive=False ).type - return type_traits.remove_declarated( value_type ) - else: - value_type_str = templates.args( cls.name )[self.element_type_index] - ref = type_traits.impl_details.find_value_type( cls.top_parent, value_type_str ) - if None is ref: - raise RuntimeError( "Unable to find out %s '%s' value type." - % ( self.name(), cls.decl_string ) ) - return ref + return self.__find_xxx_type( type + , self.element_type_index + , self.element_type_typedef + , 'container_element_type') + def key_type( self, type ): + """returns reference to the class key type declaration""" + if not self.is_mapping( type ): + raise TypeError( 'Type "%s" is not "mapping" container' % str( type ) ) + return self.__find_xxx_type( type + , self.key_type_index + , self.key_type_typedef + , 'container_key_type' ) + def remove_defaults( self, type_or_string ): + """remove template defaults from a template class instantiation + + For example: + std::vector< int, std::allocator< int > > + will become + std::vector< int > + """ name = type_or_string if not isinstance( type_or_string, types.StringTypes ): name = self.class_declaration( type_or_string ).name @@ -338,30 +371,87 @@ else: return no_defaults -list_traits = container_traits_impl_t( 'list', 0, 'value_type', defaults_eraser.erase_allocator ) +create_traits = container_traits_impl_t +list_traits = create_traits( 'list' + , 0 + , 'value_type' + , defaults_eraser.erase_allocator ) -deque_traits = container_traits_impl_t( 'deque', 0, 'value_type', defaults_eraser.erase_allocator ) +deque_traits = create_traits( 'deque' + , 0 + , 'value_type' + , defaults_eraser.erase_allocator ) -queue_traits = container_traits_impl_t( 'queue', 0, 'value_type', defaults_eraser.erase_container ) +queue_traits = create_traits( 'queue' + , 0 + , 'value_type' + , defaults_eraser.erase_container ) -priority_queue_traits = container_traits_impl_t( 'priority_queue', 0, 'value_type', defaults_eraser.erase_container_compare ) +priority_queue_traits = create_traits( 'priority_queue' + , 0 + , 'value_type' + , defaults_eraser.erase_container_compare ) -vector_traits = container_traits_impl_t( 'vector', 0, 'value_type', defaults_eraser.erase_allocator ) +vector_traits = create_traits( 'vector' + , 0 + , 'value_type' + , defaults_eraser.erase_allocator ) -stack_traits = container_traits_impl_t( 'stack', 0, 'value_type', defaults_eraser.erase_container ) +stack_traits = create_traits( 'stack' + , 0 + , 'value_type' + , defaults_eraser.erase_container ) -map_traits = container_traits_impl_t( 'map', 1, 'mapped_type', defaults_eraser.erase_map_compare_allocator ) -multimap_traits = container_traits_impl_t( 'multimap', 1, 'mapped_type', defaults_eraser.erase_map_compare_allocator ) +map_traits = create_traits( 'map' + , 1 + , 'mapped_type' + , defaults_eraser.erase_map_compare_allocator + , key_type_index=0 + , key_type_typedef='key_type') + +multimap_traits = create_traits( 'multimap' + , 1 + , 'mapped_type' + , defaults_eraser.erase_map_compare_allocator + , key_type_index=0 + , key_type_typedef='key_type') -hash_map_traits = container_traits_impl_t( 'hash_map', 1, 'mapped_type', defaults_eraser.erase_hashmap_compare_allocator ) -hash_multimap_traits = container_traits_impl_t( 'hash_multimap', 1, 'mapped_type', defaults_eraser.erase_hashmap_compare_allocator ) -set_traits = container_traits_impl_t( 'set', 0, 'value_type', defaults_eraser.erase_compare_allocator) -multiset_traits = container_traits_impl_t( 'multiset', 0, 'value_type', defaults_eraser.erase_compare_allocator ) +hash_map_traits = create_traits( 'hash_map' + , 1 + , 'mapped_type' + , defaults_eraser.erase_hashmap_compare_allocator + , key_type_index=0 + , key_type_typedef='key_type') + + +hash_multimap_traits = create_traits( 'hash_multimap' + , 1 + , 'mapped_type' + , defaults_eraser.erase_hashmap_compare_allocator + , key_type_index=0 + , key_type_typedef='key_type') -hash_set_traits = container_traits_impl_t( 'hash_set', 0, 'value_type', defaults_eraser.erase_hash_allocator ) -hash_multiset_traits = container_traits_impl_t( 'hash_multiset', 0, 'value_type', defaults_eraser.erase_hash_allocator ) +set_traits = create_traits( 'set' + , 0 + , 'value_type' + , defaults_eraser.erase_compare_allocator) + +multiset_traits = create_traits( 'multiset' + , 0 + , 'value_type' + , defaults_eraser.erase_compare_allocator ) +hash_set_traits = create_traits( 'hash_set' + , 0 + , 'value_type' + , defaults_eraser.erase_hash_allocator ) + +hash_multiset_traits = create_traits( 'hash_multiset' + , 0 + , 'value_type' + , defaults_eraser.erase_hash_allocator ) + container_traits = ( list_traits , deque_traits Modified: pygccxml_dev/unittests/find_container_traits_tester.py =================================================================== --- pygccxml_dev/unittests/find_container_traits_tester.py 2008-08-26 08:55:58 UTC (rev 1407) +++ pygccxml_dev/unittests/find_container_traits_tester.py 2008-08-26 11:23:56 UTC (rev 1408) @@ -23,7 +23,7 @@ tester_t.global_ns = declarations.get_global_namespace( decls ) tester_t.global_ns.init_optimizer() - def __cmp_traits( self, typedef, expected, partial_name): + def __cmp_traits( self, typedef, expected, partial_name, key_type=None): if isinstance( typedef, str ): typedef = self.global_ns.typedef( typedef ) traits = declarations.find_container_traits( typedef ) @@ -34,7 +34,21 @@ cls = declarations.remove_declarated( typedef ) self.failUnless( cls.container_traits is expected ) self.failUnless( cls.partial_name == partial_name ) - + cls = traits.class_declaration( cls ) + + self.failUnless( traits.element_type( typedef ) ) + self.failUnless( cls.cache.container_element_type, "For some reason cache was not updated" ) + + if key_type: + self.failUnless( traits.is_mapping( typedef ) ) + real_key_type = traits.key_type( typedef ) + self.failUnless( real_key_type.decl_string == key_type + , 'Error extracting key type. Expected type "%s", got "%s"' + % ( key_type, real_key_type.decl_string ) ) + self.failUnless( cls.cache.container_key_type, "For some reason cache was not updated" ) + else: + self.failUnless( traits.is_sequence( typedef ) ) + def test_find_traits( self ): self.__cmp_traits( 'v_int', declarations.vector_traits, "vector< int >" ) self.__cmp_traits( 'l_int', declarations.list_traits, "list< int >" ) @@ -43,12 +57,12 @@ self.__cmp_traits( 'pq_int', declarations.priority_queue_traits, "priority_queue< int >") self.__cmp_traits( 's_v_int', declarations.set_traits, "set< std::vector< int > >") self.__cmp_traits( 'ms_v_int', declarations.multiset_traits, "multiset< std::vector< int > >") - self.__cmp_traits( 'm_i2d', declarations.map_traits, "map< int, double >" ) - self.__cmp_traits( 'mm_i2d', declarations.multimap_traits, "multimap< int, double >" ) + self.__cmp_traits( 'm_i2d', declarations.map_traits, "map< int, double >", 'int' ) + self.__cmp_traits( 'mm_i2d', declarations.multimap_traits, "multimap< int, double >", 'int' ) self.__cmp_traits( 'hs_v_int', declarations.hash_set_traits, "hash_set< std::vector< int > >" ) self.__cmp_traits( 'mhs_v_int', declarations.hash_multiset_traits, "hash_multiset< std::vector< int > >" ) - self.__cmp_traits( 'hm_i2d', declarations.hash_map_traits, "hash_map< int, double >" ) - self.__cmp_traits( 'hmm_i2d', declarations.hash_multimap_traits, "hash_multimap< int, double >" ) + self.__cmp_traits( 'hm_i2d', declarations.hash_map_traits, "hash_map< int, double >", 'int' ) + self.__cmp_traits( 'hmm_i2d', declarations.hash_multimap_traits, "hash_multimap< int, double >", 'int' ) def test_multimap( self ): mm = self.global_ns.classes( lambda decl: decl.name.startswith( 'multimap' ) ) Modified: pygccxml_dev/unittests/vector_traits_tester.py =================================================================== --- pygccxml_dev/unittests/vector_traits_tester.py 2008-08-26 08:55:58 UTC (rev 1407) +++ pygccxml_dev/unittests/vector_traits_tester.py 2008-08-26 11:23:56 UTC (rev 1408) @@ -29,6 +29,7 @@ traits = declarations.vector_traits self.failUnless( traits.is_my_case( container ) ) self.failUnless( declarations.is_same( value_type, traits.element_type( container ) ) ) + self.failUnless( traits.is_sequence( container ) ) def test_global_ns( self ): value_type = self.global_ns.class_( '_0_' ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |