pygccxml-commit Mailing List for C++ Python language bindings (Page 8)
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...> - 2009-02-15 20:51:25
|
Revision: 1682 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1682&view=rev Author: roman_yakovenko Date: 2009-02-15 20:51:18 +0000 (Sun, 15 Feb 2009) Log Message: ----------- move doc_extractor to module_t class Modified Paths: -------------- pyplusplus_dev/pyplusplus/code_creators/module.py pyplusplus_dev/pyplusplus/creators_factory/bpcreator.py pyplusplus_dev/pyplusplus/creators_factory/ctypes_creator.py pyplusplus_dev/pyplusplus/file_writers/writer.py pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py pyplusplus_dev/pyplusplus/module_builder/ctypes_builder.py Modified: pyplusplus_dev/pyplusplus/code_creators/module.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/module.py 2009-02-15 09:41:59 UTC (rev 1681) +++ pyplusplus_dev/pyplusplus/code_creators/module.py 2009-02-15 20:51:18 UTC (rev 1682) @@ -71,8 +71,18 @@ return set( decls ) + def update_documentation( self, doc_extractor ): + if not doc_extractor: + return + visited = set() + for cc in algorithm.make_flatten( self ): + if not isinstance( cc, declaration_based.declaration_based_t ): + continue + if id( cc.declaration ) in visited: + continue + cc.declaration.documentation = doc_extractor( cc.declaration ) + visited.add( cc.declaration ) - class bpmodule_t(module_t): """This class represents the source code for the entire extension module. @@ -116,8 +126,8 @@ """Return reference to :class:`code_creators.module_body_t` code creator""" if None is self.__body: found = algorithm.creator_finder.find_by_class_instance( what=module_body.module_body_t - , where=self.creators - , recursive=False ) + , where=self.creators + , recursive=False ) if found: self.__body = found[0] return self.__body Modified: pyplusplus_dev/pyplusplus/creators_factory/bpcreator.py =================================================================== --- pyplusplus_dev/pyplusplus/creators_factory/bpcreator.py 2009-02-15 09:41:59 UTC (rev 1681) +++ pyplusplus_dev/pyplusplus/creators_factory/bpcreator.py 2009-02-15 20:51:18 UTC (rev 1682) @@ -37,8 +37,7 @@ , call_policies_resolver_=None , types_db=None , target_configuration=None - , enable_indexing_suite=True - , doc_extractor=None ): + , enable_indexing_suite=True ): """Constructor. :param decls: Declarations that should be exposed in the final module. @@ -47,7 +46,6 @@ :param call_policies_resolver_: Callable that takes one declaration (calldef_t) as input and returns a call policy object which should be used for this declaration. :param types_db: ...todo... :param target_configuration: A target configuration object can be used to customize the generated source code to a particular compiler or a particular version of Boost.Python. - :param doc_extractor: callable, that takes as argument declaration reference and returns documentation string :param already_exposed_dbs: list of files/directories other modules, this module depends on, generated their code too :type decls: list of declaration_t :type module_name: str @@ -55,7 +53,6 @@ :type call_policies_resolver_: callable :type types_db: L:class:`types_database.types_database_t` :type target_configuration: :class:`code_creators.target_configuration_t` - :type doc_extractor: callable :type already_exposed_dbs: list of strings """ declarations.decl_visitor_t.__init__(self) @@ -91,7 +88,7 @@ self.__opaque_types_manager = opaque_types_manager.manager_t( self.__extmodule ) self.__dependencies_manager = dependencies_manager.manager_t(self.decl_logger) - prepared_decls = self._prepare_decls( decls, doc_extractor ) + prepared_decls = self._prepare_decls( decls ) self.__decls = sort_algorithms.sort( prepared_decls ) self.curr_code_creator = self.__module_body @@ -115,7 +112,7 @@ for msg in readme: self.decl_logger.warn( "%s;%s" % ( decl, msg ) ) - def _prepare_decls( self, decls, doc_extractor ): + def _prepare_decls( self, decls ): to_be_exposed = [] for decl in declarations.make_flatten( decls ): if decl.ignore: @@ -152,9 +149,6 @@ #if isinstance( decl, declarations.variable_t ): #self.__types_db.update( decl ) - if doc_extractor: - decl.documentation = doc_extractor( decl ) - self.__print_readme( decl ) return to_be_exposed Modified: pyplusplus_dev/pyplusplus/creators_factory/ctypes_creator.py =================================================================== --- pyplusplus_dev/pyplusplus/creators_factory/ctypes_creator.py 2009-02-15 09:41:59 UTC (rev 1681) +++ pyplusplus_dev/pyplusplus/creators_factory/ctypes_creator.py 2009-02-15 20:51:18 UTC (rev 1682) @@ -19,8 +19,7 @@ def __init__( self , global_ns , library_path - , exported_symbols - , doc_extractor=None ): + , exported_symbols ): declarations.decl_visitor_t.__init__(self) self.logger = _logging_.loggers.module_builder self.decl_logger = _logging_.loggers.declarations @@ -71,7 +70,7 @@ return decl in self.__exported_decls return True - #~ def __prepare_decls( self, global_ns, doc_extractor ): + #~ def __prepare_decls( self, global_ns ): #~ to_be_exposed = [] #~ for decl in declarations.make_flatten( global_ns ): #~ if decl.ignore: @@ -90,9 +89,6 @@ #~ #leave only declarations defined under namespace, but remove namespaces #~ to_be_exposed.append( decl ) - #~ if doc_extractor: - #~ decl.documentation = doc_extractor( decl ) - #~ self.__print_readme( decl ) #~ return to_be_exposed Modified: pyplusplus_dev/pyplusplus/file_writers/writer.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/writer.py 2009-02-15 09:41:59 UTC (rev 1681) +++ pyplusplus_dev/pyplusplus/file_writers/writer.py 2009-02-15 20:51:18 UTC (rev 1682) @@ -109,9 +109,9 @@ start_time = time.clock() fcontent_new = [] if os.path.splitext( fpath )[1] == '.py': - fcontent_new.append( '# This file has been generated by `Py++`.' ) + fcontent_new.append( '# This file has been generated by Py++.' ) else: - fcontent_new.append( '// This file has been generated by `Py++`.' ) + fcontent_new.append( '// This file has been generated by Py++.' ) fcontent_new.append( os.linesep * 2 ) fcontent_new.append( content ) fcontent_new.append( os.linesep ) #keep gcc happy Modified: pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py =================================================================== --- pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py 2009-02-15 09:41:59 UTC (rev 1681) +++ pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py 2009-02-15 20:51:18 UTC (rev 1682) @@ -237,10 +237,10 @@ , call_policies_resolver_ , types_db , target_configuration - , enable_indexing_suite - , doc_extractor) + , enable_indexing_suite ) self.__code_creator = creator.create() self.__code_creator.replace_included_headers(self.__parsed_files) + self.__code_creator.update_documentation( doc_extractor ) return self.__code_creator @property Modified: pyplusplus_dev/pyplusplus/module_builder/ctypes_builder.py =================================================================== --- pyplusplus_dev/pyplusplus/module_builder/ctypes_builder.py 2009-02-15 09:41:59 UTC (rev 1681) +++ pyplusplus_dev/pyplusplus/module_builder/ctypes_builder.py 2009-02-15 20:51:18 UTC (rev 1682) @@ -101,9 +101,9 @@ def build_code_creator( self, library_path, doc_extractor=None ): creator = creators_factory.ctypes_creator_t( self.global_ns , library_path - , self.__blob2decl - , doc_extractor) + , self.__blob2decl ) self.__code_creator = creator.create() + self.__code_creator.update_documentation( doc_extractor ) return self.__code_creator @property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-15 09:42:03
|
Revision: 1681 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1681&view=rev Author: roman_yakovenko Date: 2009-02-15 09:41:59 +0000 (Sun, 15 Feb 2009) Log Message: ----------- remove epydoc Modified Paths: -------------- pydsc_dev/setup.py Modified: pydsc_dev/setup.py =================================================================== --- pydsc_dev/setup.py 2009-02-15 07:43:14 UTC (rev 1680) +++ pydsc_dev/setup.py 2009-02-15 09:41:59 UTC (rev 1681) @@ -9,54 +9,11 @@ from distutils.core import setup from distutils.cmd import Command -def generate_doc(): - """Generate the epydoc reference manual. - """ - print "Generating epydoc files..." - - from epydoc.docbuilder import build_doc_index - from epydoc.docwriter.html import HTMLWriter - - docindex = build_doc_index(['pydsc']) - html_writer = HTMLWriter( docindex - , prj_name='pydsc' - , prj_url='http://www.language-binding.net' - , include_sourcecode=False #This will decrease the size of generated documentation - , show_private=False - , show_frames=False) - - html_writer.write( os.path.join('docs', 'apidocs') ) - -class doc_cmd(Command): - """This is a new distutils command 'doc' to build the epydoc manual. - """ - - description = 'build the API reference using epydoc' - user_options = [('no-doc', None, "don't run epydoc")] - boolean_options = ['no-doc'] - - def initialize_options (self): - self.no_doc = 0 - - def finalize_options (self): - pass - - def run(self): - if self.no_doc: - return - generate_doc() - - -# Generate the doc when a source distribution is created -if sys.argv[-1]=="sdist": - generate_doc() - setup( name="pydsc" - , version = "0.3" + , version = "0.4" , description="Python documentation and comments spell checker" , author="Roman Yakovenko" , author_email="rom...@gm..." , url='http://www.language-binding.net' , py_modules=[ 'pydsc' ] - , cmdclass = {"doc" : doc_cmd} ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-15 07:43:22
|
Revision: 1680 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1680&view=rev Author: roman_yakovenko Date: 2009-02-15 07:43:14 +0000 (Sun, 15 Feb 2009) Log Message: ----------- delete old website Removed Paths: ------------- website/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-15 07:10:28
|
Revision: 1679 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1679&view=rev Author: roman_yakovenko Date: 2009-02-15 07:10:23 +0000 (Sun, 15 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pygccxml_dev/docs/history/history.rest pyplusplus_dev/docs/history/history.rest sphinx/conf.py Modified: pygccxml_dev/docs/history/history.rest =================================================================== --- pygccxml_dev/docs/history/history.rest 2009-02-15 06:21:39 UTC (rev 1678) +++ pygccxml_dev/docs/history/history.rest 2009-02-15 07:10:23 UTC (rev 1679) @@ -34,6 +34,8 @@ 3. Ability to load `GCC-XML`_ configuration from ``.ini`` like file was added +4. From now on, :doc:`pygccxml <../pygccxml>` will use `Sphinx <http://sphinx.pocoo.org/>`_ + for all documentation. ----------- Version 1.0 Modified: pyplusplus_dev/docs/history/history.rest =================================================================== --- pyplusplus_dev/docs/history/history.rest 2009-02-15 06:21:39 UTC (rev 1678) +++ pyplusplus_dev/docs/history/history.rest 2009-02-15 07:10:23 UTC (rev 1679) @@ -33,6 +33,15 @@ 2. Few bugs were fixed for 64Bit platform. Many thanks to Carsten. +3. `ctypes`_ backend was introduced - :doc:`Py++ <../pyplusplus>` is able to generate + Python code, which uses `ctypes`_ package to call functions in DLLs or shared libraries. + +4. From now on, :doc:`Py++ <../pyplusplus>` will use `Sphinx <http://sphinx.pocoo.org/>`_ + for all documentation. + + +.. _`ctypes` : http://docs.python.org/library/ctypes.html + ----------- Version 1.0 ----------- @@ -185,7 +194,7 @@ of ``std::vector< int, std::allocator< int > >``, in many cases :doc:`Py++ <../pyplusplus>` will generate ``std::vector< int >``. -5. :doc:`create_with_signature <../documentation/functions/overloading>` algorithm was improved. +5. :doc:`create_with_signature <../documentation/functions/overloading>` algorithm was improved. :doc:`Py++ <../pyplusplus>` will generate correct code in one more use case. 6. Added ability to exclude declarations from being exposed, if they will cause @@ -232,7 +241,7 @@ .. line-separator -5. :doc:`input_c_buffer <../documentation/functions/transformation/input_c_buffer>` - new functions +5. :doc:`input_c_buffer <../documentation/functions/transformation/input_c_buffer>` - new functions transformation, which allows to pass a Python sequence to function, instead of pair of arguments: pointer to buffer and size. 6. Added ability to control generated "include" directives. Now you can ask :doc:`Py++ <../pyplusplus>` @@ -270,7 +279,7 @@ 3. Added new algorithm, which controls the registration order of the functions. See :doc:`registration order document <../documentation/functions/registration_order>` -4. New "Py++" defined :doc:`return_pointee_value <../documentation/functions/call_policies/return_pointee_value>` +4. New "Py++" defined :doc:`return_pointee_value <../documentation/functions/call_policies/return_pointee_value>` call policy was introduced. 5. Support for opaque types was added. Read more about this feature `here`__. Modified: sphinx/conf.py =================================================================== --- sphinx/conf.py 2009-02-15 06:21:39 UTC (rev 1678) +++ sphinx/conf.py 2009-02-15 07:10:23 UTC (rev 1679) @@ -84,7 +84,8 @@ """<?xml version="1.0" encoding="UTF-8"?> <site base_url="http://www.language-binding.net/" store_into="%(path)s/sitemap.xml.gz" verbose="1"> <directory path="%(path)s" url="http://www.language-binding.net/" default_file="index.html" /> - <filter action="drop" type="regexp" pattern="/\.[^/]*" /> + <filter action="drop" type="regexp" pattern="/\.[^/]*" /> + <filter action="drop" type="regexp" pattern="/_[^/]*" /> </site> """ % dict( path=os.path.join( doc_project_root, working_dir ) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-15 06:21:43
|
Revision: 1678 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1678&view=rev Author: roman_yakovenko Date: 2009-02-15 06:21:39 +0000 (Sun, 15 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- index.rest pygccxml_dev/pygccxml/declarations/type_traits.py pygccxml_dev/pygccxml/parser/directory_cache.py pygccxml_dev/pygccxml/parser/source_reader.py pyplusplus_dev/pyplusplus/decl_wrappers/python_traits.py sphinx/__templates_www/layout.html sphinx/conf.py Modified: index.rest =================================================================== --- index.rest 2009-02-13 20:39:34 UTC (rev 1677) +++ index.rest 2009-02-15 06:21:39 UTC (rev 1678) @@ -1,6 +1,6 @@ -=========================== -C++ Python language binding -=========================== +============================== +C\\C++ Python language binding +============================== ---------------- pygccxml package Modified: pygccxml_dev/pygccxml/declarations/type_traits.py =================================================================== --- pygccxml_dev/pygccxml/declarations/type_traits.py 2009-02-13 20:39:34 UTC (rev 1677) +++ pygccxml_dev/pygccxml/declarations/type_traits.py 2009-02-15 06:21:39 UTC (rev 1678) @@ -254,9 +254,9 @@ return nake_type.base def remove_declarated( type_ ): - """removes type-declaration class-binder :class:`declarated_t` from the type_ + """removes type-declaration class-binder :class:`declarated_t` from the `type_` - If type_ is not :class:`declarated_t`, it will be returned as is + If `type_` is not :class:`declarated_t`, it will be returned as is """ type_ = remove_alias( type_ ) if isinstance( type_, cpptypes.declarated_t ): @@ -426,7 +426,7 @@ return decls def has_public_binary_operator( type_, operator_symbol ): - """returns True, if type_ has public binary operator, otherwise False""" + """returns True, if `type_` has public binary operator, otherwise False""" not_artificial = lambda decl: not decl.is_artificial type_ = remove_alias( type_ ) type_ = remove_cv( type_ ) Modified: pygccxml_dev/pygccxml/parser/directory_cache.py =================================================================== --- pygccxml_dev/pygccxml/parser/directory_cache.py 2009-02-13 20:39:34 UTC (rev 1677) +++ pygccxml_dev/pygccxml/parser/directory_cache.py 2009-02-15 06:21:39 UTC (rev 1678) @@ -460,7 +460,7 @@ del self.__id_lut[entry.filename] def is_file_modified(self, id_, signature): - """Check if the file referred to by id_ has been modified. + """Check if the file referred to by `id_` has been modified. """ entry = self.__entries.get(id_) if entry==None: @@ -479,7 +479,7 @@ return filesig!=signature def update_id_counter(self): - """Update the id_ counter so that it doesn't grow forever. + """Update the `id_` counter so that it doesn't grow forever. """ if len(self.__entries)==0: self.__next_id = 1 Modified: pygccxml_dev/pygccxml/parser/source_reader.py =================================================================== --- pygccxml_dev/pygccxml/parser/source_reader.py 2009-02-13 20:39:34 UTC (rev 1677) +++ pygccxml_dev/pygccxml/parser/source_reader.py 2009-02-15 06:21:39 UTC (rev 1678) @@ -57,7 +57,7 @@ to two classes: 1. `scanner_t` - this class scans the "XML" file, generated by GCC-XML and - creates `pygccxml`_ declarations and types classes. After the XML file has + creates :mod:`pygccxml` declarations and types classes. After the XML file has been processed declarations and type class instances keeps references to each other using GCC-XML generated id's. Modified: pyplusplus_dev/pyplusplus/decl_wrappers/python_traits.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/python_traits.py 2009-02-13 20:39:34 UTC (rev 1677) +++ pyplusplus_dev/pyplusplus/decl_wrappers/python_traits.py 2009-02-15 06:21:39 UTC (rev 1678) @@ -8,7 +8,7 @@ from pygccxml import declarations def is_immutable( type_ ): - """returns True, if type_ represents Python immutable type""" + """returns True, if `type_` represents Python immutable type""" return declarations.is_fundamental( type_ ) \ or declarations.is_enum( type_ ) \ or declarations.is_std_string( type_ ) \ Modified: sphinx/__templates_www/layout.html =================================================================== --- sphinx/__templates_www/layout.html 2009-02-13 20:39:34 UTC (rev 1677) +++ sphinx/__templates_www/layout.html 2009-02-15 06:21:39 UTC (rev 1678) @@ -1,33 +1,37 @@ -{% extends "!layout.html" %} - -{%- block sidebarsearch %} - {%- if pagename != "search" %} - <div id="searchbox" style="display: none"> - <h3>{{ _('Quick search') }}</h3> - <form class="search" action="{{ pathto('search') }}" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="{{ _('Go') }}" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - {% include "left_ad_unit.html" %} - </div> - <script type="text/javascript">$('#searchbox').show(0);</script> - {%- endif %} -{%- endblock %} - -{%- block document %} - <div class="document"> - <div class="documentwrapper"> - {%- if not embedded %} - <div class="bodywrapper"> - {%- endif %} - <div class="body"> - {% block body %} {% endblock %} - {% include "bottom_ad_unit.html" %} - </div> - {%- if not embedded %} - </div> - {%- endif %} - </div> -{%- endblock %} +{% extends "!layout.html" %} + +{%- block rootrellink %} +<li><a href="{{ pathto(master_doc) }}">{{"Language Binding Project"}}</a>{{ reldelim1 }}</li> +{%- endblock %} + +{%- block sidebarsearch %} + {%- if pagename != "search" %} + <div id="searchbox" style="display: none"> + <h3>{{ _('Quick search') }}</h3> + <form class="search" action="{{ pathto('search') }}" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="{{ _('Go') }}" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + {% include "left_ad_unit.html" %} + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + {%- endif %} +{%- endblock %} + +{%- block document %} + <div class="document"> + <div class="documentwrapper"> + {%- if not embedded %} + <div class="bodywrapper"> + {%- endif %} + <div class="body"> + {% block body %} {% endblock %} + {% include "bottom_ad_unit.html" %} + </div> + {%- if not embedded %} + </div> + {%- endif %} + </div> +{%- endblock %} Modified: sphinx/conf.py =================================================================== --- sphinx/conf.py 2009-02-13 20:39:34 UTC (rev 1677) +++ sphinx/conf.py 2009-02-15 06:21:39 UTC (rev 1678) @@ -14,10 +14,12 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os, shutil, atexit +import sys, os, shutil, atexit, getopt -#Questions -#1. how to read/add/modify command line arguments? +opts, args = getopt.getopt( sys.argv[1:], 'ab:d:c:CD:A:NEqQP') +print 'opts: ', opts +print 'args: ', args +outdir = args[1] # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it @@ -27,11 +29,7 @@ project_root = os.path.abspath('..') doc_project_root = os.path.abspath('.') packages = ( 'pydsc', 'pygccxml', 'pyplusplus' ) -html_documentation_dir_name = 'html_documentation' -if html_documentation_dir_name not in str( sys.argv ): - raise RuntimeError( "\n\n\nThe documentation directory name should be: '%s'\n\n\n" % html_documentation_dir_name ) - has_true_links = 'linux' in sys.platform for pkg in packages: target = os.path.join( doc_project_root, pkg ) @@ -69,17 +67,19 @@ @atexit.register def copy_indexing_suite_v2_files(): source_dir = os.path.join( project_root, 'pyplusplus_dev', 'docs', 'documentation', 'indexing_suite_v2_files' ) - target_dir = os.path.join( doc_project_root, html_documentation_dir_name, 'pyplusplus', 'documentation', 'indexing_suite_v2_files' ) + target_dir = os.path.join( doc_project_root, outdir, 'pyplusplus', 'documentation', 'indexing_suite_v2_files' ) if os.path.exists(target_dir): shutil.rmtree(target_dir) shutil.copytree( source_dir, target_dir, ignore=shutil.ignore_patterns( r'.svn' ) ) @atexit.register def generate_sitemap(): + if 'www' not in outdir: + return try: import sitemap_gen - working_dir = os.path.join( doc_project_root, html_documentation_dir_name ) + working_dir = os.path.join( doc_project_root, outdir ) config = \ """<?xml version="1.0" encoding="UTF-8"?> <site base_url="http://www.language-binding.net/" store_into="%(path)s/sitemap.xml.gz" verbose="1"> @@ -112,7 +112,9 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx'] # Add any paths that contain templates here, relative to this directory. -templates_path = ['__templates_www'] +templates_path = ['__templates'] +if 'www' in outdir: + templates_path = ['__templates_www'] # The suffix of source filenames. source_suffix = '.rest' @@ -225,7 +227,7 @@ #html_split_index = False # If true, the reST sources are included in the HTML build as _sources/<name>. -html_copy_source = False +html_copy_source = True # If true, an OpenSearch description file will be output, and all pages will # contain a <link> tag referring to it. The value of this option must be the @@ -275,7 +277,7 @@ #If true, keep warnings as “system message” paragraphs in the built documents. #Regardless of this setting, warnings are always written to the standard error #stream when sphinx-build is run. -keep_warnings = True +keep_warnings = False # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'http://docs.python.org/dev': None} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-13 20:39:41
|
Revision: 1677 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1677&view=rev Author: roman_yakovenko Date: 2009-02-13 20:39:34 +0000 (Fri, 13 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- sphinx/__templates_www/layout.html sphinx/conf.py Added Paths: ----------- sphinx/__templates_www/bottom_ad_unit.html Added: sphinx/__templates_www/bottom_ad_unit.html =================================================================== --- sphinx/__templates_www/bottom_ad_unit.html (rev 0) +++ sphinx/__templates_www/bottom_ad_unit.html 2009-02-13 20:39:34 UTC (rev 1677) @@ -0,0 +1,11 @@ +<script type="text/javascript"><!-- +google_ad_client = "pub-0886572017808006"; +/* 300x250, created 2/13/09 */ +google_ad_slot = "8069153601"; +google_ad_width = 300; +google_ad_height = 250; +//--> +</script> +<script type="text/javascript" +src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> +</script> Modified: sphinx/__templates_www/layout.html =================================================================== --- sphinx/__templates_www/layout.html 2009-02-13 09:27:20 UTC (rev 1676) +++ sphinx/__templates_www/layout.html 2009-02-13 20:39:34 UTC (rev 1677) @@ -1,20 +1,33 @@ {% extends "!layout.html" %} -{% set sidebarsearch = "left_ad_unit.html" %} - {%- block sidebarsearch %} -{%- if pagename != "search" %} -<div id="searchbox" style="display: none"> -<h3>{{ _('Quick search') }}</h3> - <form class="search" action="{{ pathto('search') }}" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="{{ _('Go') }}" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> -{% include "left_ad_unit.html" %} -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> -{%- endif %} + {%- if pagename != "search" %} + <div id="searchbox" style="display: none"> + <h3>{{ _('Quick search') }}</h3> + <form class="search" action="{{ pathto('search') }}" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="{{ _('Go') }}" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + {% include "left_ad_unit.html" %} + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + {%- endif %} {%- endblock %} +{%- block document %} + <div class="document"> + <div class="documentwrapper"> + {%- if not embedded %} + <div class="bodywrapper"> + {%- endif %} + <div class="body"> + {% block body %} {% endblock %} + {% include "bottom_ad_unit.html" %} + </div> + {%- if not embedded %} + </div> + {%- endif %} + </div> +{%- endblock %} Modified: sphinx/conf.py =================================================================== --- sphinx/conf.py 2009-02-13 09:27:20 UTC (rev 1676) +++ sphinx/conf.py 2009-02-13 20:39:34 UTC (rev 1677) @@ -84,6 +84,7 @@ """<?xml version="1.0" encoding="UTF-8"?> <site base_url="http://www.language-binding.net/" store_into="%(path)s/sitemap.xml.gz" verbose="1"> <directory path="%(path)s" url="http://www.language-binding.net/" default_file="index.html" /> + <filter action="drop" type="regexp" pattern="/\.[^/]*" /> </site> """ % dict( path=os.path.join( doc_project_root, working_dir ) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-13 09:27:25
|
Revision: 1676 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1676&view=rev Author: roman_yakovenko Date: 2009-02-13 09:27:20 +0000 (Fri, 13 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- sphinx/conf.py Modified: sphinx/conf.py =================================================================== --- sphinx/conf.py 2009-02-12 22:00:53 UTC (rev 1675) +++ sphinx/conf.py 2009-02-13 09:27:20 UTC (rev 1676) @@ -74,6 +74,35 @@ shutil.rmtree(target_dir) shutil.copytree( source_dir, target_dir, ignore=shutil.ignore_patterns( r'.svn' ) ) +...@at...gister +def generate_sitemap(): + try: + import sitemap_gen + + working_dir = os.path.join( doc_project_root, html_documentation_dir_name ) + config = \ + """<?xml version="1.0" encoding="UTF-8"?> + <site base_url="http://www.language-binding.net/" store_into="%(path)s/sitemap.xml.gz" verbose="1"> + <directory path="%(path)s" url="http://www.language-binding.net/" default_file="index.html" /> + </site> + """ % dict( path=os.path.join( doc_project_root, working_dir ) ) + + f_config_path = os.path.join( working_dir, 'sitemap_config.xml' ) + f_config = file( f_config_path, 'w+' ) + f_config.write( config ) + f_config.close() + + sitemap = sitemap_gen.CreateSitemapFromFile(f_config_path, True) + if not sitemap: + print 'ERROR(SITEMAP): configuration file errors' + else: + sitemap.Generate() + print 'ERRORS(SITEMAP): %d' % sitemap_gen.output.num_errors + print 'WARNINGS(SITEMAP): %d' % sitemap_gen.output.num_warns + except Exception, error: + print "ERROR(SITEMAP): sitemap file was not generated - ", str(error) + + # General configuration # --------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-12 23:02:53
|
Revision: 1675 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1675&view=rev Author: roman_yakovenko Date: 2009-02-12 22:00:53 +0000 (Thu, 12 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- sphinx/conf.py Added Paths: ----------- sphinx/__templates_www/ sphinx/__templates_www/layout.html sphinx/__templates_www/left_ad_unit.html Added: sphinx/__templates_www/layout.html =================================================================== --- sphinx/__templates_www/layout.html (rev 0) +++ sphinx/__templates_www/layout.html 2009-02-12 22:00:53 UTC (rev 1675) @@ -0,0 +1,20 @@ +{% extends "!layout.html" %} + +{% set sidebarsearch = "left_ad_unit.html" %} + +{%- block sidebarsearch %} +{%- if pagename != "search" %} +<div id="searchbox" style="display: none"> +<h3>{{ _('Quick search') }}</h3> + <form class="search" action="{{ pathto('search') }}" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="{{ _('Go') }}" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> +{% include "left_ad_unit.html" %} +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> +{%- endif %} +{%- endblock %} + Added: sphinx/__templates_www/left_ad_unit.html =================================================================== --- sphinx/__templates_www/left_ad_unit.html (rev 0) +++ sphinx/__templates_www/left_ad_unit.html 2009-02-12 22:00:53 UTC (rev 1675) @@ -0,0 +1,11 @@ +<script type="text/javascript"><!-- +google_ad_client = "pub-0886572017808006"; +/* 200x200, created 2/12/09 */ +google_ad_slot = "3526901157"; +google_ad_width = 200; +google_ad_height = 200; +//--> +</script> +<script type="text/javascript" +src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> +</script> Modified: sphinx/conf.py =================================================================== --- sphinx/conf.py 2009-02-12 09:15:05 UTC (rev 1674) +++ sphinx/conf.py 2009-02-12 22:00:53 UTC (rev 1675) @@ -16,6 +16,9 @@ import sys, os, shutil, atexit +#Questions +#1. how to read/add/modify command line arguments? + # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. @@ -79,7 +82,7 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx'] # Add any paths that contain templates here, relative to this directory. -templates_path = ['__templates'] +templates_path = ['__templates_www'] # The suffix of source filenames. source_suffix = '.rest' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-12 09:15:11
|
Revision: 1674 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1674&view=rev Author: roman_yakovenko Date: 2009-02-12 09:15:05 +0000 (Thu, 12 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pygccxml_dev/docs/pygccxml.rest pyplusplus_dev/docs/documentation/containers.rest pyplusplus_dev/docs/documentation/index.rest pyplusplus_dev/docs/pyplusplus.rest pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py sphinx/conf.py Added Paths: ----------- pyplusplus_dev/docs/documentation/indexing_suite_v2.html.rest Property Changed: ---------------- sphinx/ Modified: pygccxml_dev/docs/pygccxml.rest =================================================================== --- pygccxml_dev/docs/pygccxml.rest 2009-02-11 20:51:29 UTC (rev 1673) +++ pygccxml_dev/docs/pygccxml.rest 2009-02-12 09:15:05 UTC (rev 1674) @@ -1,6 +1,6 @@ -====================== -pygccxml documentation -====================== +================ +pygccxml package +================ .. meta:: :description: C++ declarations parser Modified: pyplusplus_dev/docs/documentation/containers.rest =================================================================== --- pyplusplus_dev/docs/documentation/containers.rest 2009-02-11 20:51:29 UTC (rev 1673) +++ pyplusplus_dev/docs/documentation/containers.rest 2009-02-12 09:15:05 UTC (rev 1674) @@ -35,7 +35,7 @@ containers. Well, actually he did much more - he implemented new framework. This framework provides support for almost all C++ containers and also an easy way to add support for custom ones. You'd better read his `post`_ to -`Boost.Python`_ mailing list or `documentation`_ for the new indexing suite. +`Boost.Python`_ mailing list or :doc:`documentation <indexing_suite_v2.html>` for the new indexing suite. Now, I am sure you have the following question: if this suite is so good, why it is not @@ -47,7 +47,6 @@ * http://mail.python.org/pipermail/c++-sig/2006-June/010835.html -.. _`documentation` : ./indexing_suite_v2.html .. _`post` : http://mail.python.org/pipermail/c++-sig/2003-October/005802.html @@ -192,5 +191,4 @@ .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html .. _`Python`: http://www.python.org -.. _`GCC-XML`: http://www.gccxml.org Modified: pyplusplus_dev/docs/documentation/index.rest =================================================================== --- pyplusplus_dev/docs/documentation/index.rest 2009-02-11 20:51:29 UTC (rev 1673) +++ pyplusplus_dev/docs/documentation/index.rest 2009-02-12 09:15:05 UTC (rev 1674) @@ -38,9 +38,10 @@ properties.rest multi_module_development.rest containers.rest + indexing_suite_v2.html.rest doc_string.rest warnings.rest ctypes/ctypes_integration.rest how_to/how_to.rest apidocs/api.rest - + Added: pyplusplus_dev/docs/documentation/indexing_suite_v2.html.rest =================================================================== --- pyplusplus_dev/docs/documentation/indexing_suite_v2.html.rest (rev 0) +++ pyplusplus_dev/docs/documentation/indexing_suite_v2.html.rest 2009-02-12 09:15:05 UTC (rev 1674) @@ -0,0 +1,6 @@ +================= +Indexing Suite V2 +================= + +.. raw:: html + :file: indexing_suite_v2.html Modified: pyplusplus_dev/docs/pyplusplus.rest =================================================================== --- pyplusplus_dev/docs/pyplusplus.rest 2009-02-11 20:51:29 UTC (rev 1673) +++ pyplusplus_dev/docs/pyplusplus.rest 2009-02-12 09:15:05 UTC (rev 1674) @@ -1,6 +1,6 @@ -==================== -`Py++` introduction -==================== +============== +`Py++` package +============== ---------------- What is `Py++`? @@ -19,7 +19,7 @@ Code generation process ----------------------- -Code generation process, using `Py++` consists from few steps. The following +Code generation process, using `Py++` consists from few steps. The following paragraphs will tell you more about every step. @@ -89,10 +89,10 @@ It means that you don't have to change code generator source code every time. So far, so good what about second question? Well, by default `Py++` generates a -code that will satisfy almost all developers. `Py++` could be configured in many -ways to satisfy your needs. But sometimes this is still not enough. There are -use cases when you need full control over generated code. One of the biggest -problems, with code generators in general, is modifying generated code and +code that will satisfy almost all developers. `Py++` could be configured in many +ways to satisfy your needs. But sometimes this is still not enough. There are +use cases when you need full control over generated code. One of the biggest +problems, with code generators in general, is modifying generated code and preserving changes. How many code generators did you use or know, that allow you to put your code anywhere or to reorder generated code as you wish? `Py++` allows you to do that. @@ -171,7 +171,7 @@ .. toctree:: :maxdepth: 1 - + documentation/tutorials/tutorials.rest quotes.rest download.rest Modified: pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py 2009-02-11 20:51:29 UTC (rev 1673) +++ pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py 2009-02-12 09:15:05 UTC (rev 1674) @@ -296,7 +296,7 @@ class memory_managers: """implements code generation for `Py++` defined memory managers - For complete documentation and usage example see :doc:`call policies document <pyplusplus/documentation/functions/call_policies/call_policies>` + For complete documentation and usage example see "Call policies" document. """ none = 'none' delete_ = 'delete_' @@ -312,7 +312,7 @@ class convert_array_to_tuple_t( compound_policy_t ): """implements code generation for `Py++` defined "as_tuple" value policy - For complete documentation and usage example see :doc:`call policies document <pyplusplus/documentation/functions/call_policies/call_policies>` + For complete documentation and usage example see "Call policies" document. """ def __init__( self, array_size, memory_manager, make_object_call_policies=None, base=None): compound_policy_t.__init__( self, base ) @@ -369,7 +369,7 @@ class return_range_t( call_policy_t ): """implements code generation for `Py++` defined "return_range" call policies - For complete documentation and usage example see :doc:`call policies document <pyplusplus/documentation/functions/call_policies/call_policies>` + For complete documentation and usage example see "Call policies" document. """ HEADER_FILE = "__return_range.pypp.hpp" def __init__( self, get_size_class, value_type, value_policies): Property changes on: sphinx ___________________________________________________________________ Modified: svn:ignore - __build pydsc pygccxml pyplusplus index.rest + __build pydsc pygccxml pyplusplus index.rest html_documentation Modified: sphinx/conf.py =================================================================== --- sphinx/conf.py 2009-02-11 20:51:29 UTC (rev 1673) +++ sphinx/conf.py 2009-02-12 09:15:05 UTC (rev 1674) @@ -14,7 +14,7 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os, shutil +import sys, os, shutil, atexit # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it @@ -24,7 +24,11 @@ project_root = os.path.abspath('..') doc_project_root = os.path.abspath('.') packages = ( 'pydsc', 'pygccxml', 'pyplusplus' ) +html_documentation_dir_name = 'html_documentation' +if html_documentation_dir_name not in str( sys.argv ): + raise RuntimeError( "\n\n\nThe documentation directory name should be: '%s'\n\n\n" % html_documentation_dir_name ) + has_true_links = 'linux' in sys.platform for pkg in packages: target = os.path.join( doc_project_root, pkg ) @@ -59,6 +63,13 @@ except: pass #it is possible that pyenchant is not installed +...@at...gister +def copy_indexing_suite_v2_files(): + source_dir = os.path.join( project_root, 'pyplusplus_dev', 'docs', 'documentation', 'indexing_suite_v2_files' ) + target_dir = os.path.join( doc_project_root, html_documentation_dir_name, 'pyplusplus', 'documentation', 'indexing_suite_v2_files' ) + if os.path.exists(target_dir): + shutil.rmtree(target_dir) + shutil.copytree( source_dir, target_dir, ignore=shutil.ignore_patterns( r'.svn' ) ) # General configuration # --------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-11 20:51:41
|
Revision: 1673 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1673&view=rev Author: roman_yakovenko Date: 2009-02-11 20:51:29 +0000 (Wed, 11 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pyplusplus_dev/docs/documentation/apidocs/api.rest pyplusplus_dev/docs/documentation/index.rest Modified: pyplusplus_dev/docs/documentation/apidocs/api.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/api.rest 2009-02-11 19:37:44 UTC (rev 1672) +++ pyplusplus_dev/docs/documentation/apidocs/api.rest 2009-02-11 20:51:29 UTC (rev 1673) @@ -9,10 +9,10 @@ module_builder.rest decl_wrappers.rest function_transformers.rest + messages.rest file_writers.rest - messages.rest utils.rest _logging_.rest + creators_factory.rest code_creators.rest code_repository.rest - creators_factory.rest Modified: pyplusplus_dev/docs/documentation/index.rest =================================================================== --- pyplusplus_dev/docs/documentation/index.rest 2009-02-11 19:37:44 UTC (rev 1672) +++ pyplusplus_dev/docs/documentation/index.rest 2009-02-11 20:51:29 UTC (rev 1673) @@ -32,19 +32,15 @@ tutorials/tutorials.rest architecture.rest - apidocs/api.rest + functions/functions.rest + inserting_code.rest + split_module.rest + properties.rest + multi_module_development.rest containers.rest doc_string.rest - multi_module_development.rest - properties.rest - split_module.rest warnings.rest - inserting_code.rest ctypes/ctypes_integration.rest - functions/functions.rest how_to/how_to.rest - -.. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html -.. _`Python`: http://www.python.org -.. _`GCC-XML`: http://www.gccxml.org - + apidocs/api.rest + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-11 19:37:48
|
Revision: 1672 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1672&view=rev Author: roman_yakovenko Date: 2009-02-11 19:37:44 +0000 (Wed, 11 Feb 2009) Log Message: ----------- adding new test case Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/type_traits.py pygccxml_dev/unittests/type_traits_tester.py Modified: pygccxml_dev/pygccxml/declarations/type_traits.py =================================================================== --- pygccxml_dev/pygccxml/declarations/type_traits.py 2009-02-11 09:34:27 UTC (rev 1671) +++ pygccxml_dev/pygccxml/declarations/type_traits.py 2009-02-11 19:37:44 UTC (rev 1672) @@ -331,7 +331,6 @@ Precondition: self.is_my_case( type ) == True """ - assert self.is_my_case( type_ ) return self.__apply_sequence( type_ ) enum_traits = declaration_xxx_traits( enumeration.enumeration_t ) Modified: pygccxml_dev/unittests/type_traits_tester.py =================================================================== --- pygccxml_dev/unittests/type_traits_tester.py 2009-02-11 09:34:27 UTC (rev 1671) +++ pygccxml_dev/unittests/type_traits_tester.py 2009-02-11 19:37:44 UTC (rev 1672) @@ -271,9 +271,48 @@ #~ declarations.print_declarations( [declarations.class_traits.get_declaration( x )] ) +class class_traits_tester_t(unittest.TestCase): + def __init__(self, *args ): + unittest.TestCase.__init__(self, *args) + + def test(self): + code = """ + namespace A{ + struct B{ + int c; + }; + + template <class T> + struct C: public T{ + int d; + }; + + template <class T> + struct D{ + int dD; + }; + + typedef C<B> easy; + typedef D<easy> Deasy; + + inline void instantiate(){ + sizeof(easy); + } + + } + """ + + global_ns = parser.parse_string( code, autoconfig.cxx_parsers_cfg.gccxml) + global_ns = declarations.get_global_namespace( global_ns ) + easy = global_ns.typedef( 'easy' ) + c_a = declarations.class_traits.get_declaration( easy ) #this works very well + deasy = global_ns.typedef( 'Deasy' ) + d_a = declarations.class_traits.get_declaration( deasy ) + self.failUnless( isinstance( d_a, declarations.class_types ) ) + def create_suite(): suite = unittest.TestSuite() - #~ suite.addTest( unittest.makeSuite(tester_diff_t)) + suite.addTest( unittest.makeSuite(class_traits_tester_t)) suite.addTest( unittest.makeSuite(tester_t)) suite.addTest( unittest.makeSuite(missing_decls_tester_t)) return suite This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-11 09:34:35
|
Revision: 1671 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1671&view=rev Author: roman_yakovenko Date: 2009-02-11 09:34:27 +0000 (Wed, 11 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pygccxml_dev/docs/design.rest pygccxml_dev/docs/query_interface.rest pyplusplus_dev/docs/pyplusplus.rest pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py pyplusplus_dev/pyplusplus/messages/warnings_.py sphinx/conf.py Added Paths: ----------- sphinx/check_links.bat Removed Paths: ------------- developer_scripts/check_links.bat Deleted: developer_scripts/check_links.bat =================================================================== --- developer_scripts/check_links.bat 2009-02-10 21:14:30 UTC (rev 1670) +++ developer_scripts/check_links.bat 2009-02-11 09:34:27 UTC (rev 1671) @@ -1,3 +0,0 @@ -cd D:\dev\language-binding\production\www\ -E:\Python25\Scripts\linkchecker.bat --no-warnings index.html - Modified: pygccxml_dev/docs/design.rest =================================================================== --- pygccxml_dev/docs/design.rest 2009-02-10 21:14:30 UTC (rev 1670) +++ pygccxml_dev/docs/design.rest 2009-02-11 09:34:27 UTC (rev 1671) @@ -282,7 +282,7 @@ .. _`SourceForge`: http://sourceforge.net/index.php .. _`Python`: http://www.python.org .. _`GCC-XML`: http://www.gccxml.org -.. _`UML diagram` : ./declarations_uml.png -.. _`parser package UML diagram` : ./parser_uml.png +.. _`UML diagram` : declarations_uml.png +.. _`parser package UML diagram` : parser_uml.png .. _`ReleaseForge` : http://releaseforge.sourceforge.net .. _`boost::type_traits` : http://www.boost.org/libs/type_traits/index.html Modified: pygccxml_dev/docs/query_interface.rest =================================================================== --- pygccxml_dev/docs/query_interface.rest 2009-02-10 21:14:30 UTC (rev 1670) +++ pygccxml_dev/docs/query_interface.rest 2009-02-11 09:34:27 UTC (rev 1671) @@ -289,7 +289,7 @@ .. _`SourceForge`: http://sourceforge.net/index.php .. _`Python`: http://www.python.org .. _`GCC-XML`: http://www.gccxml.org -.. _`UML diagram` : ./declarations_uml.png -.. _`parser package UML diagram` : ./parser_uml.png +.. _`UML diagram` : declarations_uml.png +.. _`parser package UML diagram` : parser_uml.png .. _`ReleaseForge` : http://releaseforge.sourceforge.net .. _`boost::type_traits` : http://www.boost.org/libs/type_traits/index.html Modified: pyplusplus_dev/docs/pyplusplus.rest =================================================================== --- pyplusplus_dev/docs/pyplusplus.rest 2009-02-10 21:14:30 UTC (rev 1670) +++ pyplusplus_dev/docs/pyplusplus.rest 2009-02-11 09:34:27 UTC (rev 1671) @@ -105,7 +105,7 @@ can find UML diagram of almost all code creators: `class diagram`_. .. _`AST`: http://en.wikipedia.org/wiki/Abstract_syntax_tree -.. _`class diagram`: ./code_creators_uml.png +.. _`class diagram`: code_creators_uml.png At the end of this step you have code creators tree, which is ready to be written to disc. Modified: pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py 2009-02-10 21:14:30 UTC (rev 1670) +++ pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py 2009-02-11 09:34:27 UTC (rev 1671) @@ -296,7 +296,7 @@ class memory_managers: """implements code generation for `Py++` defined memory managers - For complete documentation and usage example see http://language-binding.net/pyplusplus/documentation/functions/call_policies.html + For complete documentation and usage example see :doc:`call policies document <pyplusplus/documentation/functions/call_policies/call_policies>` """ none = 'none' delete_ = 'delete_' @@ -312,7 +312,7 @@ class convert_array_to_tuple_t( compound_policy_t ): """implements code generation for `Py++` defined "as_tuple" value policy - For complete documentation and usage example see http://language-binding.net/pyplusplus/documentation/functions/call_policies.html + For complete documentation and usage example see :doc:`call policies document <pyplusplus/documentation/functions/call_policies/call_policies>` """ def __init__( self, array_size, memory_manager, make_object_call_policies=None, base=None): compound_policy_t.__init__( self, base ) @@ -369,7 +369,7 @@ class return_range_t( call_policy_t ): """implements code generation for `Py++` defined "return_range" call policies - For complete documentation and usage example see http://language-binding.net/pyplusplus/documentation/functions/call_policies.html + For complete documentation and usage example see :doc:`call policies document <pyplusplus/documentation/functions/call_policies/call_policies>` """ HEADER_FILE = "__return_range.pypp.hpp" def __init__( self, get_size_class, value_type, value_policies): Modified: pyplusplus_dev/pyplusplus/messages/warnings_.py =================================================================== --- pyplusplus_dev/pyplusplus/messages/warnings_.py 2009-02-10 21:14:30 UTC (rev 1670) +++ pyplusplus_dev/pyplusplus/messages/warnings_.py 2009-02-11 09:34:27 UTC (rev 1671) @@ -85,8 +85,7 @@ W1010 = execution_error( 'The function introduces registration order problem. ' - 'For more information about the problem read next document: ' - 'http://language-binding.net/pyplusplus/documentation/functions/registration_order.html ' + 'For more information about the problem read "registration order" document.' 'Problematic functions list: %s' ) W1011 = warning( "`Py++` doesn't export private not virtual functions." ) @@ -206,8 +205,7 @@ W1050 = compilation_error( 'The function returns "%s" type. You have to specify a call policies.' - 'Be sure to take a look on `Py++` defined call policies: ' - 'http://language-binding.net/pyplusplus/documentation/functions/call_policies.html#py-defined-call-policies' ) + 'Be sure to take a look on `Py++` defined call policies' ) W1051 = warning( 'The function takes as argument (name=%s, pos=%d) "%s" type. ' Copied: sphinx/check_links.bat (from rev 1670, developer_scripts/check_links.bat) =================================================================== --- sphinx/check_links.bat (rev 0) +++ sphinx/check_links.bat 2009-02-11 09:34:27 UTC (rev 1671) @@ -0,0 +1,2 @@ +E:\Python25\Scripts\linkchecker.bat --no-warnings .\__build\index.html + Modified: sphinx/conf.py =================================================================== --- sphinx/conf.py 2009-02-10 21:14:30 UTC (rev 1670) +++ sphinx/conf.py 2009-02-11 09:34:27 UTC (rev 1671) @@ -181,7 +181,7 @@ #html_split_index = False # If true, the reST sources are included in the HTML build as _sources/<name>. -#html_copy_source = True +html_copy_source = False # If true, an OpenSearch description file will be output, and all pages will # contain a <link> tag referring to it. The value of this option must be the @@ -228,6 +228,10 @@ # If false, no module index is generated. #latex_use_modindex = True +#If true, keep warnings as “system message” paragraphs in the built documents. +#Regardless of this setting, warnings are always written to the standard error +#stream when sphinx-build is run. +keep_warnings = True # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'http://docs.python.org/dev': None} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-10 21:14:36
|
Revision: 1670 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1670&view=rev Author: roman_yakovenko Date: 2009-02-10 21:14:30 +0000 (Tue, 10 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pygccxml_dev/docs/apidocs/binary_parsers.rest pygccxml_dev/docs/apidocs/declarations.rest pygccxml_dev/docs/apidocs/parser.rest pygccxml_dev/docs/apidocs/utils.rest pygccxml_dev/docs/pygccxml.rest pygccxml_dev/pygccxml/utils/__init__.py pygccxml_dev/pygccxml/utils/fs_utils.py pyplusplus_dev/docs/definition.irest pyplusplus_dev/docs/documentation/apidocs/_logging_.rest pyplusplus_dev/docs/documentation/apidocs/api.rest pyplusplus_dev/docs/documentation/apidocs/code_creators.rest pyplusplus_dev/docs/documentation/apidocs/code_repository/indexing_suite.rest pyplusplus_dev/docs/documentation/apidocs/code_repository.rest pyplusplus_dev/docs/documentation/apidocs/creators_factory.rest pyplusplus_dev/docs/documentation/apidocs/decl_wrappers.rest pyplusplus_dev/docs/documentation/apidocs/file_writers.rest pyplusplus_dev/docs/documentation/apidocs/function_transformers.rest pyplusplus_dev/docs/documentation/apidocs/messages.rest pyplusplus_dev/docs/documentation/apidocs/module_builder.rest pyplusplus_dev/docs/documentation/apidocs/utils.rest pyplusplus_dev/docs/documentation/index.rest pyplusplus_dev/docs/documentation/tutorials/module_builder/module_builder.rest pyplusplus_dev/docs/documentation/tutorials/tutorials.rest pyplusplus_dev/docs/download.rest pyplusplus_dev/docs/pyplusplus.rest pyplusplus_dev/docs/quotes.rest Modified: pygccxml_dev/docs/apidocs/binary_parsers.rest =================================================================== --- pygccxml_dev/docs/apidocs/binary_parsers.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pygccxml_dev/docs/apidocs/binary_parsers.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -2,14 +2,19 @@ pygccxml.binary_parsers API =========================== -binary_parsers package ----------------------- +-------- +Overview +-------- .. automodule:: pygccxml.binary_parsers :members: :show-inheritance: -parsers module +-------- +Modules +-------- + +parsers -------------- .. automodule:: pygccxml.binary_parsers.parsers Modified: pygccxml_dev/docs/apidocs/declarations.rest =================================================================== --- pygccxml_dev/docs/apidocs/declarations.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pygccxml_dev/docs/apidocs/declarations.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -2,183 +2,187 @@ pygccxml.declarations package ============================= -declarations package --------------------- +-------- +Overview +-------- .. automodule:: pygccxml.declarations :members: :show-inheritance: +-------- +Modules +-------- -algorithm module +algorithm ---------------- .. automodule:: pygccxml.declarations.algorithm :members: :show-inheritance: -algorithms_cache module +algorithms_cache ------------------------- .. automodule:: pygccxml.declarations.algorithms_cache :members: :show-inheritance: -calldef module +calldef ---------------- .. automodule:: pygccxml.declarations.calldef :members: :show-inheritance: -call_invocation module +call_invocation ------------------------ .. automodule:: pygccxml.declarations.call_invocation :members: :show-inheritance: -class_declaration module +class_declaration -------------------------- .. automodule:: pygccxml.declarations.class_declaration :members: :show-inheritance: -compilers module +compilers ------------------ .. automodule:: pygccxml.declarations.compilers :members: :show-inheritance: -container_traits module +container_traits ------------------------- .. automodule:: pygccxml.declarations.container_traits :members: :show-inheritance: -cpptypes module +cpptypes ----------------- .. automodule:: pygccxml.declarations.cpptypes :members: :show-inheritance: -declaration module +declaration -------------------- .. automodule:: pygccxml.declarations.declaration :members: :show-inheritance: -decl_factory module +decl_factory --------------------- .. automodule:: pygccxml.declarations.decl_factory :members: :show-inheritance: -decl_printer module +decl_printer --------------------- .. automodule:: pygccxml.declarations.decl_printer :members: :show-inheritance: -decl_visitor module +decl_visitor --------------------- .. automodule:: pygccxml.declarations.decl_visitor :members: :show-inheritance: -dependencies module +dependencies --------------------- .. automodule:: pygccxml.declarations.dependencies :members: :show-inheritance: -enumeration module +enumeration -------------------- .. automodule:: pygccxml.declarations.enumeration :members: :show-inheritance: -function_traits module +function_traits ------------------------ .. automodule:: pygccxml.declarations.function_traits :members: :show-inheritance: -matcher module +matcher ---------------- .. automodule:: pygccxml.declarations.matcher :members: :show-inheritance: -matchers module +matchers ----------------- .. automodule:: pygccxml.declarations.matchers :members: :show-inheritance: -mdecl_wrapper module +mdecl_wrapper ---------------------- .. automodule:: pygccxml.declarations.mdecl_wrapper :members: :show-inheritance: -namespace module +namespace ------------------ .. automodule:: pygccxml.declarations.namespace :members: :show-inheritance: -scopedef module +scopedef ----------------- .. automodule:: pygccxml.declarations.scopedef :members: :show-inheritance: -templates module +templates ------------------ .. automodule:: pygccxml.declarations.templates :members: :show-inheritance: -typedef module +typedef ---------------- .. automodule:: pygccxml.declarations.typedef :members: :show-inheritance: -type_traits module +type_traits -------------------- .. automodule:: pygccxml.declarations.type_traits :members: :show-inheritance: -type_visitor module +type_visitor --------------------- .. automodule:: pygccxml.declarations.type_visitor :members: :show-inheritance: -variable module +variable --------------- .. automodule:: pygccxml.declarations.variable Modified: pygccxml_dev/docs/apidocs/parser.rest =================================================================== --- pygccxml_dev/docs/apidocs/parser.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pygccxml_dev/docs/apidocs/parser.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -2,42 +2,47 @@ pygccxml.parser package ======================= -parser package --------------- +-------- +Overview +-------- .. automodule:: pygccxml.parser :members: :show-inheritance: -config module +-------- +Modules +-------- + +config --------------- .. automodule:: pygccxml.parser.config :members: :show-inheritance: -declarations_cache module +declarations_cache ---------------------------- .. automodule:: pygccxml.parser.declarations_cache :members: :show-inheritance: -directory_cache module +directory_cache ------------------------ .. automodule:: pygccxml.parser.directory_cache :members: :show-inheritance: -patcher module +patcher ---------------- .. automodule:: pygccxml.parser.patcher :members: :show-inheritance: -project_reader module +project_reader --------------------- .. automodule:: pygccxml.parser.project_reader @@ -45,7 +50,7 @@ :show-inheritance: -source_reader module +source_reader ---------------------- .. automodule:: pygccxml.parser.source_reader Modified: pygccxml_dev/docs/apidocs/utils.rest =================================================================== --- pygccxml_dev/docs/apidocs/utils.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pygccxml_dev/docs/apidocs/utils.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -2,15 +2,19 @@ pygccxml.utils package ====================== -utils package -------------- +-------- +Overview +-------- .. automodule:: pygccxml.utils :members: :show-inheritance: +-------- +Modules +-------- -fs_utils module +fs_utils --------------- .. automodule:: pygccxml.utils.fs_utils Modified: pygccxml_dev/docs/pygccxml.rest =================================================================== --- pygccxml_dev/docs/pygccxml.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pygccxml_dev/docs/pygccxml.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -114,7 +114,7 @@ Support for Python 2.4 was dropped. ------------------------------- -pygccxml documentation contents +Documentation contents ------------------------------- .. toctree:: Modified: pygccxml_dev/pygccxml/utils/__init__.py =================================================================== --- pygccxml_dev/pygccxml/utils/__init__.py 2009-02-09 21:10:08 UTC (rev 1669) +++ pygccxml_dev/pygccxml/utils/__init__.py 2009-02-10 21:14:30 UTC (rev 1670) @@ -3,9 +3,7 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -""" -defines logger classes and few convenience methods, not related to the declarations tree -""" +"""defines logger classes and few convenience methods, not related to the declarations tree""" import os import sys @@ -37,10 +35,10 @@ gccxml = cxx_parser #backward compatability pdb_reader = _create_logger_( 'pygccxml.pdb_reader' ) - """logger for MS .pdb file reader functionality """ + logger for MS .pdb file reader functionality + """ - queries_engine = _create_logger_( 'pygccxml.queries_engine' ) """logger for query engine functionality. @@ -136,13 +134,18 @@ delattr(self, name) class enum( object ): - """Usage example: - class fruits(enum): - apple = 0 - orange = 1 + """ + Usage example: + + .. code-block:: python - fruits.has_value( 1 ) - fruits.name_of( 1 ) + class fruits(enum): + apple = 0 + orange = 1 + + fruits.has_value( 1 ) + fruits.name_of( 1 ) + """ @classmethod @@ -163,7 +166,7 @@ % ( enum_numeric_value, cls.__name__ ) ) class native_compiler: - """provides information about "native compiler", which was used to build this Python executable""" + """provides information about the compiler, which was used to build the Python executable""" @staticmethod def get_version(): Modified: pygccxml_dev/pygccxml/utils/fs_utils.py =================================================================== --- pygccxml_dev/pygccxml/utils/fs_utils.py 2009-02-09 21:10:08 UTC (rev 1669) +++ pygccxml_dev/pygccxml/utils/fs_utils.py 2009-02-10 21:14:30 UTC (rev 1670) @@ -3,6 +3,8 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) +"""defines few classes, that simplifies a file system entries iteration""" + import os from types import * Modified: pyplusplus_dev/docs/definition.irest =================================================================== --- pyplusplus_dev/docs/definition.irest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/definition.irest 2009-02-10 21:14:30 UTC (rev 1670) @@ -1,4 +1,3 @@ Py++ is an object-oriented framework for creating a code generator for -`Boost.Python`_ library. - -.. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html +`Boost.Python <http://www.boost.org/libs/python/doc/index.html>`_ library and +`ctypes <http://docs.python.org/library/ctypes.html>`_ package. Modified: pyplusplus_dev/docs/documentation/apidocs/_logging_.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/_logging_.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/apidocs/_logging_.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -2,6 +2,18 @@ pyplusplus._logging_ package ============================ +-------- +Overview +-------- + +.. automodule:: pyplusplus._logging_ + :members: + :show-inheritance: + +-------- +Modules +-------- + multi_line_formatter -------------------- Modified: pyplusplus_dev/docs/documentation/apidocs/api.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/api.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/apidocs/api.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -5,12 +5,11 @@ `Py++` consists from few sub packages .. toctree:: - :maxdepth: 4 module_builder.rest decl_wrappers.rest - file_writers.rest function_transformers.rest + file_writers.rest messages.rest utils.rest _logging_.rest Modified: pyplusplus_dev/docs/documentation/apidocs/code_creators.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/code_creators.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/apidocs/code_creators.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -2,6 +2,18 @@ pyplusplus.code_creators package ================================ +-------- +Overview +-------- + +.. automodule:: pyplusplus.code_creators + :members: + :show-inheritance: + +-------- +Modules +-------- + algorithm --------- Modified: pyplusplus_dev/docs/documentation/apidocs/code_repository/indexing_suite.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/code_repository/indexing_suite.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/apidocs/code_repository/indexing_suite.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -2,6 +2,18 @@ pyplusplus.code_repository.indexing_suite package ================================================= +-------- +Overview +-------- + +.. automodule:: pyplusplus.code_repository.indexing_suite + :members: + :show-inheritance: + +-------- +Modules +-------- + deque_header ------------ Modified: pyplusplus_dev/docs/documentation/apidocs/code_repository.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/code_repository.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/apidocs/code_repository.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -2,6 +2,15 @@ pyplusplus.code_repository package ================================== +-------- +Overview +-------- + +.. automodule:: pyplusplus.code_repository + :members: + :show-inheritance: + +------------ sub-packages ------------ @@ -9,6 +18,10 @@ code_repository/indexing_suite.rest +-------- +Modules +-------- + ctypes_integration ------------------ Modified: pyplusplus_dev/docs/documentation/apidocs/creators_factory.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/creators_factory.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/apidocs/creators_factory.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -2,6 +2,18 @@ pyplusplus.creators_factory package =================================== +-------- +Overview +-------- + +.. automodule:: pyplusplus.creators_factory + :members: + :show-inheritance: + +-------- +Modules +-------- + bpcreator --------- Modified: pyplusplus_dev/docs/documentation/apidocs/decl_wrappers.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/decl_wrappers.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/apidocs/decl_wrappers.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -2,6 +2,18 @@ pyplusplus.decl_wrappers package ================================ +-------- +Overview +-------- + +.. automodule:: pyplusplus.decl_wrappers + :members: + :show-inheritance: + +-------- +Modules +-------- + algorithm --------- Modified: pyplusplus_dev/docs/documentation/apidocs/file_writers.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/file_writers.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/apidocs/file_writers.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -2,6 +2,18 @@ pyplusplus.file_writers package =============================== +-------- +Overview +-------- + +.. automodule:: pyplusplus.file_writers + :members: + :show-inheritance: + +-------- +Modules +-------- + balanced_files -------------- Modified: pyplusplus_dev/docs/documentation/apidocs/function_transformers.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/function_transformers.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/apidocs/function_transformers.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -1,9 +1,19 @@ -Pyplusplus\Function_Transformers Documentation -============================================== ======================================== pyplusplus.function_transformers package ======================================== +-------- +Overview +-------- + +.. automodule:: pyplusplus.function_transformers + :members: + :show-inheritance: + +-------- +Modules +-------- + controllers ----------- Modified: pyplusplus_dev/docs/documentation/apidocs/messages.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/messages.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/apidocs/messages.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -2,6 +2,18 @@ pyplusplus.messages package =========================== +-------- +Overview +-------- + +.. automodule:: pyplusplus.messages + :members: + :show-inheritance: + +-------- +Modules +-------- + warnings_ --------- Modified: pyplusplus_dev/docs/documentation/apidocs/module_builder.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/module_builder.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/apidocs/module_builder.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -2,6 +2,18 @@ pyplusplus.module_builder package ================================= +-------- +Overview +-------- + +.. automodule:: pyplusplus.module_builder + :members: + :show-inheritance: + +-------- +Modules +-------- + boost_python_builder -------------------- Modified: pyplusplus_dev/docs/documentation/apidocs/utils.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/utils.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/apidocs/utils.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -1,3 +1,16 @@ ======================== pyplusplus.utils package ======================== + + +-------- +Overview +-------- + +.. automodule:: pyplusplus.utils + :members: + :show-inheritance: + +-------- +Modules +-------- Modified: pyplusplus_dev/docs/documentation/index.rest =================================================================== --- pyplusplus_dev/docs/documentation/index.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/index.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -1,5 +1,5 @@ ================== -Py++ documentation +Documentation ================== ------------ Modified: pyplusplus_dev/docs/documentation/tutorials/module_builder/module_builder.rest =================================================================== --- pyplusplus_dev/docs/documentation/tutorials/module_builder/module_builder.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/tutorials/module_builder/module_builder.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -1,5 +1,5 @@ ============== -Py++ tutorials +Tutorials ============== ------------- Modified: pyplusplus_dev/docs/documentation/tutorials/tutorials.rest =================================================================== --- pyplusplus_dev/docs/documentation/tutorials/tutorials.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/documentation/tutorials/tutorials.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -1,5 +1,5 @@ ========= -tutorials +Tutorials ========= .. toctree:: Modified: pyplusplus_dev/docs/download.rest =================================================================== --- pyplusplus_dev/docs/download.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/download.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -1,6 +1,6 @@ -============= -Py++ download -============= +================== +Download & install +================== ------------------- Py++ on SourceForge Modified: pyplusplus_dev/docs/pyplusplus.rest =================================================================== --- pyplusplus_dev/docs/pyplusplus.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/pyplusplus.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -1,10 +1,10 @@ -================= -Py++ introduction -================= +==================== +`Py++` introduction +==================== -------------- -What is Py++? -------------- +---------------- +What is `Py++`? +---------------- Definition: .. include:: ./definition.irest @@ -19,15 +19,14 @@ Code generation process ----------------------- -`Boost.Python`_ library allows you to expose C++ code to `Python`_ in quick and -elegant way. Code generation process, using Py++ consists from few steps. -The following paragraphs will tell you more about every step. +Code generation process, using `Py++` consists from few steps. The following +paragraphs will tell you more about every step. *"read declarations"* --------------------- -Py++ does not reinvent the wheel. It uses `GCC C++ compiler`_ to parse C++ +`Py++` does not reinvent the wheel. It uses `GCC C++ compiler`_ to parse C++ source files. To be more precise, the tool chain looks like this: 1. source code is passed to `GCC-XML`_ @@ -37,7 +36,7 @@ 3. `GCC-XML`_ generates an XML description of a C++ program from GCC's internal representation. -4. Py++ uses :doc:`pygccxml <../../pygccxml/pygccxml>` package to read `GCC-XML`_ generated file. +4. `Py++` uses :doc:`pygccxml <../../pygccxml/pygccxml>` package to read `GCC-XML`_ generated file. The bottom line - you can be sure, that all your declarations are read correctly. @@ -56,10 +55,9 @@ a question, what code should be written in order I get access from Python to that functionality -Of course, Py++ cannot answer those question, but it provides maximum help to -implement an user requirements. +Of course, `Py++` cannot answer those question, but it provides maximum help to you. -How can Py++ help you with first question? Py++ provides very powerful and +How can `Py++` help you with first question? `Py++` provides very powerful and simple query interface. For example in one line of code you can select all free functions that have two arguments, where the first argument has type ``int &`` and the type of the second argument is any: @@ -86,20 +84,20 @@ mb = module_builder_t( ... ) mb.decls( lambda decl: 'impl' in decl.name ).exclude() -Please, note the way queries were built. You can think about those queries as +Note the way the queries were built. You can think about those queries as the rules, which will continue to work even after exported C++ code was changed. It means that you don't have to change code generator source code every time. -So far, so good what about second question? Well, by default Py++ generates a -code that will satisfy almost all developers. Py++ relevant classes could be -configured in many ways to satisfy your needs. But sometimes this is still not -enough. There are use cases when you need full control over generated code. One -of the biggest problems, with code generators in general, is modifying generated -code and preserving changes. How many code generators did you use or know, that +So far, so good what about second question? Well, by default `Py++` generates a +code that will satisfy almost all developers. `Py++` could be configured in many +ways to satisfy your needs. But sometimes this is still not enough. There are +use cases when you need full control over generated code. One of the biggest +problems, with code generators in general, is modifying generated code and +preserving changes. How many code generators did you use or know, that allow you to put your code anywhere or to reorder generated code as you wish? -Py++ allows you to do that. +`Py++` allows you to do that. -Py++ introduces new concept: code creator and code creators tree. You can think +`Py++` introduces new concept: code creator and code creators tree. You can think about code creators tree as some kind of `AST`_. The only difference is that code creators tree provides more specific functionality. For example ``include_t`` code creator is responsible to create C++ ``include`` directive code. You have full @@ -114,11 +112,11 @@ *"write code to files"* ----------------------- -During this step Py++ reads code creators tree and writes code to the -disc. The result of code generation process should not be different from the one, +During this step `Py++` reads the code creators tree and writes the code to a +disc. The code generation process result should not be different from the one, which would be achieved by human. For small project writing all code into single -file is good approach, for big ones code should be written into multiple files. -Py++ implements both strategies. +file is good approach, for big ones the code should be splitted into multiple files. +`Py++` implements both strategies. ------------- Features list @@ -168,21 +166,22 @@ `Boost Software License`_. --------------------------- -Py++ documentation contents +Documentation contents --------------------------- .. toctree:: - + :maxdepth: 1 + documentation/tutorials/tutorials.rest - download.rest - links.rest quotes.rest - comparisons/compare_to.rest + download.rest documentation/index.rest examples/examples.rest - history/history.rest + links.rest + comparisons/compare_to.rest peps/peps_index.rest troubleshooting_guide/lessons_learned.rest + history/history.rest .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html Modified: pyplusplus_dev/docs/quotes.rest =================================================================== --- pyplusplus_dev/docs/quotes.rest 2009-02-09 21:10:08 UTC (rev 1669) +++ pyplusplus_dev/docs/quotes.rest 2009-02-10 21:14:30 UTC (rev 1670) @@ -1,5 +1,5 @@ ========================= -What they say about Py++? +Users and quotes ========================= ----------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-09 21:10:13
|
Revision: 1669 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1669&view=rev Author: roman_yakovenko Date: 2009-02-09 21:10:08 +0000 (Mon, 09 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- index.rest pydsc_dev/docs/pydsc.rest pygccxml_dev/docs/apidocs/binary_parsers.rest pygccxml_dev/docs/apidocs/declarations.rest pygccxml_dev/docs/apidocs/parser.rest pygccxml_dev/docs/apidocs/utils.rest pygccxml_dev/docs/pygccxml.rest pygccxml_dev/pygccxml/binary_parsers/__init__.py pygccxml_dev/pygccxml/binary_parsers/parsers.py pygccxml_dev/pygccxml/utils/__init__.py Modified: index.rest =================================================================== --- index.rest 2009-02-09 19:09:47 UTC (rev 1668) +++ index.rest 2009-02-09 21:10:08 UTC (rev 1669) @@ -10,10 +10,8 @@ * Do you need to build code generator? * Do you need to create UML diagram? -`pygccxml`_ is the way to go! `Learn more`__. +:doc:`pygccxml <pygccxml/pygccxml>` is the way to go! :doc:`Learn more <pygccxml/pygccxml>`. -.. __: `pygccxml`_ - ------------ Py++ package ------------ @@ -21,79 +19,36 @@ "I love deadlines. I love the whooshing noise they make as they go by." -- Douglas Adams -Meet your deadlines with powerful code generator engine - `Py++`_. -`Py++`_ package and `Boost.Python`_ library provide a complete solution for -interfacing Python and C++. `Learn more`_. +Meet your deadlines with powerful code generator engine - :doc:`Py++ <pyplusplus/pyplusplus>`. -*European Space Agency*, *Ogre*, *PyOpenSG* and many others `use`__ Py++. +:doc:`Py++ <pyplusplus/pyplusplus>`, `ctypes <http://docs.python.org/library/ctypes.html>`_ +and `Boost.Python <http://www.boost.org/doc/libs/1_38_0/libs/python/doc/index.html>`_ +provide a complete solution for interfacing Python and C\\C++. +:doc:`Learn more <pyplusplus/pyplusplus>`. -.. _`Learn more` : `Py++`_ +*European Space Agency*, *Ogre*, *PyOpenSG* and many others :doc:`use <pyplusplus/quotes>` `Py++`. -.. __: ./pyplusplus/quotes.html - ---------------- -pyboost package ---------------- - -`Boost`_ provides free peer-reviewed portable C++ source libraries. `pyboost`_ -package export the following libraries to Python: - - * `Boost.Date_Time`_ - date time library designed to provide a basis for - performing efficient time calculations - * `Boost.CRC`_ - cyclic redundancy code computation objects - * `Boost.Rational`_ - rational number class - * `Boost.Random`_ - a complete system for random number generation - -Python bindings for `boost.graph`_ library is also available from -http://www.osl.iu.edu/~dgregor/bgl-python . - ------------- pydsc package ------------- -Documentation strings contain spelling errors? `Fix them in a minute`_. +Documentation strings contain spelling errors? :doc:`Fix them in a minute <pydsc/pydsc>`! -.. _`Fix them in a minute` : `pydsc`_ +------------- +Documentation +------------- ------------------ -pyeasybmp package ------------------ - -`EasyBMP`_ could be easier? Yes of course! Learn more about `EasyBMP Python bindings`_. - -.. _`EasyBMP Python bindings`: ./pyplusplus/examples/easybmp/easybmp.html - - -.. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - .. toctree:: :maxdepth: 2 - pydsc/pydsc.rest pygccxml/pygccxml.rest pyplusplus/pyplusplus.rest + pydsc/pydsc.rest +------------------ +Indices and tables +------------------ -.. _`pyboost` : ./pyplusplus/examples/boost/boost.html -.. _`boost.graph` : http://www.boost.org/libs/graph/doc/table_of_contents.html -.. _`boost.date_time` : http://boost.org/doc/html/date_time.html -.. _`boost.crc` : http://boost.org/libs/crc/index.html -.. _`boost.rational` : http://boost.org/libs/rational/index.html -.. _`boost.random` : http://boost.org/libs/random/index.html - -.. _`Boost`: http://boost.org/ -.. _`Python`: http://www.python.org -.. _`pygccxml`: ./pygccxml/pygccxml.html -.. _`Py++`: ./pyplusplus/pyplusplus.html -.. _`pydsc`: ./pydsc/pydsc.html -.. _`EasyBMP`: http://easybmp.sourceforge.net/ - -.. _`many others` : ./x.html +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` Modified: pydsc_dev/docs/pydsc.rest =================================================================== --- pydsc_dev/docs/pydsc.rest 2009-02-09 19:09:47 UTC (rev 1668) +++ pydsc_dev/docs/pydsc.rest 2009-02-09 21:10:08 UTC (rev 1669) @@ -1,14 +1,7 @@ -================== +================== pydsc introduction ================== -.. contents:: Table of contents - -.. toctree:: - :maxdepth: 1 - - API <api> - .. meta:: :description: Python documentation string spell checker :keywords: Python, docstring, documentation, spell, check @@ -69,5 +62,14 @@ python setup.py install +--- +API +--- +.. toctree:: + :maxdepth: 1 + + API <api> + + .. _`PyEnchant`: http://pyenchant.sourceforge.net/ Modified: pygccxml_dev/docs/apidocs/binary_parsers.rest =================================================================== --- pygccxml_dev/docs/apidocs/binary_parsers.rest 2009-02-09 19:09:47 UTC (rev 1668) +++ pygccxml_dev/docs/apidocs/binary_parsers.rest 2009-02-09 21:10:08 UTC (rev 1669) @@ -2,9 +2,16 @@ pygccxml.binary_parsers API =========================== -parsers -------- +binary_parsers package +---------------------- +.. automodule:: pygccxml.binary_parsers + :members: + :show-inheritance: + +parsers module +-------------- + .. automodule:: pygccxml.binary_parsers.parsers :members: :show-inheritance: Modified: pygccxml_dev/docs/apidocs/declarations.rest =================================================================== --- pygccxml_dev/docs/apidocs/declarations.rest 2009-02-09 19:09:47 UTC (rev 1668) +++ pygccxml_dev/docs/apidocs/declarations.rest 2009-02-09 21:10:08 UTC (rev 1669) @@ -2,176 +2,184 @@ pygccxml.declarations package ============================= -algorithm ---------- +declarations package +-------------------- -.. automodule:: pygccxml.declarations.algorithm +.. automodule:: pygccxml.declarations :members: :show-inheritance: -algorithms_cache + +algorithm module ---------------- +.. automodule:: pygccxml.declarations.algorithm + :members: + :show-inheritance: + +algorithms_cache module +------------------------- + .. automodule:: pygccxml.declarations.algorithms_cache :members: :show-inheritance: -calldef -------- +calldef module +---------------- .. automodule:: pygccxml.declarations.calldef :members: :show-inheritance: -call_invocation ---------------- +call_invocation module +------------------------ .. automodule:: pygccxml.declarations.call_invocation :members: :show-inheritance: -class_declaration ------------------ +class_declaration module +-------------------------- .. automodule:: pygccxml.declarations.class_declaration :members: :show-inheritance: -compilers ---------- +compilers module +------------------ .. automodule:: pygccxml.declarations.compilers :members: :show-inheritance: -container_traits ----------------- +container_traits module +------------------------- .. automodule:: pygccxml.declarations.container_traits :members: :show-inheritance: -cpptypes --------- +cpptypes module +----------------- .. automodule:: pygccxml.declarations.cpptypes :members: :show-inheritance: -declaration ------------ +declaration module +-------------------- .. automodule:: pygccxml.declarations.declaration :members: :show-inheritance: -decl_factory ------------- +decl_factory module +--------------------- .. automodule:: pygccxml.declarations.decl_factory :members: :show-inheritance: -decl_printer ------------- +decl_printer module +--------------------- .. automodule:: pygccxml.declarations.decl_printer :members: :show-inheritance: -decl_visitor ------------- +decl_visitor module +--------------------- .. automodule:: pygccxml.declarations.decl_visitor :members: :show-inheritance: -dependencies ------------- +dependencies module +--------------------- .. automodule:: pygccxml.declarations.dependencies :members: :show-inheritance: -enumeration ------------ +enumeration module +-------------------- .. automodule:: pygccxml.declarations.enumeration :members: :show-inheritance: -function_traits ---------------- +function_traits module +------------------------ .. automodule:: pygccxml.declarations.function_traits :members: :show-inheritance: -matcher -------- +matcher module +---------------- .. automodule:: pygccxml.declarations.matcher :members: :show-inheritance: -matchers --------- +matchers module +----------------- .. automodule:: pygccxml.declarations.matchers :members: :show-inheritance: -mdecl_wrapper -------------- +mdecl_wrapper module +---------------------- .. automodule:: pygccxml.declarations.mdecl_wrapper :members: :show-inheritance: -namespace ---------- +namespace module +------------------ .. automodule:: pygccxml.declarations.namespace :members: :show-inheritance: -scopedef --------- +scopedef module +----------------- .. automodule:: pygccxml.declarations.scopedef :members: :show-inheritance: -templates ---------- +templates module +------------------ .. automodule:: pygccxml.declarations.templates :members: :show-inheritance: -typedef -------- +typedef module +---------------- .. automodule:: pygccxml.declarations.typedef :members: :show-inheritance: -type_traits ------------ +type_traits module +-------------------- .. automodule:: pygccxml.declarations.type_traits :members: :show-inheritance: -type_visitor ------------- +type_visitor module +--------------------- .. automodule:: pygccxml.declarations.type_visitor :members: :show-inheritance: -variable --------- +variable module +--------------- .. automodule:: pygccxml.declarations.variable :members: Modified: pygccxml_dev/docs/apidocs/parser.rest =================================================================== --- pygccxml_dev/docs/apidocs/parser.rest 2009-02-09 19:09:47 UTC (rev 1668) +++ pygccxml_dev/docs/apidocs/parser.rest 2009-02-09 21:10:08 UTC (rev 1669) @@ -2,44 +2,51 @@ pygccxml.parser package ======================= -config ------- +parser package +-------------- +.. automodule:: pygccxml.parser + :members: + :show-inheritance: + +config module +--------------- + .. automodule:: pygccxml.parser.config :members: :show-inheritance: -declarations_cache ------------------- +declarations_cache module +---------------------------- .. automodule:: pygccxml.parser.declarations_cache :members: :show-inheritance: -directory_cache ---------------- +directory_cache module +------------------------ .. automodule:: pygccxml.parser.directory_cache :members: :show-inheritance: -patcher -------- +patcher module +---------------- .. automodule:: pygccxml.parser.patcher :members: :show-inheritance: -project_reader --------------- +project_reader module +--------------------- .. automodule:: pygccxml.parser.project_reader :members: :show-inheritance: -source_reader -------------- +source_reader module +---------------------- .. automodule:: pygccxml.parser.source_reader :members: Modified: pygccxml_dev/docs/apidocs/utils.rest =================================================================== --- pygccxml_dev/docs/apidocs/utils.rest 2009-02-09 19:09:47 UTC (rev 1668) +++ pygccxml_dev/docs/apidocs/utils.rest 2009-02-09 21:10:08 UTC (rev 1669) @@ -2,10 +2,17 @@ pygccxml.utils package ====================== +utils package +------------- -fs_utils --------- +.. automodule:: pygccxml.utils + :members: + :show-inheritance: + +fs_utils module +--------------- + .. automodule:: pygccxml.utils.fs_utils :members: :show-inheritance: Modified: pygccxml_dev/docs/pygccxml.rest =================================================================== --- pygccxml_dev/docs/pygccxml.rest 2009-02-09 19:09:47 UTC (rev 1668) +++ pygccxml_dev/docs/pygccxml.rest 2009-02-09 21:10:08 UTC (rev 1669) @@ -1,4 +1,4 @@ -====================== +====================== pygccxml documentation ====================== @@ -17,12 +17,12 @@ ------------------------ What can you do with it? ------------------------ -Using :doc:`pygccxml <pygccxml>` you can: +Using `pygccxml` you can: * parse C++ source code * create a powerful code generator - + :doc:`Py++ <../pyplusplus/pyplusplus>` is heavily based on :doc:`pygccxml <pygccxml>` + + :doc:`Py++ <../pyplusplus/pyplusplus>` is heavily based on `pygccxml` + generate `WSDL`_ file from sources + ... @@ -36,8 +36,9 @@ Query interface --------------- -:doc:`pygccxml <pygccxml>` provides simple and powerful API to query declarations tree. How many -lines is needed to write the following query? +`pygccxml` provides simple and powerful API to query declarations tree. + +How many lines is needed to write the following query? :: select all free functions from the project @@ -47,7 +48,7 @@ function has two arguments second argument type is int -Only 1 ( one ) line of code is needed: +Only single line of code is needed: .. code-block:: python @@ -61,7 +62,7 @@ Type traits ----------- -:doc:`pygccxml <pygccxml>` provides a lot of functionality to analyze C++ types and relationship +`pygccxml` provides a lot of functionality to analyze C++ types and relationship between them. For more information please refer to :doc:`design <design>` document or API documentation. Just a few names of algorithms: @@ -92,7 +93,7 @@ * parse each file separately and then join the results The difference between these approaches is the caching algorithm used in the -second case. :doc:`pygccxml <pygccxml>` supports both of them. Actually :doc:`pygccxml <pygccxml>` supports +second case. `pygccxml` supports both of them. Actually `pygccxml` supports more caching strategies, read the API documentation for more information. @@ -106,7 +107,7 @@ Test environment ---------------- -:doc:`pygccxml <pygccxml>` comes with comprehensive unit tests. They are executed on Windows XP +`pygccxml` comes with comprehensive unit tests. They are executed on Windows XP and `Ubuntu`_ Linux operating systems. In most cases Python 2.5 and 2.6 are used. All in all, `pygccxml` has more than 230 tests. @@ -119,9 +120,9 @@ .. toctree:: example/example.rest + query_interface.rest download.rest design.rest - query_interface.rest upgrade_issues.rest users.rest links.rest Modified: pygccxml_dev/pygccxml/binary_parsers/__init__.py =================================================================== --- pygccxml_dev/pygccxml/binary_parsers/__init__.py 2009-02-09 19:09:47 UTC (rev 1668) +++ pygccxml_dev/pygccxml/binary_parsers/__init__.py 2009-02-09 21:10:08 UTC (rev 1669) @@ -5,9 +5,9 @@ """ contains classes that allows to extract different information from binary files -( .pdb, .map, .dll, .bsc, .so ) and integrate it with existing declarations tree +( .map, .dll, .so ) and integrate it with existing declarations tree -The main function of this package is "merge_information" +The main function of this package is :func:`pygccxml.binary_parsers.parsers.merge_information`. """ import undname @@ -18,7 +18,8 @@ return undname.undname_creator_t().undecorate_blob( blob ) def format_decl( decl, hint=None ): - """returns string, that represents formatted declaration, according to some rules - hint valid values are: "msvc" and "nm" """ + returns string, that represents formatted declaration, according to some rules + :param hint: valid values are: "msvc" and "nm" + """ return undname.undname_creator_t().format_decl( decl, hint=hint ) Modified: pygccxml_dev/pygccxml/binary_parsers/parsers.py =================================================================== --- pygccxml_dev/pygccxml/binary_parsers/parsers.py 2009-02-09 19:09:47 UTC (rev 1668) +++ pygccxml_dev/pygccxml/binary_parsers/parsers.py 2009-02-09 21:10:08 UTC (rev 1669) @@ -9,8 +9,10 @@ Those classes extract decorated\mangled names from the files. Later the extracted symbols are used for: -* building "dynamic library" public interface -* extracting function calling convention + + * building "dynamic library" public interface + * extracting function calling convention + """ import os Modified: pygccxml_dev/pygccxml/utils/__init__.py =================================================================== --- pygccxml_dev/pygccxml/utils/__init__.py 2009-02-09 19:09:47 UTC (rev 1668) +++ pygccxml_dev/pygccxml/utils/__init__.py 2009-02-09 21:10:08 UTC (rev 1669) @@ -4,8 +4,7 @@ # http://www.boost.org/LICENSE_1_0.txt) """ -defines logger classes and few convenience methods, not related to the declarations -tree +defines logger classes and few convenience methods, not related to the declarations tree """ import os This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-09 19:10:01
|
Revision: 1668 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1668&view=rev Author: roman_yakovenko Date: 2009-02-09 19:09:47 +0000 (Mon, 09 Feb 2009) Log Message: ----------- add new test case Modified Paths: -------------- pyplusplus_dev/unittests/data/protected_to_be_exported.hpp pyplusplus_dev/unittests/protected_tester.py Modified: pyplusplus_dev/unittests/data/protected_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/protected_to_be_exported.hpp 2009-02-09 14:09:58 UTC (rev 1667) +++ pyplusplus_dev/unittests/data/protected_to_be_exported.hpp 2009-02-09 19:09:47 UTC (rev 1668) @@ -7,28 +7,44 @@ #define __protected_to_be_exported_hpp__ namespace protected_{ - -struct protected_t{ -protected: - int get_1(){ return 1; } -}; - -struct protected_s_t{ -protected: - static int get_2(){ return 2; } -}; + +struct protected_t{ +protected: + int get_1(){ return 1; } +}; + +struct protected_s_t{ +protected: + static int get_2(){ return 2; } +}; - -struct protected_v_t{ -protected: - virtual int get_i(){ return 10; } -}; +struct protected_v_t{ +protected: + virtual int get_i(){ return 10; } +}; + struct protected_v_derived_t : public protected_v_t{ }; } -#endif//__protected_to_be_exported_hpp__ +class Thing +{ +protected: + virtual ~Thing() {} +}; +class Callback +{ +public: + Callback() { } + virtual void execute(const Thing& t) { } +protected: + virtual ~Callback() {} +}; + +#endif//__protected_to_be_exported_hpp__ + + Modified: pyplusplus_dev/unittests/protected_tester.py =================================================================== --- pyplusplus_dev/unittests/protected_tester.py 2009-02-09 14:09:58 UTC (rev 1667) +++ pyplusplus_dev/unittests/protected_tester.py 2009-02-09 19:09:47 UTC (rev 1668) @@ -8,6 +8,7 @@ import unittest import fundamental_tester_base from pygccxml import declarations +from pyplusplus import function_transformers as ft class tester_t(fundamental_tester_base.fundamental_tester_base_t): EXTENSION_NAME = 'protected' @@ -19,8 +20,16 @@ , *args ) def customize(self, mb ): + def tt( type_ ): + type_ = declarations.remove_reference( type_ ) + type_ = declarations.remove_const( type_ ) + return declarations.reference_t( type_ ) mb.classes().always_expose_using_scope = True mb.calldefs().create_with_signature = True + mb.class_( 'Callback' ).add_wrapper_code( '//hhhh' ) + execute = mb.class_( 'Callback' ).mem_fun( 'execute' ) + execute.add_transformation( ft.modify_type(0, tt ) ) + #execute.exclude() def create_protected_s_derived_no_override( self, module ): class derived(module.protected_v_t): @@ -71,4 +80,4 @@ unittest.TextTestRunner(verbosity=2).run( create_suite() ) if __name__ == "__main__": - run_suite() \ No newline at end of file + run_suite() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-09 14:10:01
|
Revision: 1667 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1667&view=rev Author: roman_yakovenko Date: 2009-02-09 14:09:58 +0000 (Mon, 09 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pygccxml_dev/pygccxml/parser/directory_cache.py pyplusplus_dev/README.txt pyplusplus_dev/docs/documentation/apidocs/messages.rest pyplusplus_dev/docs/documentation/index.rest pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py pyplusplus_dev/pyplusplus/decl_wrappers/algorithm.py pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py pyplusplus_dev/pyplusplus/function_transformers/transformers.py pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py Modified: pygccxml_dev/pygccxml/parser/directory_cache.py =================================================================== --- pygccxml_dev/pygccxml/parser/directory_cache.py 2009-02-09 11:29:59 UTC (rev 1666) +++ pygccxml_dev/pygccxml/parser/directory_cache.py 2009-02-09 14:09:58 UTC (rev 1667) @@ -112,9 +112,9 @@ :param source_file: a C++ source file name. :type source_file: str :param configuration: configuration object. - :type configuration: :class:config_t + :type configuration: :class:`config_t` :param declarations: declarations contained in the `source_file` - :type declarations: picklable object + :type declarations: pickable object :param included_files: included files :type included_files: list of str """ @@ -260,7 +260,6 @@ :param filename: Output file name :type filename: str :param data: A Python object that will be pickled - :type data: pickable object """ if self.__compression: f = gzip.GzipFile(filename, "wb") Modified: pyplusplus_dev/README.txt =================================================================== --- pyplusplus_dev/README.txt 2009-02-09 11:29:59 UTC (rev 1666) +++ pyplusplus_dev/README.txt 2009-02-09 14:09:58 UTC (rev 1667) @@ -41,8 +41,7 @@ python setup.py doc -In order for this to work you need epydoc (http://epydoc.sourceforge.net) -and pygccxml. +In order for this to work you need Sphinx and pygccxml. -------------------------------------------------------------------------- Modified: pyplusplus_dev/docs/documentation/apidocs/messages.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/messages.rest 2009-02-09 11:29:59 UTC (rev 1666) +++ pyplusplus_dev/docs/documentation/apidocs/messages.rest 2009-02-09 14:09:58 UTC (rev 1667) @@ -1,19 +1,10 @@ -Pyplusplus\Messages Documentation -================================= +=========================== +pyplusplus.messages package +=========================== -This page contains the Pyplusplus\Messages Package documentation. +warnings_ +--------- -The :mod:`messages.warnings_` Modules -------------------------------------- - -.. automodule:: messages.warnings_ +.. automodule:: pyplusplus.messages.warnings_ :members: :show-inheritance: - -The :mod:`pyplusplus\messages` Package --------------------------------------- - -.. automodule:: pyplusplus\messages - :members: - :show-inheritance: - Modified: pyplusplus_dev/docs/documentation/index.rest =================================================================== --- pyplusplus_dev/docs/documentation/index.rest 2009-02-09 11:29:59 UTC (rev 1666) +++ pyplusplus_dev/docs/documentation/index.rest 2009-02-09 14:09:58 UTC (rev 1667) @@ -12,7 +12,7 @@ How can you help? * Lets face it: today it is not possible to use :doc:`Py++ <../pyplusplus>` without eventually - looking into source code. :doc:`Py++ <../pyplusplus>` uses `epydoc`_ to generate documentation + looking into source code. :doc:`Py++ <../pyplusplus>` uses Sphinx to generate documentation from source files. So, if you found some undocumented piece of code and you understand what it does, please write documentation string. @@ -44,7 +44,6 @@ functions/functions.rest how_to/how_to.rest -.. _`epydoc` : http://epydoc.sourceforge.net/ .. _`Boost.Python`: http://www.boost.org/libs/python/doc/index.html .. _`Python`: http://www.python.org .. _`GCC-XML`: http://www.gccxml.org Modified: pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py 2009-02-09 11:29:59 UTC (rev 1666) +++ pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py 2009-02-09 14:09:58 UTC (rev 1667) @@ -12,11 +12,14 @@ templates = declarations.templates class held_type_t(object): - """ Helper class that can hold name of `smart_ptr` type and create - identifier for held type from that given a creator. """ + Helper class that can hold smart pointer name and create identifier for the + held type from that given a creator. + """ def __init__( self, smart_ptr ): - """ smart_ptr: string of ptr type. Ex: `boost::shared_ptr`""" + """ + :param smart_ptr: smart pointer type as string + """ object.__init__( self ) self._smart_ptr = smart_ptr Modified: pyplusplus_dev/pyplusplus/decl_wrappers/algorithm.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/algorithm.py 2009-02-09 11:29:59 UTC (rev 1666) +++ pyplusplus_dev/pyplusplus/decl_wrappers/algorithm.py 2009-02-09 14:09:58 UTC (rev 1667) @@ -9,13 +9,14 @@ from pygccxml import declarations def creators_affect_on_me( me ): - """Find all relevant code creators, which influence on code generated by "me". + """ + find all relevant code creators, which influence on code generated by "me". - C++ allows to define aliases to namespaces. `Py++` allows user to define aliases - to the namespace and will take this aliases into account when it generates - the code. + C++ allows to define aliases to namespaces. `Py++` allows user to define + aliases to the namespace and will take this aliases into account when it + generates the code. - Example: + Example: :: [a b c d e f g] | @@ -49,12 +50,13 @@ __RE_VALID_IDENTIFIER = re.compile( r"[_a-z]\w*", re.I | re.L | re.U ) def create_valid_name(name): - """Create valid name\\Python identifier from a string + """ + creates Python identifier from a string - As input this functions takes valid C++ name\identifier and replaces all invalid - characters. + As input this functions takes valid C++ name\\identifier and replaces all + illegal characters. - Invalid characters are introduced by a template instantiation. + Illegal characters are introduced by a template instantiation. """ global __RE_VALID_IDENTIFIER match_found = __RE_VALID_IDENTIFIER.match(name) Modified: pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py 2009-02-09 11:29:59 UTC (rev 1666) +++ pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py 2009-02-09 14:09:58 UTC (rev 1667) @@ -65,18 +65,21 @@ , doc=__call_policies_doc__ ) __use_make_functions_doc__ = \ - """Generate code using make_getter and make_setter functions + """ + Generate code using `make_getter` and `make_setter` functions - Basically you don't need to use this, untill you have one of the next use-cases: - * member variable is smart pointer - in this case Boost.Python has small problem - to expose it right. Using the functions is a work around to the problem. - * member variable defined custom r-value converter - may be you don't know - but the conversion is applied only on functions arguments. So you need to - use make_getter/make_setter in order to allow user to enjoy from the - conversion. + Basically you don't need to use this, untill you have one of the following + use-cases: - Setting "apply_smart_ptr_wa" and/or "use_make_functions" to "True" will tell - `Py++` to generate such code. + * member variable is smart pointer - in this case Boost.Python has small + problem to expose it right. Using get/set functions is a work-around. + + * member variable defined custom r-value converter - may be you don't know + but the conversion is applied only on functions arguments. So you need to + use make_getter/make_setter functions, allow users to enjoy from the conversion. + + Setting :attr:`apply_smart_ptr_wa` and/or :attr:`use_make_functions` to "True" + will tell `Py++` to generate such code. """ def get_apply_smart_ptr_wa( self ): Modified: pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py 2009-02-09 11:29:59 UTC (rev 1666) +++ pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py 2009-02-09 14:09:58 UTC (rev 1667) @@ -3,9 +3,10 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -"""defines a class that writes :class:`code_creators.bpmodule_t` to multiple files, the class -also splits huge C++ classes to few source files """ +defines a class that writes :class:`code_creators.bpmodule_t` to multiple files, +the class also splits huge C++ classes to few source files. +""" import os import writer @@ -15,18 +16,21 @@ from pyplusplus import code_creators from pyplusplus import utils as pypp_utils -#TODO: to add namespace_alias_t classes class class_multiple_files_t(multiple_files.multiple_files_t): """ This class will split code, generated for huge classes, to few files. - Next strategy will be used: - 1. New directory with class alias name will be created. - 2. pyplusplus will generate - wrapper header - header that will contain code generated for class wrappers - classes h/cpp - will contain registration code for internal classes - `memfun` h/cpp - will contain registration code for member functions + The following strategy will be used: - alias + _main h/cpp this class will contain main registration function. + * New directory, named after a class alias, will be created. + + * `Py++` will generate + + * wrapper header - header that will contain code generated for class wrappers + * classes h/cpp - will contain registration code for internal classes + * `memfun` h/cpp - will contain registration code for member functions + + The main class registration function will be placed in "%(class alias)s_main" + header and source files. """ def __init__( self Modified: pyplusplus_dev/pyplusplus/function_transformers/transformers.py =================================================================== --- pyplusplus_dev/pyplusplus/function_transformers/transformers.py 2009-02-09 11:29:59 UTC (rev 1666) +++ pyplusplus_dev/pyplusplus/function_transformers/transformers.py 2009-02-09 14:09:58 UTC (rev 1667) @@ -428,9 +428,10 @@ class input_c_buffer_t(transformer.transformer_t): - """handles an input of C buffer: + """ + handles an input of C buffer: - void write( byte *buffer, int size ) -> void write( python sequence ) + void write( byte \\*buffer, int size ) -> void write( python sequence ) """ def __init__(self, function, buffer_arg_ref, size_arg_ref): Modified: pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py =================================================================== --- pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py 2009-02-09 11:29:59 UTC (rev 1666) +++ pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py 2009-02-09 14:09:58 UTC (rev 1667) @@ -108,17 +108,18 @@ def register_module_dependency( self, other_module_generated_code_dir ): - """``already_exposed`` solution is pretty good when you mix hand-written + """ + `already_exposed` solution is pretty good when you mix hand-written modules with `Py++` generated. It doesn't work/scale for "true" multi-module development. This is exactly the reason why `Py++` offers "semi automatic" solution. - For every exposed module, `Py++` generates "exposed_decl.pypp.txt" file. + For every exposed module, `Py++` generates `exposed_decl.pypp.txt` file. This file contains the list of all parsed declarations and whether they were included or excluded. Later, when you work on another module, you can tell `Py++` that the current module depends on the previously - generated one. `Py++` will load "exposed_decl.pypp.txt" file and - update the declarations. + generated one. `Py++` will load `exposed_decl.pypp.txt` file and update + the declarations. """ db = utils.exposed_decls_db_t() @@ -269,14 +270,23 @@ self.__registrations_code_head.append( code ) def add_constants( self, **keywds ): - """adds code that exposes some constants to Python. + """ + adds code that exposes some constants to Python. For example: - mb.add_constants( version='"1.2.3"' ) - or - mb.add_constants( **{ version:'"1.2.3"' } ) - will generate next code: - boost::python::scope().attr("version") = "1.2.3"; + .. code-block:: python + + mb.add_constants( version='"1.2.3"' ) + # or + constants = dict( version:'"1.2.3"' ) + mb.add_constants( \\*\\*constants ) + + will generate the following code: + + .. code-block:: c++ + + boost::python::scope().attr("version") = "1.2.3"; + """ tmpl = 'boost::python::scope().attr("%(name)s") = %(value)s;' for name, value in keywds.items(): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-09 12:22:16
|
Revision: 1666 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1666&view=rev Author: roman_yakovenko Date: 2009-02-09 11:29:59 +0000 (Mon, 09 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pygccxml_dev/pygccxml/parser/directory_cache.py pyplusplus_dev/pyplusplus/code_creators/ctypes_module.py Modified: pygccxml_dev/pygccxml/parser/directory_cache.py =================================================================== --- pygccxml_dev/pygccxml/parser/directory_cache.py 2009-02-09 11:16:07 UTC (rev 1665) +++ pygccxml_dev/pygccxml/parser/directory_cache.py 2009-02-09 11:29:59 UTC (rev 1666) @@ -6,11 +6,13 @@ # The initial version of the directory_cache_t class was written # by Matthias Baas (ba...@ir...). -"""Directory cache implementation. +""" +directory cache implementation. This module contains the implementation of a cache that uses individual -files stored in a dedicated cache directory to store the cached contents. -The cache class is :class:`parser.directory_cache_t` which can be passed as the `cache` +files, stored in a dedicated cache directory, to store the cached contents. + +The :class:`parser.directory_cache_t` class instance could be passed as the `cache` argument of the :func:`parser.parse` function. """ @@ -19,9 +21,10 @@ import declarations_cache class index_entry_t: - """Entry of the index table in the directory cache index. + """ + Entry of the index table in the directory cache index. - Each cached header file (i.e. each *.cache file) has a corresponding + Each cached header file (i.e. each .cache file) has a corresponding index_entry_t object. This object is used to determine whether the cache file with the declarations is still valid or not. @@ -48,9 +51,9 @@ The cache stores one index file called `index.dat` which is always read by the cache when the cache object is created. Each header file - will have its corresponding *.cache file that stores the declarations + will have its corresponding .cache file that stores the declarations found in the header file. The index file is used to determine whether - a *.cache file is still valid or not (by checking if one of the dependent + a .cache file is still valid or not (by checking if one of the dependent files (i.e. the header file itself and all included files) have been modified since the last run). """ Modified: pyplusplus_dev/pyplusplus/code_creators/ctypes_module.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/ctypes_module.py 2009-02-09 11:16:07 UTC (rev 1665) +++ pyplusplus_dev/pyplusplus/code_creators/ctypes_module.py 2009-02-09 11:29:59 UTC (rev 1666) @@ -5,7 +5,6 @@ import os import module -import import_ import library_reference from pygccxml import utils This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-09 11:16:11
|
Revision: 1665 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1665&view=rev Author: roman_yakovenko Date: 2009-02-09 11:16:07 +0000 (Mon, 09 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/templates.py pygccxml_dev/pygccxml/declarations/type_traits.py sphinx/conf.py Modified: pygccxml_dev/pygccxml/declarations/templates.py =================================================================== --- pygccxml_dev/pygccxml/declarations/templates.py 2009-02-09 09:48:27 UTC (rev 1664) +++ pygccxml_dev/pygccxml/declarations/templates.py 2009-02-09 11:16:07 UTC (rev 1665) @@ -6,13 +6,14 @@ """ template instantiation parser -This module implements all functionality necessary to parse C++ template -instantiations.In other words this module is able to extract next information from -the string like this `std::vector<int>`. - - name ( `std::vector` ) - - list of arguments ( `int` ) +This module provides functionality necessary to -This module also defines few convenience function like :func:split and :func:join. +* :func:`parse <pygccxml.declarations.templates.parse>` +* :func:`split <pygccxml.declarations.templates.split>` +* :func:`join <pygccxml.declarations.templates.join>` +* :func:`normalize <pygccxml.declarations.templates.normalize>` + +C++ template instantiations """ import pattern_parser Modified: pygccxml_dev/pygccxml/declarations/type_traits.py =================================================================== --- pygccxml_dev/pygccxml/declarations/type_traits.py 2009-02-09 09:48:27 UTC (rev 1664) +++ pygccxml_dev/pygccxml/declarations/type_traits.py 2009-02-09 11:16:07 UTC (rev 1665) @@ -4,15 +4,17 @@ # http://www.boost.org/LICENSE_1_0.txt) """ -defines few algorithms, that deals with different properties of C++ types +defines few algorithms, that deals with different C++ type properties -Do you aware of boost::type_traits library? pygccxml has functionality similar to -it. Using functions defined in this module you can - - find out some properties of the type - - modify type +Do you aware of `boost::type_traits <http://www.boost.org/doc/libs/1_37_0/libs/type_traits/doc/html/boost_typetraits/intro.html>`_ +library? pygccxml implements the same functionality. -Those functions are very valuable for code generation. Almost all functions -within this module works on :class:`type_t` class hierarchy and\\or :class:class_t. +This module contains a set of very specific traits functions\\classes, each of +which encapsulate a single trait from the C++ type system. For example: +* is a type a pointer or a reference type ? +* does a type have a trivial constructor ? +* does a type have a const-qualifier ? + """ import os @@ -891,7 +893,7 @@ def is_defined_in_xxx( xxx, cls ): """ small helper function, that checks whether the class `cls` is defined under `::xxx` namespace - """ + """ if not cls.parent: return False Modified: sphinx/conf.py =================================================================== --- sphinx/conf.py 2009-02-09 09:48:27 UTC (rev 1664) +++ sphinx/conf.py 2009-02-09 11:16:07 UTC (rev 1665) @@ -48,13 +48,16 @@ else: shutil.copy( os.path.join( project_root, 'index.rest' ), doc_project_root ) -import pydsc -#report errors related to the project only -pydsc.include_paths( project_root ) -pydsc.ignore_dictionary( 'ignore_dictionary.txt' ) -pydsc.set_text_preprocessor( pydsc.sphinx_preprocessor ) -import pygccxml -import pyplusplus +try: + import pydsc + #report errors related to the project only + pydsc.include_paths( project_root ) + pydsc.ignore_dictionary( 'ignore_dictionary.txt' ) + pydsc.set_text_preprocessor( pydsc.sphinx_preprocessor ) + import pygccxml + import pyplusplus +except: + pass #it is possible that pyenchant is not installed # General configuration This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-09 09:48:31
|
Revision: 1664 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1664&view=rev Author: roman_yakovenko Date: 2009-02-09 09:48:27 +0000 (Mon, 09 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pydsc_dev/pydsc.py pygccxml_dev/pygccxml/__init__.py pygccxml_dev/pygccxml/declarations/algorithm.py pygccxml_dev/pygccxml/declarations/cpptypes.py pygccxml_dev/pygccxml/declarations/declaration.py pygccxml_dev/pygccxml/declarations/matchers.py pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py pygccxml_dev/pygccxml/declarations/scopedef.py pygccxml_dev/pygccxml/declarations/templates.py pygccxml_dev/pygccxml/declarations/type_traits.py pygccxml_dev/pygccxml/parser/__init__.py pygccxml_dev/pygccxml/parser/directory_cache.py pygccxml_dev/pygccxml/parser/project_reader.py pygccxml_dev/pygccxml/parser/source_reader.py pyplusplus_dev/pyplusplus/__init__.py pyplusplus_dev/pyplusplus/_logging_/__init__.py pyplusplus_dev/pyplusplus/code_creators/__init__.py pyplusplus_dev/pyplusplus/code_creators/code_creator.py pyplusplus_dev/pyplusplus/code_creators/compound.py pyplusplus_dev/pyplusplus/code_creators/declaration_based.py pyplusplus_dev/pyplusplus/code_creators/module.py pyplusplus_dev/pyplusplus/code_repository/__init__.py pyplusplus_dev/pyplusplus/creators_factory/bpcreator.py pyplusplus_dev/pyplusplus/decl_wrappers/__init__.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/scopedef_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/user_text.py pyplusplus_dev/pyplusplus/file_writers/single_file.py pyplusplus_dev/pyplusplus/file_writers/writer.py pyplusplus_dev/pyplusplus/function_transformers/controllers.py pyplusplus_dev/pyplusplus/function_transformers/function_transformation.py pyplusplus_dev/pyplusplus/function_transformers/transformer.py pyplusplus_dev/pyplusplus/module_builder/__init__.py pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py pyplusplus_dev/pyplusplus/module_builder/ctypes_builder.py pyplusplus_dev/pyplusplus/module_builder/module_builder.py Modified: pydsc_dev/pydsc.py =================================================================== --- pydsc_dev/pydsc.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pydsc_dev/pydsc.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -96,9 +96,6 @@ :param writer: reference to instance of class that has write method. By default sys.stdout will be used. - :param filter_type: provides interpretation for content of filter parameter - :type filter_type: L{FILTER_TYPE} - :param ignore_identifiers: often comments/documentation strings contains class\\method\\function names. Those names, usually introduce spell error. If ignore_identifiers Modified: pygccxml_dev/pygccxml/__init__.py =================================================================== --- pygccxml_dev/pygccxml/__init__.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pygccxml_dev/pygccxml/__init__.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -7,7 +7,7 @@ This package provides functionality to extract and inspect declarations from C/C++ header files. This is accomplished -by invoking the external tool U{gccxml<http://www.gccxml.org/>} +by invoking the external tool `gccxml <http://www.gccxml.org/>`_ which parses a header file and dumps the declarations as a XML file. This XML file is then read by pygccxml and the contents are made available as appropriate Python objects. Modified: pygccxml_dev/pygccxml/declarations/algorithm.py =================================================================== --- pygccxml_dev/pygccxml/declarations/algorithm.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pygccxml_dev/pygccxml/declarations/algorithm.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -227,7 +227,11 @@ return answer def __call__(self, inst): - """C{return self.does_match_exist(inst)}""" + """ + .. code-block:: python + + return self.does_match_exist(inst) + """ return self.does_match_exist(inst) def find_all_declarations( declarations Modified: pygccxml_dev/pygccxml/declarations/cpptypes.py =================================================================== --- pygccxml_dev/pygccxml/declarations/cpptypes.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pygccxml_dev/pygccxml/declarations/cpptypes.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -354,7 +354,7 @@ ## Compaund types: class compound_t( type_t ): - """class that allows to represent compound types like C{const int*}""" + """class that allows to represent compound types like `const int*`""" def __init__( self, base ): type_t.__init__( self ) self._base = base @@ -368,7 +368,7 @@ , doc="reference to internal/base class") class volatile_t( compound_t ): - """represents C{volatile whatever} type""" + """represents `volatile whatever` type""" def __init__( self, base ): compound_t.__init__( self, base) @@ -379,7 +379,7 @@ return volatile_t( self.base.clone() ) class restrict_t( compound_t ): - """represents C{restrict whatever} type""" + """represents `restrict whatever` type""" #The restrict keyword can be considered an extension to the strict aliasing #rule. It allows the programmer to declare that pointers which share the same @@ -400,7 +400,7 @@ return restrict_t( self.base.clone() ) class const_t( compound_t ): - """represents C{whatever const} type""" + """represents `whatever const` type""" def __init__( self, base ): compound_t.__init__( self, base ) @@ -411,7 +411,7 @@ return const_t( self.base.clone() ) class pointer_t( compound_t ): - """represents C{whatever*} type""" + """represents `whatever*` type""" def __init__( self, base ): compound_t.__init__( self, base ) @@ -422,7 +422,7 @@ return pointer_t( self.base.clone() ) class reference_t( compound_t ): - """represents C{whatever&} type""" + """represents `whatever&` type""" def __init__( self, base ): compound_t.__init__( self, base) Modified: pygccxml_dev/pygccxml/declarations/declaration.py =================================================================== --- pygccxml_dev/pygccxml/declarations/declaration.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pygccxml_dev/pygccxml/declarations/declaration.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -128,9 +128,11 @@ def __lt__(self, other): """ - C{if not isinstance( other, self.__class__ ):} - C{ return self.__class__.__name__ < other.__class__.__name__} - C{return self._get__cmp__data() < other._get__cmp__data()} + .. code-block:: python + + if not isinstance( other, self.__class__ ): + return self.__class__.__name__ < other.__class__.__name__ + return self._get__cmp__data() < other._get__cmp__data() """ if not isinstance( other, self.__class__ ): return self.__class__.__name__ < other.__class__.__name__ Modified: pygccxml_dev/pygccxml/declarations/matchers.py =================================================================== --- pygccxml_dev/pygccxml/declarations/matchers.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pygccxml_dev/pygccxml/declarations/matchers.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -94,12 +94,14 @@ class not_matcher_t(matcher_base_t): - """Return the inverse result of matcher, using "~" + """ + return the inverse result of a matcher - For example: find all private and protected declarations + For example: find all public and protected declarations - C{ matcher = ~access_type_matcher_t( 'private' ) } + .. code-block:: python + matcher = ~access_type_matcher_t( 'private' ) """ def __init__(self, matcher): matcher_base_t.__init__(self) @@ -343,7 +345,6 @@ reference to integer and second any :type arg_types: list - """ if None is decl_type: decl_type = calldef.calldef_t Modified: pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py =================================================================== --- pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -17,7 +17,7 @@ def __init__( self, name, decls ): """creates call_redirector_t instance. - :param name: name of method, to be called on every object in C{decls} list + :param name: name of method, to be called on every object in the `decls` list :param decls: list of objects """ object.__init__( self ) @@ -25,7 +25,7 @@ self.decls = decls def __call__( self, *arguments, **keywords ): - """calls method C{self.name} on every object within C{self.decls} list""" + """calls method :attr:`call_redirector_t.name` on every object within the :attr:`call_redirector_t.decls` list""" for d in self.decls: callable_ = getattr(d, self.name) callable_( *arguments, **keywords ) Modified: pygccxml_dev/pygccxml/declarations/scopedef.py =================================================================== --- pygccxml_dev/pygccxml/declarations/scopedef.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pygccxml_dev/pygccxml/declarations/scopedef.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -18,7 +18,7 @@ Base class for :class:`namespace_t` and :class:`class_t` classes. This is the base class for all declaration classes that may have - children nodes. The children can be accessed via the C{declarations} + children nodes. The children can be accessed via the :attr:`scopedef_t.declarations` property. Also this class provides "get/select/find" interface. Using this class you @@ -84,7 +84,7 @@ def _get_logger( self ): return utils.loggers.queries_engine - _logger = property( _get_logger, doc="reference to C{queries_engine} logger" ) + _logger = property( _get_logger, doc="reference to :attr:`pygccxml.utils.loggers.queries_engine` logger" ) def _get__cmp__scope_items(self): """implementation details""" Modified: pygccxml_dev/pygccxml/declarations/templates.py =================================================================== --- pygccxml_dev/pygccxml/declarations/templates.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pygccxml_dev/pygccxml/declarations/templates.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -8,9 +8,9 @@ This module implements all functionality necessary to parse C++ template instantiations.In other words this module is able to extract next information from -the string like this C{ std::vector<int> }. - - name ( std::vector ) - - list of arguments ( int ) +the string like this `std::vector<int>`. + - name ( `std::vector` ) + - list of arguments ( `int` ) This module also defines few convenience function like :func:split and :func:join. """ Modified: pygccxml_dev/pygccxml/declarations/type_traits.py =================================================================== --- pygccxml_dev/pygccxml/declarations/type_traits.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pygccxml_dev/pygccxml/declarations/type_traits.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -84,7 +84,7 @@ def base_type(type): """returns base type. - For C{const int} will return C{int} + For `const int` will return `int` """ types = decompose_type( type ) return types[-1] @@ -115,15 +115,15 @@ return False def is_bool( type_ ): - """returns True, if type represents C{bool}, False otherwise""" + """returns True, if type represents `bool`, False otherwise""" return remove_alias( type_ ) in create_cv_types( cpptypes.bool_t() ) def is_void( type ): - """returns True, if type represents C{void}, False otherwise""" + """returns True, if type represents `void`, False otherwise""" return remove_alias( type ) in create_cv_types( cpptypes.void_t() ) def is_void_pointer( type ): - """returns True, if type represents C{void*}, False otherwise""" + """returns True, if type represents `void*`, False otherwise""" return is_same( type, cpptypes.pointer_t( cpptypes.void_t() ) ) def is_integral( type ): @@ -889,8 +889,9 @@ return __is_noncopyable_single( class_ ) def is_defined_in_xxx( xxx, cls ): - """small helper function, that checks whether class ( C{cls} ) is defined - under C{::xxx} namespace""" + """ + small helper function, that checks whether the class `cls` is defined under `::xxx` namespace + """ if not cls.parent: return False Modified: pygccxml_dev/pygccxml/parser/__init__.py =================================================================== --- pygccxml_dev/pygccxml/parser/__init__.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pygccxml_dev/pygccxml/parser/__init__.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -40,12 +40,12 @@ :param files: The header files that should be parsed :type files: list of str :param config: Configuration object or None - :type config: L{config_t} + :type config: :class:`parser.config_t` :param compilation_mode: Determines whether the files are parsed individually or as one single chunk - :type compilation_mode: L{COMPILATION_MODE} + :type compilation_mode: :class:`parser.COMPILATION_MODE` :param cache: Declaration cache (None=no cache) - :type cache: L{cache_base_t} or str - :rtype: Declarations + :type cache: :class:`parser.cache_base_t` or str + :rtype: list of :class:`declarations.declaration_t` """ if not config: config = config_t() Modified: pygccxml_dev/pygccxml/parser/directory_cache.py =================================================================== --- pygccxml_dev/pygccxml/parser/directory_cache.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pygccxml_dev/pygccxml/parser/directory_cache.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -10,8 +10,8 @@ This module contains the implementation of a cache that uses individual files stored in a dedicated cache directory to store the cached contents. -The cache class is L{directory_cache_t} which can be passed to the C{cache} -argument of the L{parse()} function. +The cache class is :class:`parser.directory_cache_t` which can be passed as the `cache` +argument of the :func:`parser.parse` function. """ import os, os.path, gzip, hashlib @@ -257,7 +257,7 @@ :param filename: Output file name :type filename: str :param data: A Python object that will be pickled - :type data: picklable object + :type data: pickable object """ if self.__compression: f = gzip.GzipFile(filename, "wb") @@ -270,7 +270,7 @@ """Remove an entry from the cache. source_file is the name of the header and key is its corresponding - cache key (obtained by a call to L{_create_cache_key()}). + cache key (obtained by a call to :meth:_create_cache_key ). The entry is removed from the index table, any referenced file name is released and the cache file is deleted. @@ -334,7 +334,7 @@ undefine_symbols. :param config: Configuration object - :type config: L{config_t} + :type config: :class:`parser.config_t` :rtype: str """ m = hashlib.md5() Modified: pygccxml_dev/pygccxml/parser/project_reader.py =================================================================== --- pygccxml_dev/pygccxml/parser/project_reader.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pygccxml_dev/pygccxml/parser/project_reader.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -89,46 +89,46 @@ def create_text_fc( text ): """ - Creates L{file_configuration_t} instance, configured to contain Python string, + Creates :class:`parser.file_configuration_t` instance, configured to contain Python string, that contains valid C++ code :param text: C++ code :type text: str - :rtype: L{file_configuration_t} + :rtype: :class:`parser.file_configuration_t` """ return file_configuration_t( data=text , content_type=file_configuration_t.CONTENT_TYPE.TEXT ) def create_source_fc( header ): """ - Creates L{file_configuration_t} instance, configured to contain path to + Creates :class:`parser.file_configuration_t` instance, configured to contain path to C++ source file :param header: path to C++ source file :type header: str - :rtype: L{file_configuration_t} + :rtype: :class:`parser.file_configuration_t` """ return file_configuration_t( data=header , content_type=file_configuration_t.CONTENT_TYPE.STANDARD_SOURCE_FILE ) def create_gccxml_fc( xml_file ): """ - Creates L{file_configuration_t} instance, configured to contain path to + Creates :class:`parser.file_configuration_t` instance, configured to contain path to GCC-XML generated XML file. :param xml_file: path to GCC-XML generated XML file :type xml_file: str - :rtype: L{file_configuration_t} + :rtype: :class:`parser.file_configuration_t` """ return file_configuration_t( data=xml_file , content_type=file_configuration_t.CONTENT_TYPE.GCCXML_GENERATED_FILE ) def create_cached_source_fc( header, cached_source_file ): """ - Creates L{file_configuration_t} instance, configured to contain path to + Creates :class:`parser.file_configuration_t` instance, configured to contain path to GCC-XML generated XML file and C++ source file. If XML file does not exists, it will be created and used for parsing. If XML file exists, it will be used for parsing. @@ -139,7 +139,7 @@ :param cached_source_file: path to GCC-XML generated XML file :type cached_source_file: str - :rtype: L{file_configuration_t} + :rtype: :class:`parser.file_configuration_t` """ return file_configuration_t( data=header , cached_source_file=cached_source_file Modified: pygccxml_dev/pygccxml/parser/source_reader.py =================================================================== --- pygccxml_dev/pygccxml/parser/source_reader.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pygccxml_dev/pygccxml/parser/source_reader.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -28,7 +28,7 @@ This function binds between class and it's typedefs. :param decls: list of all declarations - :type all_classes: list of L{declaration_t} items + :type all_classes: list of :class:`declarations.declaration_t` items :rtype: None """ Modified: pyplusplus_dev/pyplusplus/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/__init__.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/__init__.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -7,7 +7,7 @@ ======================================== This package (together with the accompanying pygccxml package and -U{Boost.Python<http://www.boost.org/libs/python/doc/index.html>}) +`Boost.Python <http://www.boost.org/libs/python/doc/index.html>`_ assists you in creating Python bindings for a C/C++ library. This is done by parsing a set of header files that contain all the stuff you want to expose in Python. The result of this parsing @@ -18,9 +18,6 @@ code before it is written to disk. As a last step, these source code blocks are finally written into one or more C++ source files, which can then be compiled to generate the final Python module. - -If you are just starting with U{`Py++`<http://www.language-binding.net>}, -then consider to read documentation of L{module_builder} package. """ import code_creators Modified: pyplusplus_dev/pyplusplus/_logging_/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/_logging_/__init__.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/_logging_/__init__.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -44,7 +44,7 @@ """ module_builder = _create_logger_( 'pyplusplus.module_builder' ) - """logger that in use by L{module_builder_t} class. + """logger that in use by :class:`module_builder.module_builder_t` class. Just another logger. It exists mostly for `Py++` developers. """ Modified: pyplusplus_dev/pyplusplus/code_creators/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/__init__.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/code_creators/__init__.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -11,7 +11,7 @@ distributed among several source files) and each individual code creator represents a single block of source code. -The base class for all code creators is L{code_creator_t}. +The base class for all code creators is :class:`code_creators.code_creator_t`. """ Modified: pyplusplus_dev/pyplusplus/code_creators/code_creator.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/code_creator.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/code_creators/code_creator.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -60,7 +60,7 @@ """parent - reference to parent code creator""" parent = property( _get_parent, _set_parent, doc="""Parent code creator or None if this is the root node. - @type: L{code_creator_t} + @type: :class:`code_creators.code_creator_t` """) def _get_target_configuration( self ): @@ -70,14 +70,14 @@ """target_configuration - reference to target_configuration_t class instance""" target_configuration = property( _get_target_configuration, _set_target_configuration, doc="""Target configuration. - @type: L{target_configuration_t} + @type: :class:`target_configuration_t` """) @property def top_parent(self): """top_parent - reference to top parent code creator - @type: L{code_creator_t} + @type: :class:`code_creators.code_creator_t` """ parent = self.parent me = self Modified: pyplusplus_dev/pyplusplus/code_creators/compound.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/compound.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/code_creators/compound.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -11,7 +11,7 @@ """Constructor. :param parent: Parent code creator. - :type parent: L{code_creator_t} + :type parent: :class:`code_creators.code_creator_t` """ code_creator.code_creator_t.__init__( self ) self._creators = [] @@ -20,13 +20,13 @@ return self._creators creators = property(_get_creators, doc="""A list of children nodes. - @type: list of L{code_creator_t}""") + @type: list of :class:`code_creators.code_creator_t`""") def adopt_creator( self, creator, index=None): """Add a creator to the list of children creators. :param creator: Creator object - :type creator: L{code_creator_t} + :type creator: :class:`code_creators.code_creator_t` :param index: Desired position of the creator or None to append it to the end of the list :type index: int """ @@ -40,7 +40,7 @@ """Add a creators to the list of children creators. :param creators: list of creators object - :type creator: L{code_creator_t} + :type creator: :class:`code_creators.code_creator_t` :param index: Desired position of the creator or None to append it to the end of the list :type index: int """ @@ -55,7 +55,7 @@ @precondition: creator must be a children of self :param creator: The creator node to remove - :type creator: L{code_creator_t} + :type creator: :class:`code_creators.code_creator_t` """ creator.parent = None del self._creators[ self._creators.index( creator ) ] @@ -66,7 +66,7 @@ concatenate the code from a list of code creators. :param creators: A list with code creators - :type creators: list of L{code_creator_t} + :type creators: list of :class:`code_creators.code_creator_t` :rtype: str """ internals = map( lambda expr: expr.create(), creators ) Modified: pyplusplus_dev/pyplusplus/code_creators/declaration_based.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/declaration_based.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/code_creators/declaration_based.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -14,7 +14,7 @@ """Constructor. :param declaration: Declaration object - :type declaration: L{decl_wrapper_t<decl_wrappers.decl_wrapper_t>} + :type declaration: :class:`decl_wrappers.decl_wrapper_t` :param parent: Parent code creator. :type parent: code_creator_t """ @@ -28,7 +28,7 @@ @property def declaration(self): """The declaration this code creator is based on. - @type: L{decl_wrapper_t<decl_wrappers.decl_wrapper_t>} + @type: :class:`decl_wrappers.decl_wrapper_t` """ return self._decl Modified: pyplusplus_dev/pyplusplus/code_creators/module.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/module.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/code_creators/module.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -50,7 +50,7 @@ doc="""License text. The license text will always be the first children node. - @type: str or L{license_t}""") + @type: str or :class:`code_creators.license_t`""") def _get_system_files_impl( self ): return [] @@ -113,18 +113,18 @@ @property def body(self): - """Return reference to L{module_body_t} code creator""" + """Return reference to :class:`code_creators.module_body_t` code creator""" if None is self.__body: found = algorithm.creator_finder.find_by_class_instance( what=module_body.module_body_t - , where=self.creators - , recursive=False ) + , where=self.creators + , recursive=False ) if found: self.__body = found[0] return self.__body def last_include_index(self): """ - return the children index of the last L{include_t} object. + return the children index of the last :class:`code_creators.include_t` object. An exception is raised when there is no include_t object among the children creators. @@ -157,12 +157,12 @@ , headers ) def adopt_include(self, include_creator): - """Insert an L{include_t} object. + """Insert an :class:`code_creators.include_t` object. The include creator is inserted right after the last include file. :param include_creator: Include creator object - :type include_creator: L{include_t} + :type include_creator: :class:`code_creators.include_t` """ lii = self.last_include_index() if lii == 0: Modified: pyplusplus_dev/pyplusplus/code_repository/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/code_repository/__init__.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/code_repository/__init__.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -4,13 +4,8 @@ # http://www.boost.org/LICENSE_1_0.txt) """ -Code repository package is used as a repository of C++ classes/functions. +Code repository package is used as a repository of C++/Python classes/functions. Those classes/functions solve problems, that are typical to most projects. -Right now, this package contains set of classes that help to export one -dimensional static arrays. For example: - -C{char data[23];} - """ import array_1 Modified: pyplusplus_dev/pyplusplus/creators_factory/bpcreator.py =================================================================== --- pyplusplus_dev/pyplusplus/creators_factory/bpcreator.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/creators_factory/bpcreator.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -21,17 +21,13 @@ VIRTUALITY_TYPES = declarations.VIRTUALITY_TYPES class bpcreator_t( declarations.decl_visitor_t ): - """Creating code creators. + """ + code creators factory for Boost.Python library This class takes a set of declarations as input and creates a code - creator tree that contains the Boost.Python C++ source code for the + creators tree that contains the Boost.Python C++ source code for the final extension module. Each node in the code creators tree represents a block of text (C++ source code). - - Usage of this class: Create an instance and pass all relevant input - data to the constructor. Then call L{create()} to obtain the code - creator tree whose root node is a L{module_t<code_creators.module_t>} - object representing the source code for the entire extension module. """ def __init__( self @@ -57,8 +53,8 @@ :type module_name: str :type boost_python_ns_name: str :type call_policies_resolver_: callable - :type types_db: L{types_database_t<types_database.types_database_t>} - :type target_configuration: L{target_configuration_t<code_creators.target_configuration_t>} + :type types_db: L:class:`types_database.types_database_t` + :type target_configuration: :class:`code_creators.target_configuration_t` :type doc_extractor: callable :type already_exposed_dbs: list of strings """ Modified: pyplusplus_dev/pyplusplus/decl_wrappers/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/__init__.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/decl_wrappers/__init__.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -5,8 +5,8 @@ """Code generator configuration classes -L{pygccxml.declarations} package contains classes, which describe C++ declarations. -This package contains classes that derive from the L{pygccxml.declarations} classes. +:mod:`pygccxml.declarations` package contains classes, which describe C++ declarations. +This package contains classes that derive from the :mod:`pygccxml.declarations` classes. The classes in this package allow you to configure the code generator. """ Modified: pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -25,11 +25,11 @@ def create(self, function_creator, creation_policy=CREATION_POLICY.AS_INSTANCE): """Creates code from the call policies class instance. :param function_creator: parent code creator - :type function_creator: L{code_creators.function_t} or L{code_creators.constructor_t} + :type function_creator: :class:`code_creators.function_t` or :class:`code_creators.constructor_t` :param creation_policy: indicates whether we this call policy used as template argument or as an instance - :type creation_policy: L{CREATION_POLICY} + :type creation_policy: :class:`decl_wrappers.CREATION_POLICY` """ code = self._create_impl( function_creator ) if code and creation_policy == CREATION_POLICY.AS_INSTANCE: @@ -45,7 +45,7 @@ return self.create( function_creator, CREATION_POLICY.AS_TEMPLATE_ARGUMENT ) def is_default( self ): - """return True is self is instance of L{default_call_policies_t} class""" + """return True is self is instance of :class:`decl_wrappers.default_call_policies_t` class""" return False def is_predefined( self ): @@ -91,7 +91,7 @@ def _set_base_policy( self, new_policy ): self._base = new_policy base_policy = property( _get_base_policy, _set_base_policy - , doc="base call policy, by default is reference to L{default_call_policies_t} call policy") + , doc="base call policy, by default is reference to :class:`decl_wrappers.default_call_policies_t` call policy") def _get_args(self, function_creator): return [] Modified: pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -40,7 +40,7 @@ def set_call_policies(self, call_policies): self._call_policies = call_policies call_policies = property( get_call_policies, set_call_policies - , doc="reference to L{call policies<call_policy_t>} class." \ + , doc="reference to :class:`decl_wrappers.call_policy_t` class." \ +"Default value is calculated at runtime, based on return value.") def _get_use_keywords(self): @@ -152,7 +152,7 @@ """add new function transformation. transformer_creators - list of transformer creators, which should be applied on the function - keywd - keyword arguments for L{function_transformation_t} class initialization + keywd - keyword arguments for :class:`function_transformers.function_transformation_t` class initialization """ self.transformations.append( ft.function_transformation_t( self, transformer_creators, **keywd ) ) Modified: pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -51,10 +51,10 @@ """ class class_common_details_t( object ): - """defines few properties that are common to - L{class declaration<pygccxml.declarations.class_declaration_t>} and - L{definition<pygccxml.declarations.class_t>} classes """ + defines :class:`pygccxml.declarations.class_declaration_t` and :class:`pygccxml.declarations.class_t` + classes common properties + """ def __init__(self): object.__init__( self ) self._always_expose_using_scope = None @@ -109,7 +109,7 @@ def _set_always_expose_using_scope( self, value ): self._always_expose_using_scope = value always_expose_using_scope = property( _get_always_expose_using_scope, _set_always_expose_using_scope - , doc="please see L{class_wrapper.always_expose_using_scope_documentation} variable for documentation." ) + , doc="please see :attr:`class_wrapper.always_expose_using_scope_documentation` variable for documentation." ) def _get_equality_comparable( self ): if None is self._equality_comparable: @@ -480,24 +480,28 @@ self._properties.append( properties.property_t( name, fget, fset, doc, True ) ) def redefined_funcs( self ): - """returns list of member functions that should be defined in class wrapper + """ + returns list of member functions that should be defined in the class wrapper It comes useful in 3 tier hierarchy: - struct base{ - virtual void do_nothing() = 0; - }; - struct derived{ - virtual void do_something() = 0; - }; + .. code-block:: c++ - struct concrete{ - virtual void do_nothing(){} - virtual void do_something(){} - }; + struct base{ + virtual void do_nothing() = 0; + }; - derived_wrapper should define do_nothing function, otherwise the generated - code will not compile + struct derived{ + virtual void do_something() = 0; + }; + + struct concrete{ + virtual void do_nothing(){} + virtual void do_something(){} + }; + + The wrapper for class `derived`, should define `do_nothing` function, + otherwise the generated code will not compile """ if isinstance( self._redefined_funcs, list ): Modified: pyplusplus_dev/pyplusplus/decl_wrappers/decl_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/decl_wrapper.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/decl_wrappers/decl_wrapper.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -42,7 +42,7 @@ @property def logger( self ): - """reference to L{_logging_.loggers.declarations}""" + """reference to :attr:`_logging_.loggers.declarations`""" return _logging_.loggers.declarations def _get_documentation( self ): @@ -210,9 +210,13 @@ disabled_messaged = disabled_messages def disable_messages( self, *args ): - """set messages, which should not be reported to you + """ + disable messages - `Py++` will not report the disabled messages + Usage example: - Usage example: decl.disable_messages( messages.W1001, messages.W1040 ) + .. code-block:: python + + decl.disable_messages( messages.W1001, messages.W1040 ) """ for msg in args: msg_id = messages.find_out_message_id( msg ) Modified: pyplusplus_dev/pyplusplus/decl_wrappers/decl_wrapper_printer.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/decl_wrapper_printer.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/decl_wrappers/decl_wrapper_printer.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -118,9 +118,11 @@ super( decl_wrapper_printer_t, self ).visit_variable() def print_declarations( decls, detailed=True, recursive=True, writer=sys.stdout.write ): - """ Print decl tree rooted at each of the included nodes. - decls - either a single decl or a list of decls. """ + print declarations tree + + :param decls: could be single :class:`pygccxml.declarations.declaration_t` object or list of them + """ prn = decl_wrapper_printer_t(0, detailed, recursive, writer) if type(decls) is not list: decls = [decls] Modified: pyplusplus_dev/pyplusplus/decl_wrappers/scopedef_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/scopedef_wrapper.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/decl_wrappers/scopedef_wrapper.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -3,13 +3,13 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -"""defines base class for L{decl_wrappers.class_t} and L{decl_wrappers.namespace_t} classes""" +"""defines base class for :class:`decl_wrappers.class_t` and :class:`decl_wrappers.namespace_t` classes""" import decl_wrapper from pyplusplus import messages class scopedef_t(decl_wrapper.decl_wrapper_t): - """base class for L{decl_wrappers.class_t} and L{decl_wrappers.namespace_t} classes + """base class for :class:`decl_wrappers.class_t` and :class:`decl_wrappers.namespace_t` classes It provides convenience functionality: include\\exclude all internal declarations (not) to be exported. Modified: pyplusplus_dev/pyplusplus/decl_wrappers/user_text.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/user_text.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/decl_wrappers/user_text.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -3,7 +3,7 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -"defines few classes, used by L{decl_wrapper.class_t} class to keep user code" +"defines few classes, used by :class:`decl_wrapper.class_t` class to keep user code" class user_text_t(object): "keeps reference to user code that belongs to declaration section" Modified: pyplusplus_dev/pyplusplus/file_writers/single_file.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/single_file.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/file_writers/single_file.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -3,7 +3,7 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -"""defines a class that writes L{code_creators.module_t} to single file""" +"""defines a class that writes :class:`code_creators.module_t` to single file""" import os import writer Modified: pyplusplus_dev/pyplusplus/file_writers/writer.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/writer.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/file_writers/writer.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -3,7 +3,7 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -"""defines interface for all classes that writes L{code_creators.module_t} to file(s)""" +"""defines interface for all classes that writes :class:`code_creators.module_t` to file(s)""" import os import time @@ -60,7 +60,7 @@ @staticmethod def create_backup(fpath): - """creates backup of the file, by renaming it to C{fpath + ~}""" + """creates backup of the file""" if not os.path.exists( fpath ): return backup_fpath = fpath + '~' @@ -69,7 +69,7 @@ os.rename( fpath, backup_fpath ) def write_code_repository(self, dir): - """creates files defined in L{code_repository} package""" + """creates files defined in :mod:`code_repository` package""" visited = set() system_files = self.extmodule.get_system_files( recursive=True ) for cr in code_repository.all: Modified: pyplusplus_dev/pyplusplus/function_transformers/controllers.py =================================================================== --- pyplusplus_dev/pyplusplus/function_transformers/controllers.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/function_transformers/controllers.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -20,7 +20,7 @@ def __init__( self, type, name, initialize_expr='' ): """ :param type: type of the variable - :type type: instance of L{pygccxml.declarations.type_t} + :type type: instance of :class:`pygccxml.declarations.type_t` :param name: name( str ) of the variable @@ -74,7 +74,7 @@ """declare variable :param type: type of the variable - :type type: instance of L{pygccxml.declarations.type_t} + :type type: instance of :class:`pygccxml.declarations.type_t` :param name: name( str ) of the variable Modified: pyplusplus_dev/pyplusplus/function_transformers/function_transformation.py =================================================================== --- pyplusplus_dev/pyplusplus/function_transformers/function_transformation.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/function_transformers/function_transformation.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -3,23 +3,23 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -"""This module contains the class L{function_transformation_t}. -""" +"""defines :class:function_transformation_t class""" + import md5 import controllers from pygccxml import declarations from pyplusplus import code_repository -class function_transformation_t: +class function_transformation_t: + """the class holds function transformation definition - all transformations that should be applied""" def __init__(self, function, transformer_creator, **keywd): - """Constructor. """ self.__function = function self.__controller = None if isinstance( function.parent, declarations.class_t ): if declarations.VIRTUALITY_TYPES.NOT_VIRTUAL == function.virtuality: self.__controller = controllers.mem_fun_controller_t( function ) elif declarations.VIRTUALITY_TYPES.PURE_VIRTUAL == function.virtuality: - self.__controller = controllers.pure_virtual_mem_fun_controller_t( function ) + self.__controller = controllers.pure_virtual_mem_fun_controller_t( function ) else: self.__controller = controllers.virtual_mem_fun_controller_t( function ) else: @@ -29,7 +29,7 @@ self.__controller.apply( self.__transformers ) self.__unique_name = None self.__alias = keywd.get( 'alias', None ) - + @property def unique_name( self ): if None is self.__unique_name: @@ -51,7 +51,7 @@ else: self.__alias = self.__function.alias return self.__alias - + @property def transformers( self ): return self.__transformers Modified: pyplusplus_dev/pyplusplus/function_transformers/transformer.py =================================================================== --- pyplusplus_dev/pyplusplus/function_transformers/transformer.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/function_transformers/transformer.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -3,8 +3,7 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -"""This module contains the class L{transformer_t}. -""" +"""defines :class:transformer_t class""" import sys, os.path, copy, re, types from pygccxml import declarations, parser @@ -71,7 +70,7 @@ transformers should override the method, in order to define custom transformation for free function. - :param controller: instance of L{free_fun_controller_t} class + :param controller: instance of :class:`free_fun_controller_t` class """ raise NotImplementedError(self.__class__.__name__) Modified: pyplusplus_dev/pyplusplus/module_builder/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/module_builder/__init__.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/module_builder/__init__.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -4,12 +4,7 @@ # http://www.boost.org/LICENSE_1_0.txt) """ -This package provides users with simple and convenient interface to `Py++` -functionality. - -L{module_builder_t} class is the main class. Please read it's documentation first. -Also take a look on tutorials. You can find them on `Py++` -U{web site<http://www.language-binding.net>} +This package provides simple and convenient interface to `Py++` functionality. """ from boost_python_builder import builder_t as module_builder_t Modified: pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py =================================================================== --- pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -25,7 +25,7 @@ """ This class provides users with simple and intuitive interface to `Py++` and/or pygccxml functionality. If this is your first attempt to use `Py++` - consider to read tutorials. You can find them on U{web site<http://www.language-binding.net>}. + consider to read tutorials. You can find them on `web site <http://www.language-binding.net>`_. """ def __init__( self @@ -47,7 +47,7 @@ , gccxml_config=None): """ :param files: list of files, declarations from them you want to export - :type files: list of strings or L{file_configuration_t} instances + :type files: list of strings or :class:`parser.file_configuration_t` instances :param gccxml_path: path to gccxml binary. If you don't pass this argument, pygccxml parser will try to locate it using you environment PATH variable Modified: pyplusplus_dev/pyplusplus/module_builder/ctypes_builder.py =================================================================== --- pyplusplus_dev/pyplusplus/module_builder/ctypes_builder.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/module_builder/ctypes_builder.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -26,7 +26,7 @@ """ This class provides users with simple and intuitive interface to `Py++` and/or pygccxml functionality. If this is your first attempt to use `Py++` - consider to read tutorials. You can find them on U{web site<http://www.language-binding.net>}. + consider to read tutorials. You can find them on `web site <http://www.language-binding.net>`_. """ def __init__( self , files @@ -36,7 +36,7 @@ , encoding='ascii' ): """ :param files: list of files, declarations from them you want to export - :type files: list of strings or L{file_configuration_t} instances + :type files: list of strings or :class:`parser.file_configuration_t` instances :param gccxml_path: path to gccxml binary. If you don't pass this argument, pygccxml parser will try to locate it using you environment PATH variable @@ -108,7 +108,7 @@ @property def code_creator( self ): - "reference to L{code_creators.ctypes_module_t} instance" + "reference to :class:`code_creators.ctypes_module_t` instance" if not self.__code_creator: raise RuntimeError( "self.module is equal to None. Did you forget to call build_code_creator function?" ) return self.__code_creator Modified: pyplusplus_dev/pyplusplus/module_builder/module_builder.py =================================================================== --- pyplusplus_dev/pyplusplus/module_builder/module_builder.py 2009-02-08 19:52:49 UTC (rev 1663) +++ pyplusplus_dev/pyplusplus/module_builder/module_builder.py 2009-02-09 09:48:27 UTC (rev 1664) @@ -36,9 +36,9 @@ def run_query_optimizer(self): """ - It is possible to optimze time that takes to execute queries. In most cases - this is done from __init__ method. But there are use-case, when you need - to disable optimizer at __init__ and run it later. + It is possible to optimize time that takes to execute queries. In most cases + this is done from the :meth:`__init__` method. But there are use-case, + when you need to disable optimizer and run it later. """ self.global_ns.init_optimizer() @@ -48,7 +48,7 @@ some specific one. :param decl: optional, if passed, then only it will be printed - :type decl: instance of L{decl_wrappers.decl_wrapper_t} class + :type decl: instance of :class:`decl_wrappers.decl_wrapper_t` class """ if None is decl: decl = self.global_ns This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-08 19:52:55
|
Revision: 1663 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1663&view=rev Author: roman_yakovenko Date: 2009-02-08 19:52:49 +0000 (Sun, 08 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pydsc_dev/docs/pydsc.rest pydsc_dev/pydsc.py pygccxml_dev/pygccxml/binary_parsers/undname.py pygccxml_dev/pygccxml/parser/directory_cache.py pyplusplus_dev/pyplusplus/_logging_/multi_line_formatter.py pyplusplus_dev/pyplusplus/code_creators/code_creator.py pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py pyplusplus_dev/pyplusplus/creators_factory/sort_algorithms.py pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/decl_wrapper.py pyplusplus_dev/pyplusplus/file_writers/balanced_files.py pyplusplus_dev/pyplusplus/file_writers/multiple_files.py pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py Modified: pydsc_dev/docs/pydsc.rest =================================================================== --- pydsc_dev/docs/pydsc.rest 2009-02-08 13:53:58 UTC (rev 1662) +++ pydsc_dev/docs/pydsc.rest 2009-02-08 19:52:49 UTC (rev 1663) @@ -35,20 +35,14 @@ import pydsc -and every module, that will be imported after it, will be checked. The errors -will be printed to stdout. +and every module, that will be imported after it, in the current working directory +will be checked. The errors will be printed to stdout. -For example: - -.. code-block:: python - - import pydsc - import readline - :mod:`pydsc` contains few functions, which helps you to configure the spell checker: * to define your own "ignore" dictionary * to define the error messages destination (file, stdout) - * to define set of files, which should be included or excluded + * to define set of files, which should be checked + * to ignore Sphinx specific words and code blocks For more information see :mod:`pydsc` module. Modified: pydsc_dev/pydsc.py =================================================================== --- pydsc_dev/pydsc.py 2009-02-08 13:53:58 UTC (rev 1662) +++ pydsc_dev/pydsc.py 2009-02-08 19:52:49 UTC (rev 1663) @@ -11,15 +11,16 @@ .. code-block:: python import pydsc - pydsc.include( r'D:\pygccxml_dev\pygccxml' ) #check only pygccxml package - pydsc.exclude( r'C:\Python' ) #don't check standard library - pydsc.ignore([ 'Yakovenko', 'www', 'org', 'py' ]) + pydsc.include_paths( r'D:\pygccxml_dev\pygccxml' ) #check only pygccxml package + pydsc.ignore_words([ 'Yakovenko', 'www', 'org', 'py' ]) + #if you use sphinx as a documentation tool: + pydsc.set_text_preprocessor( pydsc.sphinx_preprocessor ) """ -__version__ = '0.2' #current version -__author__ = 'Roman Yakovenko <rom...@gm...>' #Don't you want to know who is guilty? -__url__ = 'http://www.language-binding.net' #project home -__license__ = 'Boost Software License <http://boost.org/more/license_info.html>' #license +__version__ = '0.3' #current version +__author__ = 'Roman Yakovenko <rom...@gm...>' +__url__ = 'http://www.language-binding.net' +__license__ = 'Boost Software License <http://boost.org/more/license_info.html>' import os import re @@ -51,18 +52,6 @@ return bool( filter( lambda dir: path.startswith( dir ), dirs ) ) -#~ class DynamicIdentifiersFilter( enchant.tokenize.Filter): - #~ _pattern = re.compile(r"^.+@[^\.].*\.[a-z]{2,}$") - #~ def __init__( self, *args, **keywd ): - #~ super( DynamicIdentifiersFilter, self ).__init__( self, *args, **keywd ) - #~ self.global_identifiers = set() - #~ self.local_identifiers = set() - - #~ def _skip(self,word): - #~ if self._pattern.match(word): - #~ return True - #~ return False - def is_identifier( word ): """ returns `True` is the word represents an identifier, constructed from two or more words, `False` otherwise. @@ -242,7 +231,7 @@ for word, suggestions in errors.items(): write( ' misspelled word : %s%s' % ( word, os.linesep ) ) write( ' suggestions : %s%s' % ( `suggestions`, os.linesep ) ) - if 1: #debug code + if 0: #debug code clean = lambda t: t.replace( '\n', ' ' ).replace( '\r', '' ) write( ' source file text: %s\n' % clean( text_ ) ) write( ' checked text : %s\n' % clean( text ) ) @@ -370,4 +359,6 @@ def __call__( self, text ): return self.__replace_via_re( text ) +#sphinx_preprocessor, instance of :class:`sphinx_preprocessor_t` allows to remove +#some special words and code from the text. sphinx_preprocessor = sphinx_preprocessor_t() Modified: pygccxml_dev/pygccxml/binary_parsers/undname.py =================================================================== --- pygccxml_dev/pygccxml/binary_parsers/undname.py 2009-02-08 13:53:58 UTC (rev 1662) +++ pygccxml_dev/pygccxml/binary_parsers/undname.py 2009-02-08 19:52:49 UTC (rev 1663) @@ -67,7 +67,7 @@ .dll, .map and .so files. On Windows, the class works with unique name produced by MSVC compiler and - with undecorated names produced by dbghelp.dll + with undecorated names produced by `dbghelp.dll` On Linux, the class works with mangled names produced by GCC-XML ( GCC 4.2 ) compiler and demangled name produced by "nm" utility. Modified: pygccxml_dev/pygccxml/parser/directory_cache.py =================================================================== --- pygccxml_dev/pygccxml/parser/directory_cache.py 2009-02-08 13:53:58 UTC (rev 1662) +++ pygccxml_dev/pygccxml/parser/directory_cache.py 2009-02-08 19:52:49 UTC (rev 1663) @@ -156,7 +156,7 @@ :param source_file: Header file name :type source_file: str :param configuration: Configuration object - :type configuration: L{config_t} + :type configuration: :class:`parser.config_t` :rtype: Cached declarations or None """ @@ -199,10 +199,9 @@ def _load(self): """Load the cache. - Loads the file index.dat which contains the index table and - the file name repository. + Loads the `index.dat` file, which contains the index table and the file name repository. - This method is called by the constructor. + This method is called by the :meth:`__init__` """ indexfilename = os.path.join(self.__dir, "index.dat") Modified: pyplusplus_dev/pyplusplus/_logging_/multi_line_formatter.py =================================================================== --- pyplusplus_dev/pyplusplus/_logging_/multi_line_formatter.py 2009-02-08 13:53:58 UTC (rev 1662) +++ pyplusplus_dev/pyplusplus/_logging_/multi_line_formatter.py 2009-02-08 19:52:49 UTC (rev 1663) @@ -44,7 +44,7 @@ record.message = record.getMessage() Now this method temporarily replaces the getMessage() method of - the record by a version that returns a pre-generated message that + the record by a version that returns a generated message that spans several lines. Then the original format() method is called which will invoke the 'fake' method. """ Modified: pyplusplus_dev/pyplusplus/code_creators/code_creator.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/code_creator.py 2009-02-08 13:53:58 UTC (rev 1662) +++ pyplusplus_dev/pyplusplus/code_creators/code_creator.py 2009-02-08 19:52:49 UTC (rev 1663) @@ -147,7 +147,7 @@ def beautify( self, code ): """ - function that returns code without leading and trailing whitespaces. + function that returns code without leading and trailing white spaces. :param code: A code block with C++ source code. :type code: str Modified: pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py 2009-02-08 13:53:58 UTC (rev 1662) +++ pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py 2009-02-08 19:52:49 UTC (rev 1663) @@ -82,7 +82,7 @@ class smart_pointers_converter_t( registration_based.registration_based_t , declaration_based.declaration_based_t ): """ creator for boost::python::implicitly_convertible. - This creates a statemnt that allows the usage of C++ implicit + This creates a statement that allows the usage of C++ implicit conversion from source to target. See: http://www.boost.org/libs/python/doc/v2/implicit.html """ Modified: pyplusplus_dev/pyplusplus/creators_factory/sort_algorithms.py =================================================================== --- pyplusplus_dev/pyplusplus/creators_factory/sort_algorithms.py 2009-02-08 13:53:58 UTC (rev 1662) +++ pyplusplus_dev/pyplusplus/creators_factory/sort_algorithms.py 2009-02-08 19:52:49 UTC (rev 1663) @@ -116,20 +116,20 @@ for fname in self.__desired_order: answer.append( fname2inst[fname] ) return answer - -class calldef_organizer_t( object ): + +class calldef_organizer_t( object ): #Take a look on this post: # http://mail.python.org/pipermail/c++-sig/2006-October/011463.html - #calldef_organizer_t will take into account only requiered arguments. + #calldef_organizer_t will take into account only required arguments. #Next rules are implemented: #1. calldef( bool ) will be the last registered function #2. T* will come after T ( const T& ) def __init__( self ): object.__init__( self ) - #preserve order in which functions where defined + #preserve order in which functions where defined self.__cmp_unrelated = lambda d1, d2: cmp( d1.location.line, d2.location.line ) - + def __build_groups( self, decls ): groups = { None: [] } for d in decls: @@ -145,7 +145,7 @@ return decl_wrappers.algorithm.registration_order.is_related( t1, t2 ) def __cmp( self, f1, f2 ): - result = self.__cmp_types( f1.arguments[0].type, f2.arguments[0].type ) + result = self.__cmp_types( f1.arguments[0].type, f2.arguments[0].type ) if None is result: result = self.__cmp_unrelated( f1, f2 ) return result @@ -155,7 +155,7 @@ if None is group: continue groups[ group ].sort( self.__cmp ) - + def __join_groups( self, groups ): decls = [] sorted_keys = groups.keys() @@ -168,7 +168,7 @@ groups = self.__build_groups( decls ) self.__sort_groups(groups) result = self.__join_groups(groups) - return result + return result def sort_classes( classes ): organizer = class_organizer_t( classes ) @@ -177,8 +177,8 @@ def sort_calldefs( decls ): return calldef_organizer_t().sort( decls ) -USE_CALLDEF_ORGANIZER = False -#If you understand what problem calldef_organizer_t solves, than may be you should +USE_CALLDEF_ORGANIZER = False +#If you understand what problem calldef_organizer_t solves, than may be you should #use this. def sort( decls ): @@ -219,7 +219,7 @@ else: others.sort( cmp=cmp_by_name ) constructors.sort( cmp=cmp_by_line ) - + new_ordered = [] new_ordered.extend( enums ) new_ordered.extend( classes ) Modified: pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py 2009-02-08 13:53:58 UTC (rev 1662) +++ pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py 2009-02-08 19:52:49 UTC (rev 1663) @@ -92,7 +92,7 @@ def has_wrapper( self ): """returns True, if function - wrapper is needed - The functionality by this function is uncomplete. So please don't + The functionality by this function is incomplete. So please don't use it in your code. """ if not isinstance( self, declarations.member_calldef_t ): Modified: pyplusplus_dev/pyplusplus/decl_wrappers/decl_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/decl_wrapper.py 2009-02-08 13:53:58 UTC (rev 1662) +++ pyplusplus_dev/pyplusplus/decl_wrappers/decl_wrapper.py 2009-02-08 19:52:49 UTC (rev 1663) @@ -170,7 +170,7 @@ """change "exportable" status This function should be use in case `Py++` made a mistake and signed the - declaration as unexportable.""" + declaration as non-exportable.""" self._exportable = exportable exportable = property( get_exportable, set_exportable Modified: pyplusplus_dev/pyplusplus/file_writers/balanced_files.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/balanced_files.py 2009-02-08 13:53:58 UTC (rev 1662) +++ pyplusplus_dev/pyplusplus/file_writers/balanced_files.py 2009-02-08 19:52:49 UTC (rev 1663) @@ -18,7 +18,7 @@ #TODO: to add namespace_alias_t classes class balanced_files_t(multiple_files.multiple_files_t): """ - This class implements classic strategy of deviding classes to files + This class implements classic strategy of dividing classes to files one class in one header + source files. """ HEADER_EXT = '.pypp.hpp' Modified: pyplusplus_dev/pyplusplus/file_writers/multiple_files.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/multiple_files.py 2009-02-08 13:53:58 UTC (rev 1662) +++ pyplusplus_dev/pyplusplus/file_writers/multiple_files.py 2009-02-08 19:52:49 UTC (rev 1663) @@ -16,22 +16,19 @@ #TODO: to add namespace_alias_t classes class multiple_files_t(writer.writer_t): """ - This class implements classic strategy of deviding classes to files + This class implements classic strategy of dividing classes to files one class in one header + source files. """ HEADER_EXT = '.pypp.hpp' SOURCE_EXT = '.pypp.cpp' def __init__(self, extmodule, directory_path, write_main=True, files_sum_repository=None, encoding='ascii'): - """Constructor. - - :param extmodule: The root of a code creator tree - :type extmodule: bpmodule_t - :param directory_path: The output directory where the source files are written + """ + :param extmodule: code creators tree root + :type extmodule: :class:`code_creators.bpmodule_t` + :param directory_path: generated source files directory :type directory_path: str - - :param write_main: if it is True, the class will write out a main file - that calls all the registration methods. + :param write_main: if True, the class will write out a main file that calls all the registration methods. :type write_main: boolean """ writer.writer_t.__init__( self, extmodule, files_sum_repository, encoding=encoding ) Modified: pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py =================================================================== --- pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py 2009-02-08 13:53:58 UTC (rev 1662) +++ pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py 2009-02-08 19:52:49 UTC (rev 1663) @@ -216,20 +216,17 @@ , enable_indexing_suite=True , doc_extractor=None): """ - Creates L{bpmodule_t} code creator. + Creates :class:`code_creators.bpmodule_t` code creator. :param module_name: module name - :type module_name: string + :type module_name: str - :param boost_python_ns_name: boost::python namespace alias, by default - it is 'bp' - :type boost_python_ns_name: string + :param boost_python_ns_name: boost::python namespace alias, by default it is `bp` + :type boost_python_ns_name: str - :param call_policies_resolver_: callable, that will be invoked on every - calldef object. It should return call policies. + :param call_policies_resolver_: callable, that will be invoked on every calldef object. It should return call policies. :type call_policies_resolver_: callable - :param doc_extractor: callable, that takes as argument reference to declaration - and returns documentation string + :param doc_extractor: callable, that takes as argument reference to declaration and returns documentation string :type doc_extractor: callable or None """ @@ -333,17 +330,17 @@ , on_unused_file_found=os.remove , use_files_sum_repository=False): """ - Writes module to multiple files + writes module to multiple files :param dir_name: directory name - :type dir_name: string + :type dir_name: str :param huge_classes: list that contains reference to classes, that should be split :param on_unused_file_found: callable object that represents the action that should be taken on file, which is no more in use - @use_files_sum_repository: `Py++` can generate file, which will contain md5 sum of every generated file. + @use_files_sum_repository: `Py++` can generate file, which will contain `md5` sum of every generated file. Next time you generate code, md5sum will be loaded from the file and compared. This could speed-up code generation process by 10-15%. """ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-08 13:54:02
|
Revision: 1662 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1662&view=rev Author: roman_yakovenko Date: 2009-02-08 13:53:58 +0000 (Sun, 08 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pygccxml_dev/pygccxml/binary_parsers/parsers.py pygccxml_dev/pygccxml/binary_parsers/undname.py pyplusplus_dev/pyplusplus/__init__.py pyplusplus_dev/pyplusplus/_logging_/multi_line_formatter.py pyplusplus_dev/pyplusplus/code_creators/class_declaration.py pyplusplus_dev/pyplusplus/code_creators/code_creator.py pyplusplus_dev/pyplusplus/code_creators/enum.py pyplusplus_dev/pyplusplus/code_creators/include_directories.py pyplusplus_dev/pyplusplus/code_creators/member_variable.py pyplusplus_dev/pyplusplus/code_creators/name_mappings.py pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py pyplusplus_dev/pyplusplus/creators_factory/bpcreator.py pyplusplus_dev/pyplusplus/creators_factory/types_database.py pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/typedef_wrapper.py pyplusplus_dev/pyplusplus/file_writers/__init__.py pyplusplus_dev/pyplusplus/file_writers/balanced_files.py pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py pyplusplus_dev/pyplusplus/file_writers/multiple_files.py pyplusplus_dev/pyplusplus/function_transformers/__init__.py pyplusplus_dev/pyplusplus/function_transformers/transformer.py pyplusplus_dev/pyplusplus/function_transformers/transformers.py pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py sphinx/ignore_dictionary.txt Modified: pygccxml_dev/pygccxml/binary_parsers/parsers.py =================================================================== --- pygccxml_dev/pygccxml/binary_parsers/parsers.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pygccxml_dev/pygccxml/binary_parsers/parsers.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -70,14 +70,14 @@ def load_symbols( self ): """loads public( shared ) symbols from the binary file. - This method should be overiden in the derived classes. + This method should be overridden in the derived classes. """ raise NotImplementedError() def merge( self, symbol): """extracts and merges information from the symbol to the declarations tree. - This method should be overiden in the derived classes. + This method should be overridden in the derived classes. """ raise NotImplementedError() @@ -132,7 +132,7 @@ formated_mapping_parser_t.__init__( self, global_ns, map_file_path, 'msvc' ) def load_symbols( self ): - """returns dictionary { decorated symbol : orignal declaration name }""" + """returns dictionary { decorated symbol : original declaration name }""" f = file( self.binary_file ) lines = [] was_exports = False Modified: pygccxml_dev/pygccxml/binary_parsers/undname.py =================================================================== --- pygccxml_dev/pygccxml/binary_parsers/undname.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pygccxml_dev/pygccxml/binary_parsers/undname.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -8,7 +8,7 @@ unique names and map them to the declarations On Windows: - ctypes package is used to call UnDecorateSymbolName function from dbghelp.dll + ctypes package is used to call `UnDecorateSymbolName` function from `dbghelp.dll` On Linux: "nm" utility is used. @@ -21,7 +21,7 @@ from pygccxml import declarations class UNDECORATE_NAME_OPTIONS: - """defines few constants for UnDecorateSymbolName function""" + """defines few constants for `UnDecorateSymbolName` function""" UNDNAME_COMPLETE = 0x0000 #Enables full undecoration. UNDNAME_NO_LEADING_UNDERSCORES = 0x0001 #Removes leading underscores from Microsoft extended keywords. @@ -200,12 +200,12 @@ def format_decl(self, decl, hint=None): """returns string, which contains full function name formatted exactly as - result of dbghelp.UnDecorateSymbolName, with UNDNAME_NO_MS_KEYWORDS | UNDNAME_NO_ACCESS_SPECIFIERS | UNDNAME_NO_ECSU + result of `dbghelp.UnDecorateSymbolName`, with UNDNAME_NO_MS_KEYWORDS | UNDNAME_NO_ACCESS_SPECIFIERS | UNDNAME_NO_ECSU options. - Different compilers\utilities undecorate/demangle magled string ( unique names ) in a different way. - hint argument will tell pygccxml how to format declarations, so it couls be mapped later to the blob. - The valid options are" msvc, nm + Different compilers\utilities undecorate/demangle mangled string ( unique names ) in a different way. + `hint` argument will tell pygccxml how to format declarations, so they could be mapped later to the blobs. + The valid options are: "msvc" and "nm". """ name = None if hint is None: Modified: pyplusplus_dev/pyplusplus/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/__init__.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/__init__.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -15,7 +15,7 @@ in the headers. You can then modify (decorate) this tree to customize the bindings. After that, a I{code creators} tree is created where each node represents a block of C++ source code. So you can change any piece of -code befor it is written to disk. As a last step, these source code blocks are +code before it is written to disk. As a last step, these source code blocks are finally written into one or more C++ source files, which can then be compiled to generate the final Python module. @@ -40,7 +40,7 @@ if not hasattr( pygccxml, '__revision__' ) or pygccxml.__revision__ < 1080: msg = 'This revision of `Py++` requieres pygccxml revision to be ' \ 'greater or equal to %d. ' \ - 'Please install right pygccxml version.' + 'Please install right pygccxml version.' raise AssertionError( msg % pygccxml.__revision__ ) #Known issues: Modified: pyplusplus_dev/pyplusplus/_logging_/multi_line_formatter.py =================================================================== --- pyplusplus_dev/pyplusplus/_logging_/multi_line_formatter.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/_logging_/multi_line_formatter.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -66,15 +66,15 @@ def formatMessage(msgline, width=70): """Format a long single line message so that it is easier to read. - msgline is a string containing a single message. It can either be - a plain message string which is reformatted using the textwrap + `msgline` is a string containing a single message. It can either be + a plain message string which is reformatted using the :mod:`textwrap` module or it can be of the form <declaration>;<message> where <declaration> is the declaration string and <message> an arbitrary message. Lines of this form will be separated so that the declaration and the message appear in individual text blocks, where every line of message will start with '>' character. - width is the maximum width of any text blocks (without indendation). + width is the maximum width of any text blocks (without indentation). """ txts = msgline.split(";") # Ensure that there are no more than two items in txts Modified: pyplusplus_dev/pyplusplus/code_creators/class_declaration.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -325,10 +325,9 @@ def _get_system_files_impl( self ): return [] -#open question: should I put class wrapper under some specifiec namespace? class class_wrapper_t( scoped.scoped_t ): """ - Creates C++ code that creates wrapper arround some class + creates C++ code, which creates wrapper around a class """ def __init__(self, declaration, class_creator ): Modified: pyplusplus_dev/pyplusplus/code_creators/code_creator.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/code_creator.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/code_creators/code_creator.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -17,9 +17,9 @@ The purpose of a code creator is the generation of a block of C++ source code as it will appear in the final source code for the - extension module. The source code is obtained by calling the L{create()} - method. Derived classes must implement the L{_create_impl()} method - which is called by the create() method. + extension module. The source code is obtained by calling the :meth:`code_creator_t.create` + method. Derived classes must implement the :meth:`code_creator_t._create_impl` method + which is called by the :meth:`code_creator_t.create` method. """ PYPLUSPLUS_NS_NAME = 'pyplusplus' __INDENTATION = ' ' @@ -101,7 +101,7 @@ def create(self): """ generates source code - + :rtype: str """ code = self._create_impl() @@ -197,8 +197,8 @@ :type line: str :param language: the programming language, the line was written in. Possible values: C++, Python :type line: str - - :rtype: bool + + :rtype: bool """ assert isinstance( line, types.StringTypes ) l = line.lstrip() Modified: pyplusplus_dev/pyplusplus/code_creators/enum.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/enum.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/code_creators/enum.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -12,7 +12,7 @@ class enum_t( registration_based.registration_based_t , declaration_based.declaration_based_t ): """ - Creates boost.python code that expose C++ enum + create code that exposes C++ enumeration """ def __init__(self, enum ): registration_based.registration_based_t.__init__( self ) Modified: pyplusplus_dev/pyplusplus/code_creators/include_directories.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/include_directories.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/code_creators/include_directories.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -10,8 +10,8 @@ class include_directories_t(instruction.instruction_t): """ The instance of this class holds a list of user defined directories. - L{include_t} and {precompiled_header_t} code creators use it to generate - relative include directives. + :class:`code_creators.include_t` and :class:`code_creators.precompiled_header_t` + code creators use it to generate relative include directives. """ def __init__(self): instruction.instruction_t.__init__(self) @@ -21,7 +21,7 @@ @staticmethod def normalize( path ): return os.path.normpath( os.path.normcase( path ) ) - + def _get_user_defined(self): self._user_defined = map( self.normalize, self._user_defined ) return self._user_defined @@ -41,7 +41,7 @@ headers.append( self.normalize( header ) ) dname = os.path.commonprefix( headers ) return dname in headers[:-1] - + def is_user_defined(self, header): return not self.is_std( header ) @@ -62,15 +62,14 @@ headers = self.std + self.user_defined answer = self._remove_common_prefix( header, headers ) return answer.replace( '\\', '/' ) - + def _generate_description(self): desc = ["std directories: " + pprint.pformat( self.std )] - temp = pprint.pformat( self.user_defined ) + temp = pprint.pformat( self.user_defined ) if os.linesep not in temp: #fixing bug on windows where linesep == \n\r #while pformat uses \n temp = temp.replace( '\n', os.linesep ) desc.append( "user defined directories: " + temp ) return os.linesep.join( desc ) - - \ No newline at end of file + Modified: pyplusplus_dev/pyplusplus/code_creators/member_variable.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/member_variable.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/code_creators/member_variable.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -167,7 +167,7 @@ class member_variable_wrapper_t( code_creator.code_creator_t , declaration_based.declaration_based_t ): """ - Creates C++ code that creates accessor for pointer class variables + creates get/set accessors for class variables, that has type pointer """ #TODO: give user a way to set call policies # treat void* pointer @@ -316,7 +316,7 @@ class bit_field_wrapper_t( code_creator.code_creator_t , declaration_based.declaration_based_t ): """ - Creates C++ code that creates accessor for bit fields + creates get/set accessors for bit fields """ indent = code_creator.code_creator_t.indent @@ -431,13 +431,9 @@ return [] -#TODO: generated fucntion should be static and take instance of the wrapped class -#as first argument. class array_mv_wrapper_t( code_creator.code_creator_t , declaration_based.declaration_based_t ): - """ - Creates C++ code that register array class. - """ + """registers array class""" def __init__(self, variable ): code_creator.code_creator_t.__init__( self ) @@ -499,7 +495,7 @@ class mem_var_ref_t( member_variable_base_t ): """ - Creates C++ code that creates accessor for class member variable, that has type reference. + creates get/set accessors for class member variable, that has type reference. """ def __init__(self, variable, wrapper ): member_variable_base_t.__init__( self, variable=variable, wrapper=wrapper ) @@ -554,7 +550,7 @@ class mem_var_ref_wrapper_t( code_creator.code_creator_t , declaration_based.declaration_based_t ): """ - Creates C++ code that creates accessor for class member variable, that has type reference. + creates get/set accessors for class member variable, that has type reference. """ indent = code_creator.code_creator_t.indent Modified: pyplusplus_dev/pyplusplus/code_creators/name_mappings.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/name_mappings.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/code_creators/name_mappings.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -8,7 +8,7 @@ class name_mappings_t(code_creator.code_creator_t): - """creates dictionery { [un]decorated name : [un]decorated name }""" + """creates dictionary { [un]decorated name : [un]decorated name }""" def __init__( self, exported_symbols ): code_creator.code_creator_t.__init__(self) Modified: pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -12,14 +12,14 @@ templates = declarations.templates class held_type_t(object): - """ Helper class that can hold name of smart_ptr type and create + """ Helper class that can hold name of `smart_ptr` type and create identifier for held type from that given a creator. """ def __init__( self, smart_ptr ): - """ smart_ptr: string of ptr type. Ex: 'boost::shared_ptr' """ + """ smart_ptr: string of ptr type. Ex: `boost::shared_ptr`""" object.__init__( self ) self._smart_ptr = smart_ptr - + def _get_smart_ptr( self ): return self._smart_ptr def _set_smart_ptr( self, ptr ): @@ -28,26 +28,28 @@ def create( self, creator): """ Return string of type to use for held type. - Ex: boost::shared_ptr<Class> + Ex: `boost::shared_ptr` class """ smart_ptr = algorithm.create_identifier( creator, self.smart_ptr ) arg = algorithm.create_identifier( creator, creator.declaration.decl_string ) return templates.join( smart_ptr, [ arg ] ) - + class smart_pointer_registrator_t( registration_based.registration_based_t , declaration_based.declaration_based_t ): - """ Convertor for boost::python::register_ptr_to_python<PTR>. - Lets boost python know that it can use smart_ptr to hold a an object. - See: http://www.boost.org/libs/python/doc/v2/register_ptr_to_python.html """ + Converter for `boost::python::register_ptr_to_python`. + + Lets boost python know that it can use `smart_ptr` to hold a an object. + See: http://www.boost.org/libs/python/doc/v2/register_ptr_to_python.html + """ def __init__( self, smart_ptr, class_creator ): - """ smart_ptr: string of ptr type. Ex: 'boost::shared_ptr' """ + """`smart_ptr`: string of pointer type. Ex: `boost::shared_ptr`""" registration_based.registration_based_t.__init__( self ) declaration_based.declaration_based_t.__init__( self, class_creator.declaration ) self._smart_ptr = smart_ptr self._class_creator = class_creator self.works_on_instance = False - + def _get_smart_ptr( self ): return self._smart_ptr def _set_smart_ptr( self, ptr ): @@ -60,7 +62,7 @@ self._class_creator = cc class_creator = property( _get_class_creator, _set_class_creator ) - def _create_impl(self): + def _create_impl(self): if self.declaration.already_exposed: return '' if self.class_creator \ @@ -76,7 +78,7 @@ def _get_system_files_impl( self ): return [] - + class smart_pointers_converter_t( registration_based.registration_based_t , declaration_based.declaration_based_t ): """ creator for boost::python::implicitly_convertible. @@ -94,27 +96,26 @@ def _get_target(self): return self._target target = property( _get_target ) - + def _get_source(self): return self.declaration source = property( _get_source ) - + def _get_smart_ptr( self ): return self._smart_ptr def _set_smart_ptr( self, ptr ): self._smart_ptr = ptr - smart_ptr = property( _get_smart_ptr, _set_smart_ptr ) + smart_ptr = property( _get_smart_ptr, _set_smart_ptr ) def _instantiate_smart_ptr( self, decl ): identifier = algorithm.create_identifier( self, decl.partial_decl_string ) return templates.join( self.smart_ptr, [identifier] ) - - def _create_impl(self): + + def _create_impl(self): implicitly_convertible = algorithm.create_identifier( self, '::boost::python::implicitly_convertible' ) from_arg = self._instantiate_smart_ptr( self.source ) to_arg = self._instantiate_smart_ptr( self.target ) - return templates.join(implicitly_convertible, [ from_arg, to_arg ] ) + '();' - + return templates.join(implicitly_convertible, [ from_arg, to_arg ] ) + '();' + def _get_system_files_impl( self ): return [] - \ No newline at end of file Modified: pyplusplus_dev/pyplusplus/creators_factory/bpcreator.py =================================================================== --- pyplusplus_dev/pyplusplus/creators_factory/bpcreator.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/creators_factory/bpcreator.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -204,9 +204,10 @@ assert not "unknown instace of registrator: " % str( registered ) def _treat_smart_pointers( self ): - """ Go to all class creators and apply held_type and creator registrators - as needed. """ + goes over all class creators and apply held_type and registers smart pointers + classes as needed + """ find_classes = code_creators.creator_finder.find_by_class_instance class_creators = find_classes( what=code_creators.class_t , where=self.__extmodule.body.creators @@ -324,8 +325,8 @@ create and return the module for the extension - code creators tree root. :param decl_headers: If None the headers for the wrapped decls are automatically found. - But you can pass a list of headers here to override that search. - @rtype: :class:`code_creators.module_t` + But you can pass a list of headers here to override that search. + :rtype: :class:`code_creators.module_t` """ # Invoke the appropriate visit_*() method on all decls for decl in self.__decls: Modified: pyplusplus_dev/pyplusplus/creators_factory/types_database.py =================================================================== --- pyplusplus_dev/pyplusplus/creators_factory/types_database.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/creators_factory/types_database.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -15,11 +15,11 @@ self.__variables = {} # decl_string : [type] self.__return_types = {} # decl_string : [type] self.__arguments_types = {} #decl_string : [type] - self.__smart_ptrs = [ 'shared_ptr', 'auto_ptr' ] + self.__smart_ptrs = [ 'shared_ptr', 'auto_ptr' ] self.__fundamental_strs = declarations.FUNDAMENTAL_TYPES.keys() self.__normalize_data = [ ',', '<', '>', '*', '&', '(', ')', '::' ] self.__containers = set() - + def update( self, decl ): if isinstance( decl, declarations.calldef_t ): if not isinstance( decl, declarations.constructor_t ): @@ -30,13 +30,13 @@ self._update_db( self.__variables, decl.type ) else: assert not "types_database_t class can not process " + str( decl ) - + def _is_relevant(self, decl_string): for smart_ptr in self.__smart_ptrs: if smart_ptr in decl_string: return True return False - + def _is_relevant_inst( self, name, args ): return self._is_relevant( name ) @@ -53,68 +53,68 @@ #will return True is type was treated type_ = declarations.remove_alias( type_ ) type_ = declarations.remove_pointer( type_ ) - type_ = declarations.remove_reference( type_ ) - type_ = declarations.remove_cv( type_ ) - type_ = declarations.remove_declarated( type_ ) - + type_ = declarations.remove_reference( type_ ) + type_ = declarations.remove_cv( type_ ) + type_ = declarations.remove_declarated( type_ ) + class_traits = declarations.class_traits class_declaration_traits = declarations.class_declaration_traits if not class_traits.is_my_case( type_ ) and not class_declaration_traits.is_my_case( type_ ): return False - + if class_traits.is_my_case( type_ ): container_cls = class_traits.get_declaration( type_ ) else: container_cls = class_declaration_traits.get_declaration( type_ ) - + if None is container_cls.indexing_suite: return False - - try: + + try: #check extraction of element type from container container_cls.indexing_suite.element_type except RuntimeError: decls_logger = _logging_.loggers.declarations if not messages.filter_disabled_msgs([messages.W1042], container_cls.disabled_messages ): - return #user disabled property warning - decls_logger.warn( "%s;%s" % ( container_cls, messages.W1042 ) ) + return #user disabled property warning + decls_logger.warn( "%s;%s" % ( container_cls, messages.W1042 ) ) self.__containers.add( container_cls ) return True - + def _update_db( self, db, type_ ): if self._update_containers_db( type_ ): return - decl_string = self._normalize( declarations.base_type( type_ ).decl_string ) + decl_string = self._normalize( declarations.base_type( type_ ).decl_string ) if not templates.is_instantiation( decl_string ): - return + return if not self._is_relevant( decl_string ): return insts = filter( lambda inst: self._is_relevant_inst( inst[0], inst[1] ) - , templates.split_recursive( decl_string ) ) + , templates.split_recursive( decl_string ) ) for smart_ptr, args in insts: - assert len( args ) == 1 + assert len( args ) == 1 pointee = self._normalize( args[0] ) if not db.has_key(pointee): db[ pointee ] = [] smart_ptr = self._normalize( smart_ptr ) if (smart_ptr, type_) not in db[pointee]: db[ pointee ].append( (smart_ptr, type_) ) - + def _find_smart_ptrs( self, db, class_decl ): decl_string = self._normalize( class_decl.decl_string ) if db.has_key( decl_string ): return db[ decl_string ] else: return None - + def create_holder( self, class_decl ): #holder should be created when we pass object created in python #as parameter to function in C++ that takes the smart pointer by reference found = self._find_smart_ptrs( self.__arguments_types, class_decl ) if not found: return None#not found or ambiguty - + held_type = None for smart_ptr, type_ in found: if declarations.is_reference( type_ ) and not declarations.is_const( type_.base ): @@ -122,7 +122,7 @@ if not held_type or 'shared_ptr' in smart_ptr: held_type = temp return held_type - + def _create_registrators_from_db( self, db, class_creator, registered ): spregistrator_t = code_creators.smart_pointer_registrator_t found = self._find_smart_ptrs( db, class_creator.declaration ) @@ -133,11 +133,14 @@ , registered ) if not already_registered: registered.append( spregistrator_t( smart_ptr=smart_ptr, class_creator=class_creator) ) - + def create_registrators( self, class_creator ): - """ Look for places where the class may be used as smart_ptr. - - If found then create smart_pointer_registrator_t for that class and ptr type. """ + looks for all places where the class may be used as smart pointer. + + If found, then creates :class:`code_creators.smart_pointer_registrator_t` + for that class and pointer type. + """ spconverter_t = code_creators.smart_pointers_converter_t registrators = [] dbs = [ self.__arguments_types, self.__return_types, self.__variables ] @@ -163,20 +166,20 @@ , target=class_creator.declaration ) answer.append( converter ) return answer - + def _print_single_db(self, db): for decl_string in db.keys(): print 'decl_string : ', decl_string for smart_ptr, type_ in db[ decl_string ]: print ' smart_ptr : ', smart_ptr print ' type_ : ', type_.decl_string - + def print_db( self ): dbs = [ self.__arguments_types, self.__return_types, self.__variables ] for db in dbs: self._print_single_db( db ) - + def _get_used_containers( self ): return self.__containers used_containers = property( _get_used_containers) - + Modified: pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -14,7 +14,7 @@ from pyplusplus import function_transformers as ft class calldef_t(decl_wrapper.decl_wrapper_t): - """base class, for code generator configration, for function declaration classes.""" + """base class, for code generator configuration, for function declaration classes.""" BOOST_PYTHON_MAX_ARITY = 10 """Boost.Python configuration macro value. @@ -125,13 +125,14 @@ @property def non_overridable_reason( self ): - """returns the reason the function could not be overriden""" + """returns the reason the function could not be overridden""" return self._non_overridable_reason def mark_as_non_overridable( self, reason ): - """mark this function as non-overridable + """ + mark this function as final - user will not be able to override it from Python - Not all fucntions could be overrided from Python, for example virtual function + Not all functions could be overridden from Python, for example virtual function that returns non const reference to a member variable. `Py++` allows you to mark these functions and provide and explanation to the user. """ @@ -248,7 +249,7 @@ self._default_precall_code = [] def add_override_precall_code(self, code): - """add code, which should be executed, before overrided member function call""" + """add code, which should be executed, before overridden member function call""" self._override_precall_code.append( code ) @property Modified: pyplusplus_dev/pyplusplus/decl_wrappers/typedef_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/typedef_wrapper.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/decl_wrappers/typedef_wrapper.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -12,7 +12,7 @@ """defines a set of properties, that will instruct `Py++` how to expose the typedef Today, `Py++` does not exposes typedefs, but this could be changed in future. - In C++, it is a common practises to give an aliases to the class. May be in + In C++, it is a common practices to give an aliases to the class. May be in future, `Py++` will generate code, that will register all those aliases. """ @@ -20,7 +20,7 @@ declarations.typedef_t.__init__(self, *arguments, **keywords ) decl_wrapper.decl_wrapper_t.__init__( self ) self.__is_directive = None - + @property def is_directive( self ): if None is self.__is_directive: Modified: pyplusplus_dev/pyplusplus/file_writers/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/__init__.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/file_writers/__init__.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -4,16 +4,7 @@ # http://www.boost.org/LICENSE_1_0.txt) """ -This package contains few classes, that writes L{code_creators.module_t} to files. - -Right now 3 strategies were implemented: - - 1. All code is written in one file - - 2. Classic strategy of deviding classes to files: one class in one header + source files. - - 2.1 Huge classes are splitten to few source files. - +This package contains few classes, which write :class:`code_creators.module_t` to files. """ import types @@ -47,7 +38,7 @@ return mfs.written_files def write_balanced_files( extmodule, dir_path, number_of_buckets, files_sum_repository=None, encoding='ascii' ): - """writes extmodule to fixed number of multiple cpp files""" + """writes extmodule to fixed number of multiple .cpp files""" mfs = balanced_files_t( extmodule, dir_path, number_of_buckets, files_sum_repository=files_sum_repository, encoding=encoding ) mfs.write() return mfs.written_files Modified: pyplusplus_dev/pyplusplus/file_writers/balanced_files.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/balanced_files.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/file_writers/balanced_files.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -3,7 +3,7 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -"""defines a class that writes L{code_creators.bpmodule_t} to multiple files""" +"""defines a class that writes :class:`code_creators.bpmodule_t` to multiple files""" import os import math @@ -34,7 +34,7 @@ """Constructor. :param extmodule: The root of a code creator tree - :type extmodule: bpmodule_t + :type extmodule: :class:`code_creators.bpmodule_t` :param directory_path: The output directory where the source files are written :type directory_path: str @@ -48,15 +48,15 @@ def split_classes( self ): class_creators = filter( lambda x: isinstance(x, ( code_creators.class_t, code_creators.class_declaration_t ) ) , self.extmodule.body.creators ) - - class_creators = filter( lambda cc: not cc.declaration.already_exposed + + class_creators = filter( lambda cc: not cc.declaration.already_exposed , class_creators ) - - buckets = split_sequence(class_creators, len(class_creators)/self.number_of_buckets ) + + buckets = split_sequence(class_creators, len(class_creators)/self.number_of_buckets ) if len(buckets) > self.number_of_buckets: buckets[len(buckets)-2] += buckets[len(buckets)-1] - buckets = buckets[:len(buckets)-1] - + buckets = buckets[:len(buckets)-1] + for index, bucket in enumerate( buckets ): self.split_creators( bucket , '_classes_%d' % (index+1) Modified: pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/file_writers/class_multiple_files.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -3,7 +3,7 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -"""defines a class that writes L{code_creators.bpmodule_t} to multiple files, the class +"""defines a class that writes :class:`code_creators.bpmodule_t` to multiple files, the class also splits huge C++ classes to few source files """ @@ -24,7 +24,7 @@ 2. pyplusplus will generate wrapper header - header that will contain code generated for class wrappers classes h/cpp - will contain registration code for internal classes - memfun h/cpp - will contain registration code for member functions + `memfun` h/cpp - will contain registration code for member functions alias + _main h/cpp this class will contain main registration function. """ @@ -69,7 +69,7 @@ creators = [class_creator] if class_creator.wrapper: creators.append( class_creator.wrapper ) - + answer.append( self.create_include_code( creators ) ) answer.append( '' ) answer.append( self.create_namespaces_code( creators ) ) Modified: pyplusplus_dev/pyplusplus/file_writers/multiple_files.py =================================================================== --- pyplusplus_dev/pyplusplus/file_writers/multiple_files.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/file_writers/multiple_files.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -3,7 +3,7 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -"""defines a class that writes L{code_creators.bpmodule_t} to multiple files""" +"""defines a class that writes :class:`code_creators.bpmodule_t` to multiple files""" import os import writer @@ -117,8 +117,6 @@ :param file_name: A string that uniquely identifies the file name :type file_name: str - :param function_name: The name of the register_xyz() function - :type function_name: str :rtype: str """ tmpl = os.linesep.join([ @@ -221,10 +219,12 @@ :param file_name: The base name of the corresponding include file (without extension) :type file_name: str - :param function_name: The name of the register_xyz() function + + :param function_name: "register" function name :type function_name: str - :param creators: The code creators that create the register_xyz() function - :type creators: list of code_creator_t + + :param creators: "register" function code creators + :type creators: list of :class:`code_creators.code_creator_t` :rtype: str """ declaration_creators = [] @@ -334,12 +334,15 @@ """Write non-class creators into a particular .h/.cpp file. :param creators: The code creators that should be written - :type creators: list of code_creator_t + :type creators: list of :class:`code_creators.code_creator_t` + :param pattern: Name pattern that is used for constructing the final output file name :type pattern: str - :param function_name: The name of the register_xyz() function + + :param function_name: "register" function name :type function_name: str - :param registrator_pos: The position of the code creator that creates the code to invoke the register_xyz() function. + + :param registrator_pos: The position of the code creator that creates the code to invoke the "register" function. :type registrator_pos: int """ if not creators: @@ -385,17 +388,18 @@ creators = filter( lambda x: isinstance(x, free_functions ), self.extmodule.body.creators ) self.split_creators( creators, '_free_functions', 'register_free_functions', -1 ) - #TODO: move write_main to __init__ def write(self): - """ Write out the module. - Creates a separate source/header combo for each class and for enums, globals, - and free functions. - If write_main is True it writes out a main file that calls all the registration methods. - After this call split_header_names and split_method_names will contain - all the header files and registration methods used. This can be used by - user code to create custom registration methods if main is not written. """ + writes out the module. + Creates a separate source/header combo for each class and for enumerations, + globals and free functions. + If :meth:`write_main` is True it writes out a main file that calls all the registration methods. + After this call :meth:`split_header_names` and :meth:`split_method_names` + will contain all the header files and registration methods used. This + can be used by user code to create custom registration methods if main is not written. + """ + self.write_code_repository( self.__directory_path ) self.save_exposed_decls_db( self.__directory_path ) Modified: pyplusplus_dev/pyplusplus/function_transformers/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/function_transformers/__init__.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/function_transformers/__init__.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -1,21 +1,7 @@ # Helper classes for wrapper function creation -"""This sub-package provides text substitution services for creating C++ functions. +"""This sub-package implements function transformation functionality""" -The helper classes in this package are meant to be used by the actual -calldef code creators (that are not part of this sub-package). They -implement the core of the "arg policy" mechanism which can be used by -a user to modify the source code for a function. - -The main class of this sub-package is the class L{substitution_manager_t}. This -class maintains two sets of special variables, one for the wrapper function -and one for the virtual function, and provides text substitution services. -The variables contain parts of source code that can be inserted into the -function source code template which is generated by the user of the class. - - -""" - from transformer import transformer_t import transformers from function_transformation import function_transformation_t Modified: pyplusplus_dev/pyplusplus/function_transformers/transformer.py =================================================================== --- pyplusplus_dev/pyplusplus/function_transformers/transformer.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/function_transformers/transformer.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -14,15 +14,15 @@ class transformer_t(object): """Base class for a function transformer.""" - + USE_1_BASED_INDEXING = False - + def __init__(self, function): """:param function: reference to function declaration""" object.__init__( self ) self.__function = function - @property + @property def function( self ): """reference to the function, for which a wrapper will be generated""" return self.__function @@ -33,7 +33,7 @@ def get_argument( self, reference ): """returns reference to the desired argument - + :param reference: name( str ) or index( int ) of the argument """ if isinstance( reference, str ): @@ -49,9 +49,9 @@ def get_type( self, reference ): """returns type of the desired argument or return type of the function - + :param reference: name( str ) or index( int ) of the argument - """ + """ global return_ if isinstance( reference, int ) and reference == return_: return self.function.return_type @@ -59,35 +59,36 @@ return self.get_argument( reference ).type def configure_mem_fun( self, controller ): - """Transformers should overridde the method, in order to define custom + """Transformers should override the method, in order to define custom transformation for non-virtual member function. - - :param controller: instance of L{mem_fun_controller_t} class + + :param controller: instance of :class:`mem_fun_controller_t` class """ raise NotImplementedError(self.__class__.__name__) - + def configure_free_fun( self, controller ): - """Transformers should overridde the method, in order to define custom + """ + transformers should override the method, in order to define custom transformation for free function. - + :param controller: instance of L{free_fun_controller_t} class - """ + """ raise NotImplementedError(self.__class__.__name__) - + def configure_virtual_mem_fun( self, controller ): - """Transformers should overridde the method, in order to define custom + """Transformers should override the method, in order to define custom transformation for virtual member function. - - :param controller: instance of L{virtual_mem_fun_controller_t} class - """ + + :param controller: instance of :class:`virtual_mem_fun_controller_t` class + """ raise NotImplementedError(self.__class__.__name__) #TODO: FT for constructor #~ def configure_constructor( self, controller ): - #~ """Transformers should overridde the method, in order to define custom + #~ """Transformers should override the method, in order to define custom #~ transformation for constructor. - + #~ :param controller: instance of L{constructor_controller_t} class - #~ """ + #~ """ #~ raise NotImplementedError(self.__class__.__name__) - + Modified: pyplusplus_dev/pyplusplus/function_transformers/transformers.py =================================================================== --- pyplusplus_dev/pyplusplus/function_transformers/transformers.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/function_transformers/transformers.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -5,17 +5,8 @@ # # Initial author: Matthias Baas -"""This module contains the standard argument policy objects. +"""defines few argument transformation classes""" -The following policies are available: - - - L{output_t} - - L{input_t} - - L{inout_t} - - L{input_array_t} - - L{output_array_t} - - L{type_modifier_t} -""" import os import string import transformer @@ -56,7 +47,7 @@ The specified argument must be a reference or a pointer. - :param arg_ref: Index of the argument that is an output value (the first arg has index 1). + :param arg_ref: Index of the argument that is an output value. :type arg_ref: int """ self.arg = self.get_argument( arg_ref ) @@ -155,15 +146,12 @@ The reference on the specified variable is removed. - void setValue(int& v) -> setValue(v) + void set_value(int& v) -> void set_value(int v) """ def __init__(self, function, arg_ref): - """Constructor. - - The specified argument must be a reference or a pointer. - - :param idx: Index of the argument that is an output value (the first arg has index 1). + """ + :param idx: Index of the argument that is an output value. :type idx: int """ type_modifier_t.__init__( self, function, arg_ref, remove_ref_or_ptr ) @@ -180,10 +168,9 @@ """Handles a single input variable. Replaces the actual argument type with some integral type, so you - can use ctypes package. + could use :mod:`ctypes` package. - void do_smth(int** image) -> do_smth(unsigned int addressof_image) - + void do_something(int** image) -> do_something(unsigned int image_address) """ def __init__(self, function, arg_ref): @@ -191,7 +178,7 @@ The specified argument must be a reference or a pointer. - :param idx: Index of the argument that is an output value (the first arg has index 1). + :param idx: Index of the argument that is an output value. :type idx: int """ modifier = lambda type_: declarations.FUNDAMENTAL_TYPES[ 'unsigned int' ] @@ -204,11 +191,10 @@ def __str__(self): return "from_address(%s)"%(self.arg.name) -# inout_t class inout_t(transformer.transformer_t): """Handles a single input/output variable. - void foo(int& v) -> v = foo(v) + void do_something(int& v) -> v = do_something(v) """ def __init__(self, function, arg_ref): @@ -216,7 +202,7 @@ The specified argument must be a reference or a pointer. - :param idx: Index of the argument that is an in/out value (the first arg has index 1). + :param idx: Index of the argument that is an in/out value :type idx: int """ transformer.transformer_t.__init__( self, function ) @@ -276,8 +262,9 @@ class input_static_array_t(transformer.transformer_t): """Handles an input array with fixed size. - void setVec3(double* v) -> setVec3(object v) - # v must be a sequence of 3 floats + void do_something(double* v) -> do_something(object v2) + + where v2 is a Python sequence """ def __init__(self, function, arg_ref, size): @@ -360,7 +347,7 @@ def __init__(self, function, arg_ref, size): """Constructor. - :param idx: Index of the argument that is an output array (the first arg has index 1). + :param idx: Index of the argument that is an output array. :type idx: int :param size: The fixed size of the output array :type size: int @@ -441,7 +428,7 @@ class input_c_buffer_t(transformer.transformer_t): - """Handles an input of C buffere: + """handles an input of C buffer: void write( byte *buffer, int size ) -> void write( python sequence ) """ Modified: pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py =================================================================== --- pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py 2009-02-08 08:23:25 UTC (rev 1661) +++ pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py 2009-02-08 13:53:58 UTC (rev 1662) @@ -67,7 +67,7 @@ :param gccxml_config: instance of pygccxml.parser.config_t class, holds gccxml( compiler ) configuration. You can use this argument instead of - passing the compiler configuration separatly. + passing the compiler configuration separately. """ module_builder.module_builder_t.__init__( self, global_ns=None, encoding=encoding ) @@ -247,7 +247,7 @@ @property def code_creator( self ): - "reference to L{code_creators.bpmodule_t} instance" + "reference to :class:`code_creators.bpmodule_t` instance" if not self.__code_creator: raise RuntimeError( "self.module is equal to None. Did you forget to call build_code_creator function?" ) return self.__code_creator Modified: sphinx/ignore_dictionary.txt =================================================================== --- sphinx/ignore_dictionary.txt 2009-02-08 08:23:25 UTC (rev 1661) +++ sphinx/ignore_dictionary.txt 2009-02-08 13:53:58 UTC (rev 1662) @@ -27,3 +27,15 @@ gcc noncopyable Bierbaum +ctypes +dll +cpp +pdb +bsc +undecorate +Beltrame +Kunstleve +Grosse +msvc +demangle +demangled This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-08 08:23:28
|
Revision: 1661 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1661&view=rev Author: roman_yakovenko Date: 2009-02-08 08:23:25 +0000 (Sun, 08 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pygccxml_dev/unittests/autoconfig.py pyplusplus_dev/pyplusplus/messages/__init__.py pyplusplus_dev/unittests/autoconfig.py sphinx/conf.py Added Paths: ----------- sphinx/ignore_dictionary.txt Removed Paths: ------------- pygccxml_dev/unittests/ignore_dictionary.txt pyplusplus_dev/unittests/ignore_dictionary.txt Modified: pygccxml_dev/unittests/autoconfig.py =================================================================== --- pygccxml_dev/unittests/autoconfig.py 2009-02-08 06:21:39 UTC (rev 1660) +++ pygccxml_dev/unittests/autoconfig.py 2009-02-08 08:23:25 UTC (rev 1661) @@ -7,20 +7,11 @@ import sys import getpass - - #~ os.environ['PYCHECKER'] = '--limit=1000 -q --no-argsused' #~ import pychecker.checker this_module_dir_path = os.path.abspath ( os.path.dirname( sys.modules[__name__].__file__) ) -sys.path.append( os.path.abspath( os.path.join( this_module_dir_path, '..', '..', 'pydsc_dev' ) ) ) - -import pydsc -pydsc.ignore_dictionary( 'ignore_dictionary.txt' ) -pydsc.set_text_preprocessor( pydsc.sphinx_preprocessor ) -pydsc.include_paths( os.path.join( this_module_dir_path, '..', '..', 'pygccxml_dev' ) ) - data_directory = os.path.join( this_module_dir_path, 'data' ) build_directory = os.path.join( this_module_dir_path, 'temp' ) Deleted: pygccxml_dev/unittests/ignore_dictionary.txt =================================================================== --- pygccxml_dev/unittests/ignore_dictionary.txt 2009-02-08 06:21:39 UTC (rev 1660) +++ pygccxml_dev/unittests/ignore_dictionary.txt 2009-02-08 08:23:25 UTC (rev 1661) @@ -1,29 +0,0 @@ -Yakovenko -org -www -txt -http -bool -const -JNI -jboolean -jbyte -jchar -jdouble -jfloat -jint -jlong -jshort -GCC -wchar -TODO -namespace -namespaces -str -pygccxml -GCCXML -gccxml -GCC -gcc -noncopyable -Bierbaum Modified: pyplusplus_dev/pyplusplus/messages/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/messages/__init__.py 2009-02-08 06:21:39 UTC (rev 1660) +++ pyplusplus_dev/pyplusplus/messages/__init__.py 2009-02-08 08:23:25 UTC (rev 1661) @@ -3,9 +3,11 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -"""This package defines all user messages( warnings + errors ), which will be +"""This package defines all user messages( warnings + errors ), which will be reported to user. """ + +import warnings_ from warnings_ import * def find_out_message_id( msg ): @@ -21,11 +23,11 @@ def filter_disabled_msgs( msgs, disable_messages=None ): report = [] - + skip_them = DISABLE_MESSAGES[:] if disable_messages: skip_them.extend( disable_messages ) - + skip_them = filter( None, map( find_out_message_id, skip_them ) ) for msg in msgs: Modified: pyplusplus_dev/unittests/autoconfig.py =================================================================== --- pyplusplus_dev/unittests/autoconfig.py 2009-02-08 06:21:39 UTC (rev 1660) +++ pyplusplus_dev/unittests/autoconfig.py 2009-02-08 08:23:25 UTC (rev 1661) @@ -9,17 +9,8 @@ import unittest import subprocess - this_module_dir_path = os.path.abspath ( os.path.dirname( sys.modules[__name__].__file__) ) -sys.path.append( os.path.abspath( os.path.join( this_module_dir_path, '..', '..', 'pydsc_dev' ) ) ) - -#~ import pydsc -#~ pydsc.ignore_dictionary( os.path.join( this_module_dir_path, 'ignore_dictionary.txt' ) ) -#~ pydsc.set_text_preprocessor( pydsc.sphinx_preprocessor ) -#~ pydsc.include_paths( os.path.join( this_module_dir_path, '..', '..', 'pyplusplus_dev' ) ) - - data_directory = os.path.join( this_module_dir_path, 'data' ) build_directory = os.path.join( this_module_dir_path, 'temp' ) build_dir = build_directory Deleted: pyplusplus_dev/unittests/ignore_dictionary.txt =================================================================== --- pyplusplus_dev/unittests/ignore_dictionary.txt 2009-02-08 06:21:39 UTC (rev 1660) +++ pyplusplus_dev/unittests/ignore_dictionary.txt 2009-02-08 08:23:25 UTC (rev 1661) @@ -1,29 +0,0 @@ -Yakovenko -org -www -txt -http -bool -const -JNI -jboolean -jbyte -jchar -jdouble -jfloat -jint -jlong -jshort -GCC -wchar -TODO -namespace -namespaces -str -pygccxml -GCCXML -gccxml -GCC -gcc -noncopyable -Bierbaum Modified: sphinx/conf.py =================================================================== --- sphinx/conf.py 2009-02-08 06:21:39 UTC (rev 1660) +++ sphinx/conf.py 2009-02-08 08:23:25 UTC (rev 1661) @@ -48,9 +48,15 @@ else: shutil.copy( os.path.join( project_root, 'index.rest' ), doc_project_root ) -#disable import replacment -#os.environ['PYDSC'] = 'sphinx' +import pydsc +#report errors related to the project only +pydsc.include_paths( project_root ) +pydsc.ignore_dictionary( 'ignore_dictionary.txt' ) +pydsc.set_text_preprocessor( pydsc.sphinx_preprocessor ) +import pygccxml +import pyplusplus + # General configuration # --------------------- Added: sphinx/ignore_dictionary.txt =================================================================== --- sphinx/ignore_dictionary.txt (rev 0) +++ sphinx/ignore_dictionary.txt 2009-02-08 08:23:25 UTC (rev 1661) @@ -0,0 +1,29 @@ +Yakovenko +org +www +txt +http +bool +const +JNI +jboolean +jbyte +jchar +jdouble +jfloat +jint +jlong +jshort +GCC +wchar +TODO +namespace +namespaces +str +pygccxml +GCCXML +gccxml +GCC +gcc +noncopyable +Bierbaum This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-08 06:21:44
|
Revision: 1660 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1660&view=rev Author: roman_yakovenko Date: 2009-02-08 06:21:39 +0000 (Sun, 08 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pyplusplus_dev/docs/documentation/apidocs/api.rest Added Paths: ----------- pyplusplus_dev/docs/documentation/apidocs/_logging_.rest pyplusplus_dev/docs/documentation/apidocs/code_creators.rest pyplusplus_dev/docs/documentation/apidocs/code_repository/ pyplusplus_dev/docs/documentation/apidocs/code_repository/indexing_suite.rest pyplusplus_dev/docs/documentation/apidocs/code_repository.rest pyplusplus_dev/docs/documentation/apidocs/creators_factory.rest pyplusplus_dev/docs/documentation/apidocs/decl_wrappers.rest pyplusplus_dev/docs/documentation/apidocs/file_writers.rest pyplusplus_dev/docs/documentation/apidocs/function_transformers.rest pyplusplus_dev/docs/documentation/apidocs/messages.rest pyplusplus_dev/docs/documentation/apidocs/module_builder.rest pyplusplus_dev/docs/documentation/apidocs/utils.rest Added: pyplusplus_dev/docs/documentation/apidocs/_logging_.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/_logging_.rest (rev 0) +++ pyplusplus_dev/docs/documentation/apidocs/_logging_.rest 2009-02-08 06:21:39 UTC (rev 1660) @@ -0,0 +1,10 @@ +============================ +pyplusplus._logging_ package +============================ + +multi_line_formatter +-------------------- + +.. automodule:: pyplusplus._logging_.multi_line_formatter + :members: + :show-inheritance: Modified: pyplusplus_dev/docs/documentation/apidocs/api.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/api.rest 2009-02-05 14:12:02 UTC (rev 1659) +++ pyplusplus_dev/docs/documentation/apidocs/api.rest 2009-02-08 06:21:39 UTC (rev 1660) @@ -2,8 +2,18 @@ API === -`Py++` consists from XXX sub packages +`Py++` consists from few sub packages .. toctree:: :maxdepth: 4 + module_builder.rest + decl_wrappers.rest + file_writers.rest + function_transformers.rest + messages.rest + utils.rest + _logging_.rest + code_creators.rest + code_repository.rest + creators_factory.rest Added: pyplusplus_dev/docs/documentation/apidocs/code_creators.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/code_creators.rest (rev 0) +++ pyplusplus_dev/docs/documentation/apidocs/code_creators.rest 2009-02-08 06:21:39 UTC (rev 1660) @@ -0,0 +1,270 @@ +================================ +pyplusplus.code_creators package +================================ + +algorithm +--------- + +.. automodule:: pyplusplus.code_creators.algorithm + :members: + :show-inheritance: + +array_1_registrator +------------------- + +.. automodule:: pyplusplus.code_creators.array_1_registrator + :members: + :show-inheritance: + +bookmark +-------- + +.. automodule:: pyplusplus.code_creators.bookmark + :members: + :show-inheritance: + +calldef +------- + +.. automodule:: pyplusplus.code_creators.calldef + :members: + :show-inheritance: + +calldef_ctypes +-------------- + +.. automodule:: pyplusplus.code_creators.calldef_ctypes + :members: + :show-inheritance: + +calldef_transformed +------------------- + +.. automodule:: pyplusplus.code_creators.calldef_transformed + :members: + :show-inheritance: + +calldef_utils +------------- + +.. automodule:: pyplusplus.code_creators.calldef_utils + :members: + :show-inheritance: + +class_declaration +----------------- + +.. automodule:: pyplusplus.code_creators.class_declaration + :members: + :show-inheritance: + +code_creator +------------ + +.. automodule:: pyplusplus.code_creators.code_creator + :members: + :show-inheritance: + +compound +-------- + +.. automodule:: pyplusplus.code_creators.compound + :members: + :show-inheritance: + +ctypes_formatter +---------------- + +.. automodule:: pyplusplus.code_creators.ctypes_formatter + :members: + :show-inheritance: + +ctypes_integration_creators +--------------------------- + +.. automodule:: pyplusplus.code_creators.ctypes_integration_creators + :members: + :show-inheritance: + +ctypes_module +------------- + +.. automodule:: pyplusplus.code_creators.ctypes_module + :members: + :show-inheritance: + +custom +------ + +.. automodule:: pyplusplus.code_creators.custom + :members: + :show-inheritance: + +declaration_based +----------------- + +.. automodule:: pyplusplus.code_creators.declaration_based + :members: + :show-inheritance: + +embedded_code_repository +------------------------ + +.. automodule:: pyplusplus.code_creators.embedded_code_repository + :members: + :show-inheritance: + +enum +---- + +.. automodule:: pyplusplus.code_creators.enum + :members: + :show-inheritance: + +exception_translator +-------------------- + +.. automodule:: pyplusplus.code_creators.exception_translator + :members: + :show-inheritance: + +global_variable +--------------- + +.. automodule:: pyplusplus.code_creators.global_variable + :members: + :show-inheritance: + +include +------- + +.. automodule:: pyplusplus.code_creators.include + :members: + :show-inheritance: + +include_directories +------------------- + +.. automodule:: pyplusplus.code_creators.include_directories + :members: + :show-inheritance: + +indexing_suites +--------------- + +.. automodule:: pyplusplus.code_creators.indexing_suites + :members: + :show-inheritance: + +instruction +----------- + +.. automodule:: pyplusplus.code_creators.instruction + :members: + :show-inheritance: + +library_reference +----------------- + +.. automodule:: pyplusplus.code_creators.library_reference + :members: + :show-inheritance: + +license +------- + +.. automodule:: pyplusplus.code_creators.license + :members: + :show-inheritance: + +member_variable +--------------- + +.. automodule:: pyplusplus.code_creators.member_variable + :members: + :show-inheritance: + +module +------ + +.. automodule:: pyplusplus.code_creators.module + :members: + :show-inheritance: + +module_body +----------- + +.. automodule:: pyplusplus.code_creators.module_body + :members: + :show-inheritance: + +namespace +--------- + +.. automodule:: pyplusplus.code_creators.namespace + :members: + :show-inheritance: + +name_mappings +------------- + +.. automodule:: pyplusplus.code_creators.name_mappings + :members: + :show-inheritance: + +opaque_type_registrator +----------------------- + +.. automodule:: pyplusplus.code_creators.opaque_type_registrator + :members: + :show-inheritance: + +properties +---------- + +.. automodule:: pyplusplus.code_creators.properties + :members: + :show-inheritance: + +registration_based +------------------ + +.. automodule:: pyplusplus.code_creators.registration_based + :members: + :show-inheritance: + +scoped +------ + +.. automodule:: pyplusplus.code_creators.scoped + :members: + :show-inheritance: + +smart_pointers +-------------- + +.. automodule:: pyplusplus.code_creators.smart_pointers + :members: + :show-inheritance: + +target_configuration +-------------------- + +.. automodule:: pyplusplus.code_creators.target_configuration + :members: + :show-inheritance: + +typedef_as_pyvar +---------------- + +.. automodule:: pyplusplus.code_creators.typedef_as_pyvar + :members: + :show-inheritance: + +unnamed_enum +------------ + +.. automodule:: pyplusplus.code_creators.unnamed_enum + :members: + :show-inheritance: + Added: pyplusplus_dev/docs/documentation/apidocs/code_repository/indexing_suite.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/code_repository/indexing_suite.rest (rev 0) +++ pyplusplus_dev/docs/documentation/apidocs/code_repository/indexing_suite.rest 2009-02-08 06:21:39 UTC (rev 1660) @@ -0,0 +1,187 @@ +================================================= +pyplusplus.code_repository.indexing_suite package +================================================= + +deque_header +------------ + +.. automodule:: pyplusplus.code_repository.indexing_suite.deque_header + :members: + :show-inheritance: + +element_proxy_header +-------------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.element_proxy_header + :members: + :show-inheritance: + +element_proxy_traits_header +--------------------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.element_proxy_traits_header + :members: + :show-inheritance: + +int_slice_helper_header +----------------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.int_slice_helper_header + :members: + :show-inheritance: + +iterator_range_header +--------------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.iterator_range_header + :members: + :show-inheritance: + +iterator_traits_header +---------------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.iterator_traits_header + :members: + :show-inheritance: + +list_header +----------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.list_header + :members: + :show-inheritance: + +map_header +---------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.map_header + :members: + :show-inheritance: + +methods_header +-------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.methods_header + :members: + :show-inheritance: + +multimap_header +--------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.multimap_header + :members: + :show-inheritance: + +pair_header +----------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.pair_header + :members: + :show-inheritance: + +proxy_iterator_header +--------------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.proxy_iterator_header + :members: + :show-inheritance: + +python_iterator_header +---------------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.python_iterator_header + :members: + :show-inheritance: + +set_header +---------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.set_header + :members: + :show-inheritance: + +shared_proxy_impl_header +------------------------ + +.. automodule:: pyplusplus.code_repository.indexing_suite.shared_proxy_impl_header + :members: + :show-inheritance: + +slice_handler_header +-------------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.slice_handler_header + :members: + :show-inheritance: + +slice_header +------------ + +.. automodule:: pyplusplus.code_repository.indexing_suite.slice_header + :members: + :show-inheritance: + +suite_utils_header +------------------ + +.. automodule:: pyplusplus.code_repository.indexing_suite.suite_utils_header + :members: + :show-inheritance: + +value_traits_header +------------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.value_traits_header + :members: + :show-inheritance: + +vector_header +------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.vector_header + :members: + :show-inheritance: + +visitor_header +-------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.visitor_header + :members: + :show-inheritance: + +workaround_header +----------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.workaround_header + :members: + :show-inheritance: + +algorithms_header +----------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.algorithms_header + :members: + :show-inheritance: + +container_proxy_header +---------------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.container_proxy_header + :members: + :show-inheritance: + +container_suite_header +---------------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.container_suite_header + :members: + :show-inheritance: + +container_traits_header +----------------------- + +.. automodule:: pyplusplus.code_repository.indexing_suite.container_traits_header + :members: + :show-inheritance: + + Added: pyplusplus_dev/docs/documentation/apidocs/code_repository.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/code_repository.rest (rev 0) +++ pyplusplus_dev/docs/documentation/apidocs/code_repository.rest 2009-02-08 06:21:39 UTC (rev 1660) @@ -0,0 +1,39 @@ +================================== +pyplusplus.code_repository package +================================== + +sub-packages +------------ + +.. toctree:: + + code_repository/indexing_suite.rest + +ctypes_integration +------------------ + +.. automodule:: pyplusplus.code_repository.ctypes_integration + :members: + :show-inheritance: + +ctypes_utils +------------ + +.. automodule:: pyplusplus.code_repository.ctypes_utils + :members: + :show-inheritance: + +gil_guard +--------- + +.. automodule:: pyplusplus.code_repository.gil_guard + :members: + :show-inheritance: + +named_tuple +----------- + +.. automodule:: pyplusplus.code_repository.named_tuple + :members: + :show-inheritance: + Added: pyplusplus_dev/docs/documentation/apidocs/creators_factory.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/creators_factory.rest (rev 0) +++ pyplusplus_dev/docs/documentation/apidocs/creators_factory.rest 2009-02-08 06:21:39 UTC (rev 1660) @@ -0,0 +1,67 @@ +=================================== +pyplusplus.creators_factory package +=================================== + +bpcreator +--------- + +.. automodule:: pyplusplus.creators_factory.bpcreator + :members: + :show-inheritance: + +call_policies_resolver +---------------------- + +.. automodule:: pyplusplus.creators_factory.call_policies_resolver + :members: + :show-inheritance: + +creators_wizard +--------------- + +.. automodule:: pyplusplus.creators_factory.creators_wizard + :members: + :show-inheritance: + +ctypes_creator +-------------- + +.. automodule:: pyplusplus.creators_factory.ctypes_creator + :members: + :show-inheritance: + +dependencies_manager +-------------------- + +.. automodule:: pyplusplus.creators_factory.dependencies_manager + :members: + :show-inheritance: + +fake_constructors_manager +------------------------- + +.. automodule:: pyplusplus.creators_factory.fake_constructors_manager + :members: + :show-inheritance: + +opaque_types_manager +-------------------- + +.. automodule:: pyplusplus.creators_factory.opaque_types_manager + :members: + :show-inheritance: + +sort_algorithms +--------------- + +.. automodule:: pyplusplus.creators_factory.sort_algorithms + :members: + :show-inheritance: + +types_database +-------------- + +.. automodule:: pyplusplus.creators_factory.types_database + :members: + :show-inheritance: + Added: pyplusplus_dev/docs/documentation/apidocs/decl_wrappers.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/decl_wrappers.rest (rev 0) +++ pyplusplus_dev/docs/documentation/apidocs/decl_wrappers.rest 2009-02-08 06:21:39 UTC (rev 1660) @@ -0,0 +1,122 @@ +================================ +pyplusplus.decl_wrappers package +================================ + +algorithm +--------- + +.. automodule:: pyplusplus.decl_wrappers.algorithm + :members: + :show-inheritance: + +calldef_wrapper +--------------- + +.. automodule:: pyplusplus.decl_wrappers.calldef_wrapper + :members: + :show-inheritance: + +call_policies +------------- + +.. automodule:: pyplusplus.decl_wrappers.call_policies + :members: + :show-inheritance: + +class_wrapper +------------- + +.. automodule:: pyplusplus.decl_wrappers.class_wrapper + :members: + :show-inheritance: + +decl_wrapper +------------ + +.. automodule:: pyplusplus.decl_wrappers.decl_wrapper + :members: + :show-inheritance: + +decl_wrapper_printer +-------------------- + +.. automodule:: pyplusplus.decl_wrappers.decl_wrapper_printer + :members: + :show-inheritance: + +doc_extractor +------------- + +.. automodule:: pyplusplus.decl_wrappers.doc_extractor + :members: + :show-inheritance: + +enumeration_wrapper +------------------- + +.. automodule:: pyplusplus.decl_wrappers.enumeration_wrapper + :members: + :show-inheritance: + +indexing_suite1 +--------------- + +.. automodule:: pyplusplus.decl_wrappers.indexing_suite1 + :members: + :show-inheritance: + +indexing_suite2 +--------------- + +.. automodule:: pyplusplus.decl_wrappers.indexing_suite2 + :members: + :show-inheritance: + +namespace_wrapper +----------------- + +.. automodule:: pyplusplus.decl_wrappers.namespace_wrapper + :members: + :show-inheritance: + +properties +---------- + +.. automodule:: pyplusplus.decl_wrappers.properties + :members: + :show-inheritance: + +python_traits +------------- + +.. automodule:: pyplusplus.decl_wrappers.python_traits + :members: + :show-inheritance: + +scopedef_wrapper +---------------- + +.. automodule:: pyplusplus.decl_wrappers.scopedef_wrapper + :members: + :show-inheritance: + +typedef_wrapper +--------------- + +.. automodule:: pyplusplus.decl_wrappers.typedef_wrapper + :members: + :show-inheritance: + +user_text +--------- + +.. automodule:: pyplusplus.decl_wrappers.user_text + :members: + :show-inheritance: + +variable_wrapper +---------------- + +.. automodule:: pyplusplus.decl_wrappers.variable_wrapper + :members: + :show-inheritance: Added: pyplusplus_dev/docs/documentation/apidocs/file_writers.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/file_writers.rest (rev 0) +++ pyplusplus_dev/docs/documentation/apidocs/file_writers.rest 2009-02-08 06:21:39 UTC (rev 1660) @@ -0,0 +1,46 @@ +=============================== +pyplusplus.file_writers package +=============================== + +balanced_files +-------------- + +.. automodule:: pyplusplus.file_writers.balanced_files + :members: + :show-inheritance: + +class_multiple_files +-------------------- + +.. automodule:: pyplusplus.file_writers.class_multiple_files + :members: + :show-inheritance: + +md5sum_repository +----------------- + +.. automodule:: pyplusplus.file_writers.md5sum_repository + :members: + :show-inheritance: + +multiple_files +-------------- + +.. automodule:: pyplusplus.file_writers.multiple_files + :members: + :show-inheritance: + +single_file +----------- + +.. automodule:: pyplusplus.file_writers.single_file + :members: + :show-inheritance: + +writer +------ + +.. automodule:: pyplusplus.file_writers.writer + :members: + :show-inheritance: + Added: pyplusplus_dev/docs/documentation/apidocs/function_transformers.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/function_transformers.rest (rev 0) +++ pyplusplus_dev/docs/documentation/apidocs/function_transformers.rest 2009-02-08 06:21:39 UTC (rev 1660) @@ -0,0 +1,40 @@ +Pyplusplus\Function_Transformers Documentation +============================================== +======================================== +pyplusplus.function_transformers package +======================================== + +controllers +----------- + +.. automodule:: pyplusplus.function_transformers.controllers + :members: + :show-inheritance: + +function_transformation +----------------------- + +.. automodule:: pyplusplus.function_transformers.function_transformation + :members: + :show-inheritance: + +templates +--------- + +.. automodule:: pyplusplus.function_transformers.templates + :members: + :show-inheritance: + +transformer +----------- + +.. automodule:: pyplusplus.function_transformers.transformer + :members: + :show-inheritance: + +transformers +------------ + +.. automodule:: pyplusplus.function_transformers.transformers + :members: + :show-inheritance: Added: pyplusplus_dev/docs/documentation/apidocs/messages.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/messages.rest (rev 0) +++ pyplusplus_dev/docs/documentation/apidocs/messages.rest 2009-02-08 06:21:39 UTC (rev 1660) @@ -0,0 +1,19 @@ +Pyplusplus\Messages Documentation +================================= + +This page contains the Pyplusplus\Messages Package documentation. + +The :mod:`messages.warnings_` Modules +------------------------------------- + +.. automodule:: messages.warnings_ + :members: + :show-inheritance: + +The :mod:`pyplusplus\messages` Package +-------------------------------------- + +.. automodule:: pyplusplus\messages + :members: + :show-inheritance: + Added: pyplusplus_dev/docs/documentation/apidocs/module_builder.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/module_builder.rest (rev 0) +++ pyplusplus_dev/docs/documentation/apidocs/module_builder.rest 2009-02-08 06:21:39 UTC (rev 1660) @@ -0,0 +1,31 @@ +================================= +pyplusplus.module_builder package +================================= + +boost_python_builder +-------------------- + +.. automodule:: pyplusplus.module_builder.boost_python_builder + :members: + :show-inheritance: + +ctypes_builder +-------------- + +.. automodule:: pyplusplus.module_builder.ctypes_builder + :members: + :show-inheritance: + +ctypes_decls_dependencies +------------------------- + +.. automodule:: pyplusplus.module_builder.ctypes_decls_dependencies + :members: + :show-inheritance: + +module_builder +-------------- + +.. automodule:: pyplusplus.module_builder.module_builder + :members: + :show-inheritance: Added: pyplusplus_dev/docs/documentation/apidocs/utils.rest =================================================================== --- pyplusplus_dev/docs/documentation/apidocs/utils.rest (rev 0) +++ pyplusplus_dev/docs/documentation/apidocs/utils.rest 2009-02-08 06:21:39 UTC (rev 1660) @@ -0,0 +1,3 @@ +======================== +pyplusplus.utils package +======================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2009-02-05 14:12:10
|
Revision: 1659 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1659&view=rev Author: roman_yakovenko Date: 2009-02-05 14:12:02 +0000 (Thu, 05 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pydsc_dev/pydsc.py pydsc_dev/unittests/to_be_tested.py pygccxml_dev/pygccxml/declarations/call_invocation.py pygccxml_dev/pygccxml/declarations/container_traits.py pygccxml_dev/pygccxml/declarations/decl_printer.py pygccxml_dev/pygccxml/declarations/declaration.py pygccxml_dev/pygccxml/declarations/enumeration.py pygccxml_dev/pygccxml/declarations/function_traits.py pygccxml_dev/pygccxml/declarations/matchers.py pygccxml_dev/pygccxml/declarations/scopedef.py pygccxml_dev/pygccxml/declarations/type_traits.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/project_reader.py pygccxml_dev/pygccxml/parser/source_reader.py pygccxml_dev/unittests/data/core_cache.hpp pyplusplus_dev/contrib/pypp_api/pypp_api/argpolicy.py pyplusplus_dev/contrib/pypp_api/pypp_api/declwrapper.py pyplusplus_dev/contrib/pypp_api/pypp_api/filters.py pyplusplus_dev/contrib/pypp_api/pypp_api/modulebuilder.py pyplusplus_dev/contrib/pypp_api/pypp_api/treerange.py pyplusplus_dev/pyplusplus/__init__.py pyplusplus_dev/pyplusplus/_logging_/__init__.py pyplusplus_dev/pyplusplus/_logging_/multi_line_formatter.py pyplusplus_dev/pyplusplus/code_creators/code_creator.py pyplusplus_dev/pyplusplus/code_creators/compound.py pyplusplus_dev/pyplusplus/code_creators/include.py pyplusplus_dev/pyplusplus/code_creators/module.py pyplusplus_dev/pyplusplus/creators_factory/bpcreator.py pyplusplus_dev/pyplusplus/creators_factory/creators_wizard.py pyplusplus_dev/pyplusplus/creators_factory/ctypes_creator.py pyplusplus_dev/pyplusplus/creators_factory/dependencies_manager.py pyplusplus_dev/pyplusplus/creators_factory/sort_algorithms.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/enumeration_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite1.py pyplusplus_dev/pyplusplus/decl_wrappers/namespace_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/scopedef_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/typedef_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py pyplusplus_dev/pyplusplus/file_writers/__init__.py pyplusplus_dev/pyplusplus/file_writers/multiple_files.py pyplusplus_dev/pyplusplus/file_writers/writer.py pyplusplus_dev/pyplusplus/function_transformers/controllers.py pyplusplus_dev/pyplusplus/messages/warnings_.py pyplusplus_dev/pyplusplus/module_builder/__init__.py pyplusplus_dev/pyplusplus/module_builder/boost_python_builder.py pyplusplus_dev/pyplusplus/module_builder/ctypes_builder.py pyplusplus_dev/pyplusplus/module_builder/module_builder.py pyplusplus_dev/unittests/autoconfig.py pyplusplus_dev/unittests/unicode_bug.py sphinx/conf.py Added Paths: ----------- pygccxml_dev/unittests/ignore_dictionary.txt pyplusplus_dev/unittests/ignore_dictionary.txt Modified: pydsc_dev/pydsc.py =================================================================== --- pydsc_dev/pydsc.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pydsc_dev/pydsc.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -25,9 +25,11 @@ import re import sys import pprint +import atexit import inspect import __builtin__ -from enchant import checker +import enchant +import enchant.checker def normalize_path( some_path ): """return os.path.normcase( os.path.normpath( some_path ) )""" @@ -48,6 +50,19 @@ #precondition: dirs and fpath should be normalize_path'ed before calling this function return bool( filter( lambda dir: path.startswith( dir ), dirs ) ) + +#~ class DynamicIdentifiersFilter( enchant.tokenize.Filter): + #~ _pattern = re.compile(r"^.+@[^\.].*\.[a-z]{2,}$") + #~ def __init__( self, *args, **keywd ): + #~ super( DynamicIdentifiersFilter, self ).__init__( self, *args, **keywd ) + #~ self.global_identifiers = set() + #~ self.local_identifiers = set() + + #~ def _skip(self,word): + #~ if self._pattern.match(word): + #~ return True + #~ return False + def is_identifier( word ): """ returns `True` is the word represents an identifier, constructed from two or more words, `False` otherwise. @@ -76,9 +91,9 @@ def __init__( self , speller - , writer=None + , writer=sys.stdout , ignore_identifiers=True - , text_preprocessor=None ): + , text_preprocessor=lambda t: t ): """ initialization method @@ -110,17 +125,15 @@ __builtin__.__import__ = self.import_ self.__already_imported = set( sys.modules.keys() ) self.__checked = set() + self.__reported_errors = set() self.speller = speller self.writer = writer - if self.writer is None: - self.writer = sys.stdout self.__include_paths = set() self.ignored_words = set() self.add_include_paths( '.') self.ignore_identifiers = ignore_identifiers self.text_preprocessor = text_preprocessor - if not self.text_preprocessor: - self.text_preprocessor = lambda t: t + atexit.register( self.report_statistics ) def add_include_paths( self, path ): np = lambda p: normalize_path( os.path.abspath( p ) ) @@ -190,8 +203,10 @@ def __check_text_impl( self, obj, text_, text_type ): text = self.text_preprocessor( text_ ) + if not text: return + if self.ignore_identifiers and hasattr( obj, '__name__' ) and obj.__name__: self.ignored_words.add( obj.__name__ ) @@ -204,25 +219,34 @@ continue if is_identifier( error.word ): continue - if not errors.has_key( error.word ): - errors[ error.word ] = [] + fpath = self.getsourcefile( inspect.getmodule( obj ) ) + if fpath: + error_id = "%s:%s:%d" % ( error.word, fpath, inspect.getsourcelines( obj )[1] ) + if error_id in self.__reported_errors: + continue + else: + self.__reported_errors.add( error_id ) errors[ error.word ] = self.speller.suggest() + if not errors: return + write = self.writer.write if self.getsourcefile( inspect.getmodule( obj ) ): write( ' error details: %s' % os.linesep ) - write( ' location : %s:%d%s' % ( self.getsourcefile( inspect.getmodule( obj ) ), 1 + inspect.getsourcelines( obj )[1], os.linesep ) ) - write( ' text type : %s%s' % ( text_type, os.linesep ) ) + write( ' location : %s:%d%s' % ( self.getsourcefile( inspect.getmodule( obj ) ), 1 + inspect.getsourcelines( obj )[1], os.linesep ) ) + write( ' text type : %s%s' % ( text_type, os.linesep ) ) else: write( ' error details: %s' % os.linesep ) - write( ' text type : %s%s' % ( text_type, os.linesep ) ) + write( ' text type : %s%s' % ( text_type, os.linesep ) ) for word, suggestions in errors.items(): - write( ' misspelled word: %s%s' % ( word, os.linesep ) ) - write( ' suggestions : %s%s' % ( `suggestions`, os.linesep ) ) - clean = lambda t: t.replace( '\n', ' ' ).replace( '\r', '' ) - write( ' source file text: %s\n' % clean( text_ ) ) - write( ' checked text : %s\n' % clean( text ) ) + write( ' misspelled word : %s%s' % ( word, os.linesep ) ) + write( ' suggestions : %s%s' % ( `suggestions`, os.linesep ) ) + if 1: #debug code + clean = lambda t: t.replace( '\n', ' ' ).replace( '\r', '' ) + write( ' source file text: %s\n' % clean( text_ ) ) + write( ' checked text : %s\n' % clean( text ) ) + write( ' object : %s\n' % str(obj) ) def __check_text( self, obj): self.__check_text_impl( obj, inspect.getdoc( obj ), 'documentation string' ) @@ -243,13 +267,31 @@ to_be_checked.extend( map( lambda x: x[1], inspect.getmembers( member ) ) ) self.__checked.add( id(member) ) + def report_statistics( self ): + words = {} + print '\n' + print 'pydsc report' + print ' errors found: ', len( self.__reported_errors ) + for error_id in self.__reported_errors: + word = error_id.split( ':' )[0] + if word not in words: + words[ word ] = [] + words[ word ].append( error_id[ len(word) + 1: ] ) + for word, occurs in words.iteritems(): + print ' ', word, ' - ', len( occurs ) + occurs.sort() + for location in occurs: + print ' ', location + print 'pydsc report - end' + + """documentation spell checker instance""" doc_checker = None -if 'PYDSC' in os.environ: - if not 'sphinx' in os.environ['PYDSC']: - doc_checker = checker_t( checker.SpellChecker( "en_US" )) #, filters=[checker.EmailFilter,checker.URLFilter] ) ) -else: - doc_checker = checker_t( checker.SpellChecker( "en_US" ))#, filters=[checker.EmailFilter,checker.URLFilter, checker.WikiWordFilter] ) ) +if not( ('PYDSC' in os.environ) and ('sphinx' in os.environ['PYDSC']) ): + doc_checker = checker_t( enchant.checker.SpellChecker( "en_US" + , filters=[ enchant.tokenize.EmailFilter + , enchant.tokenize.URLFilter + , enchant.tokenize.WikiWordFilter ] ) ) def include_paths( what ): @@ -295,20 +337,37 @@ def set_text_preprocessor( preprocessor ): doc_checker.text_preprocessor = preprocessor -__ref_def = re.compile( r':[_a-zA-Z]+(\s+[_a-zA-Z]+)?:' ) -__ref_no_title = re.compile( r'`(\:\:)?[_a-zA-Z]+[_a-zA-Z0-9\.\:]*`' ) -__ref_with_title = re.compile( r'`(?P<text>.+)?\s(\<.*\>)`' ) +class sphinx_preprocessor_t: + __ref_def = re.compile( r':[_a-zA-Z]+(\s+[_a-zA-Z0-9]+)?:' ) + __ref_no_title = re.compile( r'`(\:\:)?[_a-zA-Z]+[_a-zA-Z0-9\.\:\+]*`' ) + __ref_with_title = re.compile( r'`(?P<text>.+)?\s(\<.*\>)`' ) -def sphinx_preprocessor( text ): - def replace( m ): - if 'text' in m.groupdict(): - return ' ' * ( m.start( 'text' ) - m.start() ) + m.group( 'text' ) + ' ' * ( m.end() - m.end( 'text' ) ) - else: - return ' ' * ( m.end() - m.start() ) - if not text: - return text - result = text - result = __ref_no_title.sub( replace, result ) - result = __ref_def.sub( replace, result ) - result = __ref_with_title.sub( replace, result ) - return result + + def __replace_via_re( self, text ): + def replace( m ): + if 'text' in m.groupdict(): + return ' ' * ( m.start( 'text' ) - m.start() ) + m.group( 'text' ) + ' ' * ( m.end() - m.end( 'text' ) ) + else: + return ' ' * ( m.end() - m.start() ) + if not text: + return text + result = text + result = self.__ref_no_title.sub( replace, result ) + result = self.__ref_def.sub( replace, result ) + result = self.__ref_with_title.sub( replace, result ) + return result + + #~ def __remove_code_block( self, text ): + #~ lines = map( lambda line: line.rstrip(), text.split( '\n' ) ) + + #~ no_code_lines = [] + + #~ index = 0 + #~ within_block = False + #~ indent_level = 0 + #~ while index < len( lines ): + + def __call__( self, text ): + return self.__replace_via_re( text ) + +sphinx_preprocessor = sphinx_preprocessor_t() Modified: pydsc_dev/unittests/to_be_tested.py =================================================================== --- pydsc_dev/unittests/to_be_tested.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pydsc_dev/unittests/to_be_tested.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -10,7 +10,7 @@ """ code_creator_t is the base class for all code creators. This class defines interface that every code creator should implement. - Also it provides few convinience functions. + Also it provides few convenience functions. qeqerqwerqwerqwer Modified: pygccxml_dev/pygccxml/declarations/call_invocation.py =================================================================== --- pygccxml_dev/pygccxml/declarations/call_invocation.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/declarations/call_invocation.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -11,10 +11,10 @@ .. code-block:: c++ - do_smth( x1, x2, x3 ) + do_something( x1, x2, x3 ) the parser will extract -- function name - `do_stmh` +- function name - `do_something` - argument names - `[ x1, x2, x3 ]` """ Modified: pygccxml_dev/pygccxml/declarations/container_traits.py =================================================================== --- pygccxml_dev/pygccxml/declarations/container_traits.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/declarations/container_traits.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -243,7 +243,7 @@ class container_traits_impl_t: - """this class implements the functionality needed for convinient work with + """this class implements the functionality needed for convenient work with STD container classes. Implemented functionality: Modified: pygccxml_dev/pygccxml/declarations/decl_printer.py =================================================================== --- pygccxml_dev/pygccxml/declarations/decl_printer.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/declarations/decl_printer.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -4,7 +4,7 @@ # http://www.boost.org/LICENSE_1_0.txt) """ -defines class, decl_printer_t that prints declarations tree in a user friendly format +defines class, :class:`decl_printer_t` that prints declarations tree in a user friendly format """ import os @@ -15,14 +15,8 @@ class decl_printer_t( decl_visitor.decl_visitor_t ): - """Helper class for printing decl tree. + """helper class for printing declarations tree""" - This class provides more information than the __str__() methods do. - The class is not just meant to provide a unique "id" for a declaration - but to inspect an entire declaration tree. This is particularly useful - for new users who want to find out how Py++ works and how it - stores its data. - """ JUSTIFY = 20 INDENT_SIZE = 4 @@ -125,7 +119,6 @@ self.writer( ' ' * curr_level * self.INDENT_SIZE + decorated_name + os.linesep) def print_calldef_info(self, decl=None): - """ Returns function signature: [retval, [arg1, ..., argN]]. """ if None is decl: decl = self.__inst @@ -277,9 +270,11 @@ , recursive=True , writer=lambda x: sys.stdout.write( x + os.linesep ) , verbose=True): - """ Print decl tree rooted at each of the included nodes. - decls - either a single decl or a list of decls. """ + print declarations tree rooted at each of the included nodes. + + :param decls: either a single :class:declaration_t object or list of :class:declaration_t objects + """ prn = decl_printer_t(0, detailed, recursive, writer, verbose=verbose) if type(decls) is not list: decls = [decls] Modified: pygccxml_dev/pygccxml/declarations/declaration.py =================================================================== --- pygccxml_dev/pygccxml/declarations/declaration.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/declarations/declaration.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -112,7 +112,7 @@ function will return true, if both declarations refers to the same object. This function could be implemented in terms of _get__cmp__data, but in this case it will downgrade performance. self.mangled property is not - compared, because it could be chaned from one compilation time to an + compared, because it could be changed from one compilation time to an other. """ if not isinstance( other, self.__class__ ): Modified: pygccxml_dev/pygccxml/declarations/enumeration.py =================================================================== --- pygccxml_dev/pygccxml/declarations/enumeration.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/declarations/enumeration.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -20,7 +20,7 @@ """creates class that describes C++ `enum` declaration The items of the list 'values' may either be strings containing - the enumeration value name or tuples (name, numvalue). + the enumeration value name or tuples (name, numeric value). :param name: `enum` name :type name: str Modified: pygccxml_dev/pygccxml/declarations/function_traits.py =================================================================== --- pygccxml_dev/pygccxml/declarations/function_traits.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/declarations/function_traits.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -69,7 +69,7 @@ Use case: sometimes when user defines some virtual function in base class, it overrides it in a derived one. Sometimes we need to know whether two member - functions is actualy same function. + functions is actually same function. """ if f1 is f2: return True Modified: pygccxml_dev/pygccxml/declarations/matchers.py =================================================================== --- pygccxml_dev/pygccxml/declarations/matchers.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/declarations/matchers.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -46,11 +46,14 @@ return "base class for all matchers" class and_matcher_t(matcher_base_t): - """Combine several other matchers with "&". + """ + Combine several other matchers with "&" (and) operator. For example: find all private functions with name XXX - C{ matcher = access_type_matcher_t( 'private' ) & calldef_matcher_t( name='XXX' ) } + .. code-block:: python + + matcher = access_type_matcher_t( 'private' ) & calldef_matcher_t( name='XXX' ) """ def __init__(self, matchers): matcher_base_t.__init__(self) @@ -67,12 +70,14 @@ class or_matcher_t(matcher_base_t): - """Combine several other matchers with "|". + """Combine several other matchers with "|" (or) operator. For example: find all functions and variables with name 'XXX' - C{ matcher = variable_matcher_t( name='XXX' ) | calldef_matcher_t( name='XXX' ) } + .. code-block:: python + matcher = variable_matcher_t( name='XXX' ) | calldef_matcher_t( name='XXX' ) + """ def __init__(self, matchers): matcher_base_t.__init__(self) @@ -325,16 +330,20 @@ :param return_type: callable return type :type return_type: string or instance of :class:`type_t` derived class - :param arg_types: list of function argument types. arg_types can contain. + :param arg_types: list of function argument types. `arg_types` can contain. Any item within the list could be string or instance of :class:`type_t` derived class. If you don't want some argument to participate in match you can put None. For example: - C{ calldef_matcher_t( arg_types=[ 'int &', None ] ) } + .. code-block:: python + calldef_matcher_t( arg_types=[ 'int &', None ] ) + will match all functions that takes 2 arguments, where the first one is reference to integer and second any + :type arg_types: list + """ if None is decl_type: decl_type = calldef.calldef_t @@ -475,7 +484,7 @@ def __init__( self, access_type ): """ :param access_type: declaration access type - :type access_type: :class:ACCESS_TYPES defines few consts for your convinience. + :type access_type: :class:ACCESS_TYPES defines few constants for your convenience. Any way you can pass public, private or protected as argument to this function """ matcher_base_t.__init__( self ) Modified: pygccxml_dev/pygccxml/declarations/scopedef.py =================================================================== --- pygccxml_dev/pygccxml/declarations/scopedef.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/declarations/scopedef.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -455,7 +455,7 @@ , recursive=recursive ) def calldefs( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ): - """returns a set of calldef declarations, that are matched defined criteria""" + """returns a set of :class:`calldef_t` declarations, that are matched defined criteria""" return self._find_multiple( self._impl_matchers[ scopedef_t.calldef ] , name=name , function=function Modified: pygccxml_dev/pygccxml/declarations/type_traits.py =================================================================== --- pygccxml_dev/pygccxml/declarations/type_traits.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/declarations/type_traits.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -304,7 +304,7 @@ or does_match_definition( type, cpptypes.fundamental_t, (cpptypes.volatile_t, cpptypes.const_t) ) \ class declaration_xxx_traits: - """this class implements the functionality needed for convinient work with + """this class implements the functionality needed for convenient work with declaration classes Implemented functionality: @@ -333,7 +333,7 @@ return self.__apply_sequence( type_ ) enum_traits = declaration_xxx_traits( enumeration.enumeration_t ) -"""implements functionality, needed for convinient work with C++ enums""" +"""implements functionality, needed for convenient work with C++ enums""" is_enum = enum_traits.is_my_case """returns True, if type represents C++ enumeration declaration, False otherwise""" @@ -342,13 +342,13 @@ """returns reference to enum declaration""" class_traits = declaration_xxx_traits( class_declaration.class_t ) -"""implements functionality, needed for convinient work with C++ classes""" +"""implements functionality, needed for convenient work with C++ classes""" is_class = class_traits.is_my_case """returns True, if type represents C++ class definition, False otherwise""" class_declaration_traits = declaration_xxx_traits( class_declaration.class_declaration_t ) -"""implements functionality, needed for convinient work with C++ class declarations""" +"""implements functionality, needed for convenient work with C++ class declarations""" is_class_declaration = class_declaration_traits.is_my_case """returns True, if type represents C++ class declaration, False otherwise""" @@ -1007,11 +1007,11 @@ class smart_pointer_traits: - """implements functionality, needed for convinient work with smart pointers""" + """implements functionality, needed for convenient work with smart pointers""" @staticmethod def is_smart_pointer( type_ ): - """returns True, if type represents instantiation of C{boost::shared_ptr}, False otherwise""" + """returns True, if type represents instantiation of `boost::shared_ptr`, False otherwise""" type_ = remove_alias( type_ ) type_ = remove_cv( type_ ) type_ = remove_declarated( type_ ) @@ -1023,17 +1023,17 @@ @staticmethod def value_type( type_ ): - """returns reference to boost::shared_ptr value type""" + """returns reference to `boost::shared_ptr` value type""" if not smart_pointer_traits.is_smart_pointer( type_ ): raise TypeError( 'Type "%s" is not instantiation of boost::shared_ptr' % type_.decl_string ) return internal_type_traits.get_by_name( type_, "value_type" ) class auto_ptr_traits: - """implements functionality, needed for convinient work with std::auto_ptr pointers""" + """implements functionality, needed for convenient work with `std::auto_ptr` pointers""" @staticmethod def is_smart_pointer( type_ ): - """returns True, if type represents instantiation of C{boost::shared_ptr}, False otherwise""" + """returns True, if type represents instantiation of `boost::shared_ptr`, False otherwise""" type_ = remove_alias( type_ ) type_ = remove_cv( type_ ) type_ = remove_declarated( type_ ) @@ -1045,14 +1045,14 @@ @staticmethod def value_type( type_ ): - """returns reference to boost::shared_ptr value type""" + """returns reference to `boost::shared_ptr` value type""" if not auto_ptr_traits.is_smart_pointer( type_ ): raise TypeError( 'Type "%s" is not instantiation of std::auto_ptr' % type_.decl_string ) return internal_type_traits.get_by_name( type_, "element_type" ) def is_std_string( type_ ): - """returns True, if type represents C++ std::string, False otherwise""" + """returns True, if type represents C++ `std::string`, False otherwise""" decl_strings = [ '::std::basic_string<char,std::char_traits<char>,std::allocator<char> >' , '::std::basic_string<char, std::char_traits<char>, std::allocator<char> >' @@ -1064,7 +1064,7 @@ return remove_cv( type_ ).decl_string in decl_strings def is_std_wstring( type_ ): - """returns True, if type represents C++ std::wstring, False otherwise""" + """returns True, if type represents C++ `std::wstring`, False otherwise""" decl_strings = [ '::std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >' , '::std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >' Modified: pygccxml_dev/pygccxml/parser/__init__.py =================================================================== --- pygccxml_dev/pygccxml/parser/__init__.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/parser/__init__.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -45,7 +45,7 @@ :type compilation_mode: L{COMPILATION_MODE} :param cache: Declaration cache (None=no cache) :type cache: L{cache_base_t} or str - @returns: Declarations + :rtype: Declarations """ if not config: config = config_t() Modified: pygccxml_dev/pygccxml/parser/config.py =================================================================== --- pygccxml_dev/pygccxml/parser/config.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/parser/config.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -3,8 +3,9 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -"""This module contains the implementation of the L{config_t} class. """ +defines C++ parser configuration classes +""" import os import sys @@ -12,18 +13,19 @@ import types class parser_configuration_t(object): - """Configuration object to collect parameters for invoking C++ parser + """ + C++ parser configuration holder This class serves as a base class for the parameters that can be used - to customize the call to C++ parser. This class also allows users to work with - relative files paths. In this case files are searched in the following order: + to customize the call to a C++ parser. - 1. current directory + This class also allows users to work with relative files paths. In this case + files are searched in the following order: - 2. working directory + 1. current directory + 2. working directory + 3. additional include paths specified by the user - 3. additional include paths specified by the user - """ def __init__( self , working_directory='.' Modified: pygccxml_dev/pygccxml/parser/declarations_cache.py =================================================================== --- pygccxml_dev/pygccxml/parser/declarations_cache.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/parser/declarations_cache.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -57,9 +57,11 @@ raise NotImplementedError() def update(self, source_file, configuration, declarations, included_files): - """ Update cache entry. + """ + update cache entry + :param source_file: path to the C++ source file being parsed - :param configuration: configuration used in parsing (config_t) + :param configuration: configuration used in parsing :class:`config_t` :param declarations: declaration tree found when parsing :param included_files: files included by parsing. """ @@ -69,7 +71,7 @@ """ Return declarations, we have cached, for the source_file and the given configuration. :param source_file: path to the C++ source file being parsed. - :param configuration: configuration to use for parsing (config_t) + :param configuration: configuration( :class:`config_t` ) that was used for parsing """ raise NotImplementedError() @@ -199,9 +201,10 @@ self.__needs_flushed = True def cached_value(self, source_file, configuration): - """ Attempt to lookup the cached decls for the given file and configuration. - If not found or signature check fails, returns None. """ + attempt to lookup the cached declarations for the given file and configuration. + If not found or signature check fails, returns None. + """ key = record_t.create_key(source_file, configuration) if not self.__cache.has_key( key ): return None Modified: pygccxml_dev/pygccxml/parser/directory_cache.py =================================================================== --- pygccxml_dev/pygccxml/parser/directory_cache.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/parser/directory_cache.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -29,11 +29,10 @@ """ def __init__( self, filesigs, configsig ): - """Constructor. - - filesigs is a list of tuples (fileid, sig)... - configsig is the signature of the configuration object. """ + :param filesigs: a list of tuples( `fileid`, `sig`)... + :param configsig: the signature of the configuration object. + """ self.filesigs = filesigs self.configsig = configsig @@ -45,9 +44,9 @@ class directory_cache_t ( declarations_cache.cache_base_t ): - """Cache class that stores its data as multiple files inside a directory. + """cache class that stores its data as multiple files inside a directory. - The cache stores one index file called "index.dat" which is always + The cache stores one index file called `index.dat` which is always read by the cache when the cache object is created. Each header file will have its corresponding *.cache file that stores the declarations found in the header file. The index file is used to determine whether @@ -57,13 +56,13 @@ """ def __init__( self, dir="cache", compression=False, md5_sigs=True ): - """Constructor. + """ + :param dir: cache directory path, it is created, if it does not exist - dir is the cache directory (it is created if it does not exist). - If compression is set to True the cache files will be compressed - using gzip. - md5_sigs determines whether file modifications is checked by - computing a md5 digest or by checking the modification date. + :param compression: if `True`, the cache files will be compressed using `gzip` + + :param md5_sigs: `md5_sigs` determines whether file modifications is checked + by computing a `md5` digest or by checking the modification date """ declarations_cache.cache_base_t.__init__(self) @@ -102,20 +101,18 @@ def flush(self): """Save the index table to disk.""" - self._save() -# self.__filename_rep._dump() def update(self, source_file, configuration, declarations, included_files): """Replace a cache entry by a new value. - :param source_file: Header file name. + :param source_file: a C++ source file name. :type source_file: str - :param configuration: Configuration object. - :type configuration: L{config_t} - :param declarations: Declarations contained in the header file. + :param configuration: configuration object. + :type configuration: :class:config_t + :param declarations: declarations contained in the `source_file` :type declarations: picklable object - :param included_files: Dependent files + :param included_files: included files :type included_files: list of str """ # Normlize all paths... @@ -224,10 +221,10 @@ self.__modified_flag = False def _save(self): - """Save the cache index if it was modified. + """ + save the cache index, in case it was modified. - Saves the index table and the file name repository in the file - index.dat. + Saves the index table and the file name repository in the file `index.dat` """ if self.__modified_flag: self.__filename_rep.update_id_counter() @@ -236,13 +233,14 @@ self.__modified_flag = False def _read_file(self, filename): - """Read a Python object from a cache file. + """ + read a Python object from a cache file. Reads a pickled object from disk and returns it. :param filename: Name of the file that should be read. :type filename: str - @returns: Unpickled file contents + :rtype: object """ if self.__compression: f = gzip.GzipFile(filename, "rb") @@ -283,7 +281,7 @@ :param source_file: Header file name :type source_file: str :param key: Key value for the specified header file - :type key: hashable object + :type key: hash table object """ entry = self.__index.get(key) @@ -307,29 +305,30 @@ def _create_cache_key(self, source_file): - """Return the cache key for a header file. + """ + return the cache key for a header file. :param source_file: Header file name :type source_file: str - @returns: Key for the given header file - @rtype: str + :rtype: str """ path, name = os.path.split(source_file) return name+str(hash(path)) def _create_cache_filename(self, source_file): - """Return the cache file name for a header file. + """ + return the cache file name for a header file. :param source_file: Header file name :type source_file: str - @returns: Cache file name (*.cache) - @rtype: str + :rtype: str """ res = self._create_cache_key(source_file)+".cache" return os.path.join(self.__dir, res) def _create_config_signature(self, config): - """Return the signature for a config object. + """ + return the signature for a config object. The signature is computed as md5 digest of the contents of working_directory, include_paths, define_symbols and @@ -337,8 +336,7 @@ :param config: Configuration object :type config: L{config_t} - @returns: Signature - @rtype: str + :rtype: str """ m = hashlib.md5() m.update(config.working_directory) Modified: pygccxml_dev/pygccxml/parser/project_reader.py =================================================================== --- pygccxml_dev/pygccxml/parser/project_reader.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/parser/project_reader.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -18,35 +18,35 @@ class file_configuration_t( object ): """ - file_configuration_t - a class, that contains some data and description how - to treat the data. file_configuration_t can contain reference to the next types - of data: + source code location configuration. - 1) path to C++ source file + The class instance uses "variant" interface to represent the following data: - 2) path to `GCC-XML`_ generated XML file + 1) path to a C++ source file - 3) path to C++ source file and path to `GCC-XML`_ generated XML file + 2) path to GCC-XML generated XML file + 3) path to a C++ source file and path to GCC-XML generated file + In this case, if XML file does not exists, it will be created. Next time you will ask to parse the source file, the XML file will be used instead. Small tip: you can setup your makefile to delete XML files every time, - the relevant source file has changed. + the relevant source file was changed. 4) Python string, that contains valid C++ code - There are few functions, that will help you to construct file_configuration_t + There are few functions, that will help you to construct :class:`file_configuration_t` object: - * L{create_source_fc} + * :func:`create_source_fc` - * L{create_gccxml_fc} + * :func:`create_gccxml_fc` - * L{create_cached_source_fc} + * :func:`create_cached_source_fc` - * L{create_text_fc} + * :func:`create_text_fc` """ class CONTENT_TYPE: @@ -146,27 +146,18 @@ , content_type=file_configuration_t.CONTENT_TYPE.CACHED_SOURCE_FILE ) class project_reader_t: - """Parses header files and returns the contained declarations. - """ + """parses header files and returns the contained declarations""" + def __init__( self, config, cache=None, decl_factory=None): - """Constructor. + """ + :param config: GCCXML configuration + :type config: :class:config_t - config is a configuration object that contains the parameters - for invoking gccxml. cache specifies the cache to use for - caching declarations between separate runs. By default, no - cache is used. decl_factory is an object that must provide - the same interface than - L{decl_factory_t<declarations.decl_factory_t>}, i.e. there must - be a set of C{create_*} methods that return an instance of an - appropriate declaration class. By default, the declaration - classes defined in the L{declarations} package are used. + :param cache: declaration cache, by default a cache functionality will not be used + :type cache: :class:`cache_base_t` instance or `str` - :param config: Configuration object - :type config: L{config_t} - :param cache: Declaration cache (None=no cache) - :type cache: L{cache_base_t} or str - :param decl_factory: Custom declaration factory object or None - :type decl_factory: decl_factory_t + :param decl_factory: declaration factory + :type decl_factory: :class:`decl_factory_t` """ self.__config = config self.__dcache = None @@ -184,10 +175,10 @@ @staticmethod def get_os_file_names( files ): - """Returns a list of OS file names + """ + returns file names - :param files: list of strings or L{file_configuration_t} instances. - files could contain a mix of them + :param files: list of strings and\\or :class:`file_configuration_t` instances. :type files: list """ fnames = [] @@ -203,14 +194,15 @@ return fnames def read_files( self, files, compilation_mode=COMPILATION_MODE.FILE_BY_FILE): - """Parse header files. + """ + parses a set of files - :param files: list of strings or L{file_configuration_t} instances. - files could contain a mix of them + :param files: list of strings and\\or :class:`file_configuration_t` instances. :type files: list - :param compilation_mode: Determines whether the files are parsed individually or as one single chunk - :type compilation_mode: L{COMPILATION_MODE} - @returns: Declarations + + :param compilation_mode: determines whether the files are parsed individually or as one single chunk + :type compilation_mode: :class:`COMPILATION_MODE` + :rtype: [:class:`declaration_t`] """ if compilation_mode == COMPILATION_MODE.ALL_AT_ONCE \ and len( files ) == len( self.get_os_file_names(files) ): @@ -302,7 +294,7 @@ :param content: C/C++ source code. :type content: str - @returns: Declarations + :rtype: Declarations """ reader = source_reader.source_reader_t( self.__config, None, self.__decl_factory ) return reader.read_string( content ) Modified: pygccxml_dev/pygccxml/parser/source_reader.py =================================================================== --- pygccxml_dev/pygccxml/parser/source_reader.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/pygccxml/parser/source_reader.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -50,31 +50,31 @@ """ This class reads C++ source code and returns declarations tree. - This class is the only class that have an intime knowledge about GCC-XML. + This class is the only class that works with GCC-XML directly. + It has only one responsibility: it calls GCC-XML with a source file specified by user and creates declarations tree. The implementation of this class is split - to 2 classes: + to two classes: - 1. L{scanner_t} - this class scans the "XML" file, generated by GCC-XML and - creates `pygccxml`_ declarations and types classes. After the xml file has + 1. `scanner_t` - this class scans the "XML" file, generated by GCC-XML and + creates `pygccxml`_ declarations and types classes. After the XML file has been processed declarations and type class instances keeps references to each other using GCC-XML generated id's. - 2. L{linker_t} - this class contains logic for replacing GCC-XML generated + 2. `linker_t` - this class contains logic for replacing GCC-XML generated ids with references to declarations or type class instances. """ def __init__( self, config, cache=None, decl_factory=None ): """ - :param config: instance of L{config_t} class, that contains GCC-XML + :param config: instance of :class:`config_t` class, that contains GCC-XML configuration - :type config: L{config_t} :param cache: reference to cache object, that will be updated after file has been parsed. - :param cache: instance of class, that derives from {cache_base_t} + :type cache: instance of :class:`cache_base_t` class - :param decl_factory: declarations factory, if not given default - declarations factory L{decl_factory_t} will be used + :param decl_factory: declarations factory, if not given default declarations + factory( :class:`decl_factory_t` ) will be used """ self.logger = utils.loggers.cxx_parser self.__search_directories = [] Modified: pygccxml_dev/unittests/data/core_cache.hpp =================================================================== --- pygccxml_dev/unittests/data/core_cache.hpp 2009-02-04 16:32:04 UTC (rev 1658) +++ pygccxml_dev/unittests/data/core_cache.hpp 2009-02-05 14:12:02 UTC (rev 1659) @@ -22,4 +22,4 @@ #endif//__core_cache_hpp__ -//touch//touch//touch//touch//touch//touch//touch//touch//touch//touch \ No newline at end of file +//touch//touch//touch//touch//touch//touch//touch//touch//touch//touch//touch \ No newline at end of file Added: pygccxml_dev/unittests/ignore_dictionary.txt =================================================================== --- pygccxml_dev/unittests/ignore_dictionary.txt (rev 0) +++ pygccxml_dev/unittests/ignore_dictionary.txt 2009-02-05 14:12:02 UTC (rev 1659) @@ -0,0 +1,29 @@ +Yakovenko +org +www +txt +http +bool +const +JNI +jboolean +jbyte +jchar +jdouble +jfloat +jint +jlong +jshort +GCC +wchar +TODO +namespace +namespaces +str +pygccxml +GCCXML +gccxml +GCC +gcc +noncopyable +Bierbaum Modified: pyplusplus_dev/contrib/pypp_api/pypp_api/argpolicy.py =================================================================== --- pyplusplus_dev/contrib/pypp_api/pypp_api/argpolicy.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pyplusplus_dev/contrib/pypp_api/pypp_api/argpolicy.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -448,7 +448,7 @@ @param idx: Argument index of the original function @type idx: int - @returns: Returns the argument_t object that was removed (or None + :rtype: Returns the argument_t object that was removed (or None if idx is 0 and the function has no return type) """ if idx==0 and self.funcargs[0]==None: Modified: pyplusplus_dev/contrib/pypp_api/pypp_api/declwrapper.py =================================================================== --- pyplusplus_dev/contrib/pypp_api/pypp_api/declwrapper.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pyplusplus_dev/contrib/pypp_api/pypp_api/declwrapper.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -128,7 +128,7 @@ @param flag: Determines whether the declaration is actually exposed or ignored. @type flag: bool - @returns: Returns self + :rtype: Returns self @see: L{ignore()} """ if not flag: @@ -482,7 +482,7 @@ @type allow_empty: bool @param assert_count: Check the number of matched declarations in the resulting Decl object @type assert_count: int - @returns: Returns a Decl object that may reference an arbitrary number of declarations. + :rtype: Returns a Decl object that may reference an arbitrary number of declarations. @rtype: IDecl @see: Namespace(), Class(), Method(), Function(), Enum() """ @@ -602,7 +602,7 @@ See Decl() for a full description of this method. - @returns: Returns a Decl object that may reference an arbitrary number of declarations. + :rtype: Returns a Decl object that may reference an arbitrary number of declarations. @see: L{Decl()} """ return self.Decls(name=name, type=type|NAMESPACE, **args) @@ -692,7 +692,7 @@ def _checkOverloads(self): """Check if all contained declarations are from the same set of overloads. - @returns: True if all contained declarations are from the same set of overloads. + :rtype: True if all contained declarations are from the same set of overloads. @rtype: bool """ if len(self.decl_handles)==0: @@ -712,7 +712,7 @@ def _parseDefArgs(self, args): """Determine which of the args is the doc string, call policies and keywords argument. - @returns: Returns a tuple (doc, policies, keywords). + :rtype: Returns a tuple (doc, policies, keywords). """ if len(args)>3: raise ValueError, "Too many arguments (%d)"%len(args) @@ -802,7 +802,7 @@ describes the source code line that created this instance. funcname is None if the source code is not located inside a function. - @returns: (filename, funcname, linenr, sourceline) + :rtype: (filename, funcname, linenr, sourceline) @rtype: 4-tuple """ frame = inspect.currentframe() Modified: pyplusplus_dev/contrib/pypp_api/pypp_api/filters.py =================================================================== --- pyplusplus_dev/contrib/pypp_api/pypp_api/filters.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pyplusplus_dev/contrib/pypp_api/pypp_api/filters.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -44,7 +44,7 @@ @param txt: The string to match @type txt: str - @returns: True if txt matches the pattern + :rtype: True if txt matches the pattern """ if self.regexp==None: return txt==self.pattern @@ -83,7 +83,7 @@ A return value of None means the filter's range is unlimited. - @returns: Filter range or None + :rtype: Filter range or None @rtype: TreeRange """ return None @@ -109,7 +109,7 @@ always return False so the search algorithm may decide not to visit them at all to speed up the search. - @returns: None, an empty list or a list of tuples (parent, recursive). + :rtype: None, an empty list or a list of tuples (parent, recursive). """ return None Modified: pyplusplus_dev/contrib/pypp_api/pypp_api/modulebuilder.py =================================================================== --- pyplusplus_dev/contrib/pypp_api/pypp_api/modulebuilder.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pyplusplus_dev/contrib/pypp_api/pypp_api/modulebuilder.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -172,7 +172,7 @@ This method can be called anytime after initialization and all Template() calls have been made. - @returns: Returns the root of the declaration tree + :rtype: Returns the root of the declaration tree @rtype: L{IDecl<declwrapper.IDecl>} @postcondition: This class can act as a wrapper for namespace("::") and all declarations are set to be ignored. """ @@ -646,7 +646,7 @@ @param t: Time value in seconds @type t: float - @returns: The time as a string + :rtype: The time as a string @rtype: str """ if t<60: Modified: pyplusplus_dev/contrib/pypp_api/pypp_api/treerange.py =================================================================== --- pyplusplus_dev/contrib/pypp_api/pypp_api/treerange.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pyplusplus_dev/contrib/pypp_api/pypp_api/treerange.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -122,7 +122,7 @@ @param other: A simple range (parent, recursive). @type other: 2-tuple - @returns: The new root node. + :rtype: The new root node. @rtype: TreeRange """ @@ -147,7 +147,7 @@ @param simplerange: A simple range (parent, recursive). @type simplerange: 2-tuple - @returns: The new root node. + :rtype: The new root node. @rtype: TreeRange """ otherparent, otherrecursive = simplerange @@ -215,7 +215,7 @@ @param other: Another TreeRange object @type other: TreeRange - @returns: The new root node. + :rtype: The new root node. @rtype: TreeRange """ res = self @@ -231,7 +231,7 @@ @param simplerange: A simple range (parent, recursive). @type simplerange: 2-tuple - @returns: The new root node. + :rtype: The new root node. @rtype: TreeRange """ otherparent, otherrecursive = simplerange @@ -311,7 +311,7 @@ def _rangeRelationship(self, parent1, parent2): """Determines the relationship between two nodes. - @returns: Returns the relationship as an integer value: + :rtype: Returns the relationship as an integer value: - 0: The sub trees rooted at parent1 and parent2 are disjoint - 1: parent2 is below parent1 - 2: parent1 is below parent2 @@ -331,7 +331,7 @@ """Returns a list with all nodes from node to the root (including node). @precondition: node must have a parent attribute - @returns: Returns a list of nodes + :rtype: Returns a list of nodes @rtype: list """ res = [] Modified: pyplusplus_dev/pyplusplus/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/__init__.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pyplusplus_dev/pyplusplus/__init__.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -3,7 +3,7 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -"""Py++ - Boost.Python code generator +"""`Py++` - Boost.Python code generator ======================================== This package (together with the accompanying pygccxml package and @@ -19,7 +19,7 @@ finally written into one or more C++ source files, which can then be compiled to generate the final Python module. -If you are just starting with U{Py++<http://www.language-binding.net>}, +If you are just starting with U{`Py++`<http://www.language-binding.net>}, then consider to read documentation of L{module_builder} package. """ @@ -38,14 +38,14 @@ import pygccxml if not hasattr( pygccxml, '__revision__' ) or pygccxml.__revision__ < 1080: - msg = 'This revision of Py++ requieres pygccxml revision to be ' \ + msg = 'This revision of `Py++` requieres pygccxml revision to be ' \ 'greater or equal to %d. ' \ 'Please install right pygccxml version.' raise AssertionError( msg % pygccxml.__revision__ ) #Known issues: #3. -#~ > > 2. An other difference: when Py++ creates bindings for a set of +#~ > > 2. An other difference: when `Py++` creates bindings for a set of #~ > > declarations, it #~ > > should (?) see all declarations that are going to be exported: #~ > > reasons: Modified: pyplusplus_dev/pyplusplus/_logging_/__init__.py =================================================================== --- pyplusplus_dev/pyplusplus/_logging_/__init__.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pyplusplus_dev/pyplusplus/_logging_/__init__.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -46,12 +46,12 @@ module_builder = _create_logger_( 'pyplusplus.module_builder' ) """logger that in use by L{module_builder_t} class. - Just another logger. It exists mostly for Py++ developers. + Just another logger. It exists mostly for `Py++` developers. """ #root logger exists for configuration purpose only root = logging.getLogger( 'pyplusplus' ) - """root logger exists for your convinience only""" + """root logger exists for your convenience only""" all = [ root, file_writer, module_builder, declarations ] """contains all logger classes, defined by the class""" Modified: pyplusplus_dev/pyplusplus/_logging_/multi_line_formatter.py =================================================================== --- pyplusplus_dev/pyplusplus/_logging_/multi_line_formatter.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pyplusplus_dev/pyplusplus/_logging_/multi_line_formatter.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -13,7 +13,7 @@ """Custom log formatter to split long message into several lines. This formatter is used for the default stream handler that outputs - its messages to stdout. + its messages to `stdout`. """ def __init__(self, fmt=None, datefmt=None, width=None): @@ -38,13 +38,13 @@ def format(self, record): """This method overwrites the original one. - The first thing that is done in the original format() method - is the creation of the record.message attribute: + The first thing, that is done in the original format() method, is the + creation of the record.message attribute: record.message = record.getMessage() Now this method temporarily replaces the getMessage() method of - the record by a version that returns a pregenerated message that + the record by a version that returns a pre-generated message that spans several lines. Then the original format() method is called which will invoke the 'fake' method. """ @@ -68,10 +68,10 @@ msgline is a string containing a single message. It can either be a plain message string which is reformatted using the textwrap - module or it can be of the form <decl>;<msg> where <decl> is the - declaration string and <msg> an arbitrary message. Lines of this - form will be separated so that the declaration and the message - appear in individual text blocks, where every line of message will start + module or it can be of the form <declaration>;<message> where <declaration> + is the declaration string and <message> an arbitrary message. Lines of this + form will be separated so that the declaration and the message appear in + individual text blocks, where every line of message will start with '>' character. width is the maximum width of any text blocks (without indendation). @@ -81,13 +81,13 @@ if len( txts ) != 2: #If message is not in format we expected, just return it return os.linesep.join( textwrap.wrap( msgline, width ) ) - + lines = [ txts[0] ] #I don't want to break declaration string to few lines - + # Insert a separator if there are two parts (=decl and msg) # Apply the text wrapper to shorten the maximum line length wrapped_lines = textwrap.wrap( txts[1], width ) lines.extend( map( lambda s: "> " + s.strip(), wrapped_lines ) ) - + return os.linesep.join(lines) Modified: pyplusplus_dev/pyplusplus/code_creators/code_creator.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/code_creator.py 2009-02-04 16:32:04 UTC (rev 1658) +++ pyplusplus_dev/pyplusplus/code_creators/code_creator.py 2009-02-05 14:12:02 UTC (rev 1659) @@ -94,17 +94,15 @@ actually creates code and returns it. Return value of this function is string. - @rtype: str + :rtype: str """ raise NotImplementedError() def create(self): """ - this function should be used in order to get code that should be - generated. - - @returns: Returns a text block of C++ source code. - @rtype: str + generates source code + + :rtype: str """ code = self._create_impl() assert isinstance( code, types.StringTypes ) @@ -153,7 +151,7 @@ :param code: A code block with C++ source code. :type code: str - @rtype: str + :rtype: str """ assert isinstance( code, types.StringTypes ) return code.strip() @@ -167,8 +165,7 @@ :type code: str :param size: The number of indentation levels that the code is shifted :type size: int - @returns: Returns indented source code - @rtype: str + :rtype: str """ assert isinstance( code, types.StringTypes ) return code_creator_t.__INDENTATION * size\ @@ -182,7 +179,7 @@ :param code: C++ code block. :type code: str - @rtype: str + :rtype: str """ assert isinstance( code, types.StringTypes ) if code.startswith(code_creator_t.__INDENTATION): @@ -198,10 +195,10 @@ :param line: C++ source code :type line: str - ... [truncated message content] |
From: <rom...@us...> - 2009-02-04 16:32:10
|
Revision: 1658 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1658&view=rev Author: roman_yakovenko Date: 2009-02-04 16:32:04 +0000 (Wed, 04 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- pydsc_dev/pydsc.py pydsc_dev/unittests/tester.py pydsc_dev/unittests/to_be_tested.py pygccxml_dev/pygccxml/__init__.py pygccxml_dev/pygccxml/declarations/algorithm.py pygccxml_dev/pygccxml/declarations/class_declaration.py pygccxml_dev/pygccxml/declarations/enumeration.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/scopedef.py pygccxml_dev/pygccxml/declarations/templates.py pygccxml_dev/pygccxml/utils/__init__.py pygccxml_dev/unittests/autoconfig.py Modified: pydsc_dev/pydsc.py =================================================================== --- pydsc_dev/pydsc.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pydsc_dev/pydsc.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -22,8 +22,8 @@ __license__ = 'Boost Software License <http://boost.org/more/license_info.html>' #license import os +import re import sys -import pdb import pprint import inspect import __builtin__ @@ -33,59 +33,38 @@ """return os.path.normcase( os.path.normpath( some_path ) )""" return os.path.normcase( os.path.normpath( some_path ) ) -class filter_by_path_t: +def contains_parent_dir( path, dirs ): """ - Utility class, should not be used directly. - """ + returns true if one of the directories is root directory for the `path`, false otherwise - class FILTER_TYPE: - """ - defines few filter constants + :param path: path to be checked + :type path: str - - *INCLUDE* - - *EXCLUDE* - """ - INCLUDE = 'include' - EXCLUDE = 'exclude' + :param dirs: list of directories and\\or files + :type dirs: [ str ] - def __init__( self, what, ftype ): - """ - :parameters: - - `what` - could be file or directory name, or list of them - - `ftype` - one of the :const:`FILTER_TYPE` constants - """ - self.what = what - if None is self.what: - self.what = [] - elif isinstance( self.what, str ): - self.what = [self.what] - self.what = map( normalize_path, self.what ) - self.ftype = ftype + :rtype: bool + """ + #precondition: dirs and fpath should be normalize_path'ed before calling this function + return bool( filter( lambda dir: path.startswith( dir ), dirs ) ) - @staticmethod - def contains_parent_dir( path, dirs ): - """ - returns true if one of the directories is root directory for the `path`, false otherwise +def is_identifier( word ): + """ + returns `True` is the word represents an identifier, constructed from two or more words, `False` otherwise. - :param path: path - :type path: str + This function is used to filter out some errors, reported by spell checker. + """ + if not word: + return False + if '_' in word: + return True + rest_of_word = word[1:] + for ch in rest_of_word: + if ch == ch.upper(): + return True + return False - :param dirs: list of directories and\\or files - :type dirs: [ str ] - :rtype: bool - """ - #precondition: dirs and fpath should be normalize_path'ed before calling this function - return bool( filter( lambda dir: path.startswith( dir ), dirs ) ) - - def check( self, source_file ): - """returns True if source_file should be checked, False otherwise""" - source_file = normalize_path( source_file ) - if source_file in self.what or self.contains_parent_dir( source_file, self.what ): - return self.ftype == self.FILTER_TYPE.INCLUDE - else: - return self.ftype == self.FILTER_TYPE.EXCLUDE - class checker_t( object ): """ Applies spell check process on every imported module. @@ -98,8 +77,8 @@ def __init__( self , speller , writer=None - , filter=None - , ignore_identifiers=True ): + , ignore_identifiers=True + , text_preprocessor=None ): """ initialization method @@ -113,9 +92,6 @@ :param writer: reference to instance of class that has write method. By default sys.stdout will be used. - :param filter: list of files or directories - :type filter: [ str ] - :param filter_type: provides interpretation for content of filter parameter :type filter_type: L{FILTER_TYPE} @@ -124,6 +100,9 @@ usually introduce spell error. If ignore_identifiers set to True, those names will be ignored. :type ignore_identifiers: bool + + :param text_preprocessor: a callable, which takes a text before it is passed to + the spell checker. The result will be passed to the spell checker. """ object.__init__( self ) self.__checked = set() @@ -135,13 +114,24 @@ self.writer = writer if self.writer is None: self.writer = sys.stdout - self.filter = filter + self.__include_paths = set() self.ignored_words = set() + self.add_include_paths( '.') self.ignore_identifiers = ignore_identifiers + self.text_preprocessor = text_preprocessor + if not self.text_preprocessor: + self.text_preprocessor = lambda t: t + def add_include_paths( self, path ): + np = lambda p: normalize_path( os.path.abspath( p ) ) + if isinstance( path, str ): + self.__include_paths.add( np( path ) ) + else: + for pi in path: + self.__include_paths.add( np( pi ) ) + def should_be_checked( self, obj, module=None ): """returns True, if obj should be checked, False otherwise""" - if id(obj) in self.__checked: return False if inspect.isbuiltin( obj ): @@ -149,16 +139,11 @@ if inspect.ismodule( obj ): if obj.__name__ in self.__already_imported: return False #do not check already imported modules - if self.filter: - try: - source_file = self.getsourcefile(obj) - if source_file is None: - source_file = inspect.getfile( obj ) - return self.filter.check( source_file ) - except TypeError: - return False #built in module + source_file = self.getsourcefile(obj) + if source_file: + return contains_parent_dir( source_file, self.__include_paths ) else: - return True + return False obj_module = inspect.getmodule( obj ) if not obj_module is module: return False @@ -182,20 +167,43 @@ @staticmethod def getsourcefile( obj ): try: - return inspect.getsourcefile( obj ) + fpath = inspect.getsourcefile( obj ) + if fpath is None: + fpath = inspect.getfile( obj ) + if fpath: + fpath = os.path.abspath( fpath ) + fpath = normalize_path( fpath ) + return fpath except TypeError: pass - def __check_text_impl( self, obj, text, text_type ): + def __get_local_ignored_words( self, obj ): + names = set() + if inspect.ismethod( obj ) or inspect.isfunction( obj ): + args_desc = inspect.getargspec( obj ) + names.update( args_desc[0] ) + if args_desc[1]: + names.add( args_desc[1] ) + if args_desc[2]: + names.add( args_desc[2] ) + return names + + def __check_text_impl( self, obj, text_, text_type ): + text = self.text_preprocessor( text_ ) if not text: return if self.ignore_identifiers and hasattr( obj, '__name__' ) and obj.__name__: self.ignored_words.add( obj.__name__ ) + + local_ignored_words = self.__get_local_ignored_words( obj ) + errors = {} self.speller.set_text( text ) for error in self.speller: - if error.word in self.ignored_words: + if error.word in self.ignored_words or error.word in local_ignored_words: continue + if is_identifier( error.word ): + continue if not errors.has_key( error.word ): errors[ error.word ] = [] errors[ error.word ] = self.speller.suggest() @@ -204,8 +212,7 @@ write = self.writer.write if self.getsourcefile( inspect.getmodule( obj ) ): write( ' error details: %s' % os.linesep ) - write( ' file : %s%s' % ( self.getsourcefile( inspect.getmodule( obj ) ), os.linesep ) ) - write( ' line : %d%s' % ( inspect.getsourcelines( obj )[1], os.linesep ) ) + write( ' location : %s:%d%s' % ( self.getsourcefile( inspect.getmodule( obj ) ), 1 + inspect.getsourcelines( obj )[1], os.linesep ) ) write( ' text type : %s%s' % ( text_type, os.linesep ) ) else: write( ' error details: %s' % os.linesep ) @@ -213,6 +220,9 @@ for word, suggestions in errors.items(): write( ' misspelled word: %s%s' % ( word, os.linesep ) ) write( ' suggestions : %s%s' % ( `suggestions`, os.linesep ) ) + clean = lambda t: t.replace( '\n', ' ' ).replace( '\r', '' ) + write( ' source file text: %s\n' % clean( text_ ) ) + write( ' checked text : %s\n' % clean( text ) ) def __check_text( self, obj): self.__check_text_impl( obj, inspect.getdoc( obj ), 'documentation string' ) @@ -237,27 +247,20 @@ doc_checker = None if 'PYDSC' in os.environ: if not 'sphinx' in os.environ['PYDSC']: - doc_checker = checker_t( checker.SpellChecker( "en_US" ) ) + doc_checker = checker_t( checker.SpellChecker( "en_US" )) #, filters=[checker.EmailFilter,checker.URLFilter] ) ) else: - doc_checker = checker_t( checker.SpellChecker( "en_US" ) ) + doc_checker = checker_t( checker.SpellChecker( "en_US" ))#, filters=[checker.EmailFilter,checker.URLFilter, checker.WikiWordFilter] ) ) -def exclude( what ): - """ - excludes all modules, from the check process, that are lying in *what* directory(ies) - *what* - a path or list of paths, could be or contain file and/or directory names +def include_paths( what ): """ - doc_checker.filter = filter_by_path_t( what, filter_by_path_t.FILTER_TYPE.EXCLUDE ) - -def include( what ): - """ includes all modules, to the check process, that are lying in *what* directory(ies) *what* - a path or list of paths, could be or contain file and/or directory names """ - doc_checker.filter = filter_by_path_t( what, filter_by_path_t.FILTER_TYPE.INCLUDE ) + doc_checker.add_include_paths( what ) -def ignore( what, case_sensitive=False ): +def ignore_words( what, case_sensitive=False ): """ adds *what*, word or list of words, to the ignore list. @@ -270,6 +273,42 @@ else: for word in what: if case_sensitive: - word = what.lower() + word = word.lower() doc_checker.ignored_words.add( word ) +def ignore_dictionary( path, case_sensitive=False ): + """ + adds all words from file to the "ignore" list + + The file should contain one word per line + + :param path: path to dictionary file + :type path: str + """ + for w in file( path, 'r' ).readlines(): + w = w.strip() + if case_sensitive: + w = w.lower() + if w: + doc_checker.ignored_words.add( w ) + +def set_text_preprocessor( preprocessor ): + doc_checker.text_preprocessor = preprocessor + +__ref_def = re.compile( r':[_a-zA-Z]+(\s+[_a-zA-Z]+)?:' ) +__ref_no_title = re.compile( r'`(\:\:)?[_a-zA-Z]+[_a-zA-Z0-9\.\:]*`' ) +__ref_with_title = re.compile( r'`(?P<text>.+)?\s(\<.*\>)`' ) + +def sphinx_preprocessor( text ): + def replace( m ): + if 'text' in m.groupdict(): + return ' ' * ( m.start( 'text' ) - m.start() ) + m.group( 'text' ) + ' ' * ( m.end() - m.end( 'text' ) ) + else: + return ' ' * ( m.end() - m.start() ) + if not text: + return text + result = text + result = __ref_no_title.sub( replace, result ) + result = __ref_def.sub( replace, result ) + result = __ref_with_title.sub( replace, result ) + return result Modified: pydsc_dev/unittests/tester.py =================================================================== --- pydsc_dev/unittests/tester.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pydsc_dev/unittests/tester.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -9,8 +9,7 @@ import pydsc -pydsc.exclude( os.path.abspath( os.path.join( os.curdir, 'do_not_check' ) ) ) -pydsc.ignore( 'abracadabra' ) +pydsc.ignore_words( 'abracadabra' ) import to_be_tested import do_not_check Modified: pydsc_dev/unittests/to_be_tested.py =================================================================== --- pydsc_dev/unittests/to_be_tested.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pydsc_dev/unittests/to_be_tested.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -11,6 +11,9 @@ code_creator_t is the base class for all code creators. This class defines interface that every code creator should implement. Also it provides few convinience functions. + + + qeqerqwerqwerqwer """ PYPLUSPLUS_NS_NAME = 'pyplusplus' __INDENTATION = ' ' Modified: pygccxml_dev/pygccxml/__init__.py =================================================================== --- pygccxml_dev/pygccxml/__init__.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pygccxml_dev/pygccxml/__init__.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -12,19 +12,16 @@ XML file. This XML file is then read by pygccxml and the contents are made available as appropriate Python objects. -To parse a set of C/C++ header files you use the -L{parse()<parser.parse>} function in the L{parser} sub package which -returns a tree that contains all declarations found in the header -files. The root of the tree represents the main namespace C{::} and -the children nodes represent the namespace contents such as other -namespaces, classes, functions, etc. Each node in the tree is an -object of a type derived from the -L{declaration_t<declarations.declaration_t>} base class. An inner -node is always either a namespace (L{namespace_t<declarations.namespace_t>}) -or a class (L{class_t<declarations.class_t>}) which are both derived -from L{scopedef_t<declarations.scopedef_t>}. Everything else (free functions, -member functions, enumerations, variables, etc.) is always a leaf. -You will find all those declaration classes in the L{declarations} +To parse a set of C/C++ header files you use the :func:`parse <parser.parse>` +function in the :mod:parser sub package which returns a tree that contains all +declarations found in the header files. The root of the tree represents the main +namespace `::` and the children nodes represent the namespace contents such as other +namespaces, classes, functions, etc. Each node in the tree is an object of a type +derived from the :class:`declaration_t` class. An inner node is always either a +namespace :class:`declarations.namespace_t` or a class :class:`declarations.class_t`, +which are both derived from :class:`declarations.scopedef_t` class. Everything +else (free functions, member functions, enumerations, variables, etc.) is always +a leaf. You will find all those declaration classes in the :mod:declarations sub-package. """ Modified: pygccxml_dev/pygccxml/declarations/algorithm.py =================================================================== --- pygccxml_dev/pygccxml/declarations/algorithm.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pygccxml_dev/pygccxml/declarations/algorithm.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -15,7 +15,7 @@ :type decl: :class:`declaration_t` :rtype: [names], where first item contains top parent name and last item - contains decl name + contains the `decl` name """ if not decl: return [] @@ -45,7 +45,7 @@ :type decl: :class:`declaration_t` :rtype: [names], where first item contains top parent name and last item - contains decl name + contains the `decl` name """ #TODO: #If parent declaration cache already has declaration_path, reuse it for @@ -98,8 +98,8 @@ def full_name( decl, with_defaults=True ): """ returns declaration full qualified name - - If `decl` belongs to anonymious namespace or class, the function will return C++ illegal qualified name. + + If `decl` belongs to anonymous namespace or class, the function will return C++ illegal qualified name. :param decl: :class:`declaration_t` :type decl: :class:`declaration_t` :rtype: full name of declarations. Modified: pygccxml_dev/pygccxml/declarations/class_declaration.py =================================================================== --- pygccxml_dev/pygccxml/declarations/class_declaration.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pygccxml_dev/pygccxml/declarations/class_declaration.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -501,7 +501,7 @@ return get_partial_name( self.name ) def find_noncopyable_vars( self ): - """returns list of all noncopyable variables""" + """returns list of all `noncopyable` variables""" import type_traits as tt#prevent cyclic dependencies logger = utils.loggers.cxx_parser mvars = self.vars( lambda v: not v.type_qualifiers.has_static, recursive=False, allow_empty=True ) Modified: pygccxml_dev/pygccxml/declarations/enumeration.py =================================================================== --- pygccxml_dev/pygccxml/declarations/enumeration.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pygccxml_dev/pygccxml/declarations/enumeration.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -4,7 +4,7 @@ # http://www.boost.org/LICENSE_1_0.txt) """ -defines class, that describes C++ enum +defines class, that describes C++ `enum` """ import copy @@ -14,15 +14,15 @@ class enumeration_t( declaration.declaration_t ): """ - describes C++ enum + describes C++ `enum` """ def __init__( self, name='', values=None ): - """creates class that describes C++ enum declaration + """creates class that describes C++ `enum` declaration The items of the list 'values' may either be strings containing the enumeration value name or tuples (name, numvalue). - :param name: Enum name + :param name: `enum` name :type name: str :param parent: Parent declaration :type parent: declaration_t @@ -75,7 +75,7 @@ @type: list""") def append_value(self, valuename, valuenum=None): - """Append another enumeration value to the enum. + """Append another enumeration value to the `enum`. The numeric value may be None in which case it is automatically determined by increasing the value of the last item. @@ -99,7 +99,7 @@ self._values.append((valuename, int(valuenum))) def has_value_name(self, name): - """Check if this enum has a particular name among its values. + """Check if this `enum` has a particular name among its values. :param name: Enumeration value name :type name: str @@ -111,7 +111,7 @@ return False def get_name2value_dict( self ): - """returns a dictionary, that maps between enum name( key ) and enum value( value )""" + """returns a dictionary, that maps between `enum` name( key ) and `enum` value( value )""" x = {} for val, num in self._values: x[val] = num Modified: pygccxml_dev/pygccxml/declarations/matcher.py =================================================================== --- pygccxml_dev/pygccxml/declarations/matcher.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pygccxml_dev/pygccxml/declarations/matcher.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -32,11 +32,12 @@ @staticmethod def find( decl_matcher, decls, recursive=True ): - """returns a list of declarations that match "decl_matcher" defined criretia or None + """ + returns a list of declarations that match `decl_matcher` defined criteria or None - :param decl_matcher: Python callable object, that takes one argument - reference to declaration - :param decls: reference to declaration or list of declarations to be searched in - :param recursive: boolean, if True the method will run decl_matcher, on internal declarations too + :param decl_matcher: Python callable object, that takes one argument - reference to a declaration + :param decls: the search scope, :class:declaration_t object or :class:declaration_t objects list t + :param recursive: boolean, if True, the method will run `decl_matcher` on the internal declarations too """ where = [] @@ -50,13 +51,14 @@ @staticmethod def find_single( decl_matcher, decls, recursive=True ): - """returns a reference to declaration, that match "decl_matcher" defined - criretia, if a unique declaration could not be found the method will return - None. + """ + returns a reference to the declaration, that match `decl_matcher` defined criteria. - :param decl_matcher: Python callable object, that takes one argument - reference to declaration - :param decls: reference to declaration or list of declarations to be searched in - :param recursive: boolean, if True the method will run decl_matcher, on internal declarations too + if a unique declaration could not be found the method will return None. + + :param decl_matcher: Python callable object, that takes one argument - reference to a declaration + :param decls: the search scope, :class:declaration_t object or :class:declaration_t objects list t + :param recursive: boolean, if True, the method will run `decl_matcher` on the internal declarations too """ answer = matcher.find( decl_matcher, decls, recursive ) if len(answer) == 1: @@ -64,13 +66,14 @@ @staticmethod def get_single( decl_matcher, decls, recursive=True ): - """returns a reference to declaration, that match "decl_matcher" defined - criretia, if a unique declaration could not be found, an appropriate - exception will be raised. + """ + returns a reference to declaration, that match `decl_matcher` defined criteria. - :param decl_matcher: Python callable object, that takes one argument - reference to declaration - :param decls: reference to declaration or list of declarations to be searched in - :param recursive: boolean, if True the method will run decl_matcher, on internal declarations too + If a unique declaration could not be found, an appropriate exception will be raised. + + :param decl_matcher: Python callable object, that takes one argument - reference to a declaration + :param decls: the search scope, :class:declaration_t object or :class:declaration_t objects list t + :param recursive: boolean, if True, the method will run `decl_matcher` on the internal declarations too """ answer = matcher.find( decl_matcher, decls, recursive ) if len(answer) == 1: Modified: pygccxml_dev/pygccxml/declarations/matchers.py =================================================================== --- pygccxml_dev/pygccxml/declarations/matchers.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pygccxml_dev/pygccxml/declarations/matchers.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -110,7 +110,7 @@ """ Instance of this class will match declarations by next criteria: - declaration name, also could be fully qualified name - Example: wstring or ::std::wstring + Example: `wstring` or `::std::wstring` - declaration type Example: :class:`class_t`, :class:`namespace_t`, :class:`enumeration_t` - location within file system ( file or directory ) @@ -491,15 +491,15 @@ class virtuality_type_matcher_t( matcher_base_t ): """ - Instance of this class will match declaration by its virtuality type: not virtual, - virtual or pure virtual. If declarations does not have virtuality type, for example - free function, then False will be returned. + Instance of this class will match declaration by its virtual type: not virtual, + virtual or pure virtual. If declarations does not have "virtual" property, + for example free function, then `False` will be returned. """ def __init__( self, virtuality_type ): """ :param access_type: declaration access type - :type access_type: :class:VIRTUALITY_TYPES defines few consts for your convinience. + :type access_type: :class:VIRTUALITY_TYPES defines few constants for your convenience. """ matcher_base_t.__init__( self ) self.virtuality_type = virtuality_type Modified: pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py =================================================================== --- pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -31,17 +31,26 @@ callable_( *arguments, **keywords ) class mdecl_wrapper_t( object ): - """Multiple declarations wrapper. + """ + multiple declarations class wrapper - The main purpose of this class is to allow an user to work on many - declarations, as they were only one single declaration. + The main purpose of this class is to allow an user to work on many declarations, + as they were only one single declaration. - Example: - mb = module_builder_t( ... ) - #lets say we want to exclude all member functions, that returns reference to int: - mb.member_functions( return_type='int &' ).exclude() + For example, instead of writing `for` loop like the following - "exclude" function will be called on every function that match the criteria. + .. code-block:: python + + for c in global_namespace.classes(): + c.compiler = "GCCXML 1.127" + + you can write: + + .. code-block:: python + + global_namespace.classes().compiler = "GCCXML 1.127" + + The same functionality could be applied on "set" methods too. """ def __init__( self, decls ): @@ -69,7 +78,7 @@ invalid_decls = filter( lambda d: not hasattr( d, name ), self.declarations ) sep = os.linesep + ' ' if invalid_decls: - raise RuntimeError( "Next declarations don't have '%s' attribute: %s" + raise RuntimeError( "Next declarations don't have '%s' attribute: %s" % ( name, sep.join( map( str, invalid_decls ) ) ) ) def __setattr__( self, name, value ): @@ -93,4 +102,4 @@ l = [] for d in self.declarations: l.append( d ) - return l \ No newline at end of file + return l Modified: pygccxml_dev/pygccxml/declarations/namespace.py =================================================================== --- pygccxml_dev/pygccxml/declarations/namespace.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pygccxml_dev/pygccxml/declarations/namespace.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -50,9 +50,9 @@ def adopt_declaration( self, decl ): self.declarations.append( decl ) - decl.parent = self + decl.parent = self decl.cache.reset() - + def remove_declaration( self, decl ): """ removes decl from members list @@ -67,24 +67,24 @@ # decl.parent=None def namespace( self, name=None, function=None, recursive=None ): - """returns reference to namespace declaration, that is matched defined criterias""" + """returns reference to namespace declaration, that is matched defined criteria""" return self._find_single( scopedef.scopedef_t._impl_matchers[ namespace_t.namespace ] , name=name , function=function , recursive=recursive ) ns = namespace - + def namespaces( self, name=None, function=None, recursive=None, allow_empty=None ): - """returns a set of namespace declarations, that are matched defined criterias""" + """returns a set of namespace declarations, that are matched defined criteria""" return self._find_multiple( scopedef.scopedef_t._impl_matchers[ namespace_t.namespace ] , name=name , function=function , recursive=recursive , allow_empty=allow_empty) nss = namespaces - + def free_function( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ): - """returns reference to free function declaration, that is matched defined criterias""" + """returns reference to free function declaration, that is matched defined criteria""" return self._find_single( scopedef.scopedef_t._impl_matchers[ namespace_t.free_function ] , name=name , function=function @@ -95,9 +95,9 @@ , header_file=header_file , recursive=recursive ) free_fun = free_function - + def free_functions( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ): - """returns a set of free function declarations, that are matched defined criterias""" + """returns a set of free function declarations, that are matched defined criteria""" return self._find_multiple( scopedef.scopedef_t._impl_matchers[ namespace_t.free_function ] , name=name , function=function @@ -111,7 +111,7 @@ free_funs = free_functions def free_operator( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ): - """returns reference to free operator declaration, that is matched defined criterias""" + """returns reference to free operator declaration, that is matched defined criteria""" return self._find_single( scopedef.scopedef_t._impl_matchers[ namespace_t.free_operator ] , name=self._build_operator_name( name, function, symbol ) , symbol=symbol @@ -124,7 +124,7 @@ , recursive=recursive ) def free_operators( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ): - """returns a set of free operator declarations, that are matched defined criterias""" + """returns a set of free operator declarations, that are matched defined criteria""" return self._find_multiple( scopedef.scopedef_t._impl_matchers[ namespace_t.free_operator ] , name=self._build_operator_name( name, function, symbol ) , symbol=symbol Modified: pygccxml_dev/pygccxml/declarations/scopedef.py =================================================================== --- pygccxml_dev/pygccxml/declarations/scopedef.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pygccxml_dev/pygccxml/declarations/scopedef.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -28,10 +28,10 @@ 1. `name` - declaration name, could be full qualified name - 2. `header_dir` - directory, to which belongs file, that the declaration was declarated in. + 2. `header_dir` - directory, to which belongs file, that the declaration was declared in. `header_dir` should be absolute path. - 3. `header_file` - file that the declaration was declarated in. + 3. `header_file` - file that the declaration was declared in. 4. `function` - user ( your ) custom criteria. The interesting thing is that this function will be joined with other arguments ( criteria ). @@ -40,31 +40,25 @@ internal declarations too. - Every "select" API you can invoke and pass as first argument at declaration - name or function. This class will find out correctly what argument represents. + Every ""query"" API, takes name or function as the first argument. - Example: :: - ns - referrers to global namespace - ns.member_function( "do_something ) - will return reference to member - function named "do_something". If there is no such function exception - will be raised. If there is more then one function exception will be - raised too. + .. code-block:: python - Example 2: :: - ns - referers to global namespace - do_smths = ns.member_functions( "do_something ) - will return instance - of :class:`mdecl_wrapper_t` object. This object allows you few things: + global_namespace.member_function( "do_something ) - 1. To iterate on selected declarations + the statement returns reference to member function named "do_something". + If there the function doesn't exist or more than one function exists, + an exception is raised. - 2. To set some property to desired value using one line of code only: - do_smths.call_policies = x + If you want to query for many declarations, use other function(s): - 3. To call some function on every instance using one line of code: - do_smths.exclude() + .. code-block:: python + do_something = global_namespace.member_functions( "do_something ) - Pay attention: you can not use "get" functions or properties. + the statement returns :class:`mdecl_wrapper_t` instance. That object will save + you writing `for` loops. For more information see :class:`the class <mdecl_wrapper_t>` + documentation. """ RECURSIVE_DEFAULT = True @@ -168,7 +162,9 @@ , self.declarations ) ) def init_optimizer(self): - """Initializes query optimizer state. + """ + Initializes query optimizer state. + There are 4 internals hash tables: 1. from type to declarations 2. from type to declarations for non-recursive queries @@ -177,7 +173,7 @@ Almost every query includes declaration type information. Also very common query is to search some declaration(s) by name or full name. - Those hashtables allows to search declaration very quick. + Those hash tables allows to search declaration very quick. """ if self.name == '::': self._logger.debug( "preparing data structures for query optimizer - started" ) @@ -382,7 +378,7 @@ return mfound def decl( self, name=None, function=None, decl_type=None, header_dir=None, header_file=None, recursive=None ): - """returns reference to declaration, that is matched defined criterias""" + """returns reference to declaration, that is matched defined criteria""" return self._find_single( self._impl_matchers[ scopedef_t.decl ] , name=name , function=function @@ -392,7 +388,7 @@ , recursive=recursive) def decls( self, name=None, function=None, decl_type=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ): - """returns a set of declarations, that are matched defined criterias""" + """returns a set of declarations, that are matched defined criteria""" return self._find_multiple( self._impl_matchers[ scopedef_t.decl ] , name=name , function=function @@ -403,7 +399,7 @@ , allow_empty=allow_empty) def class_( self, name=None, function=None, header_dir=None, header_file=None, recursive=None ): - """returns reference to class declaration, that is matched defined criterias""" + """returns reference to class declaration, that is matched defined criteria""" return self._find_single( self._impl_matchers[ scopedef_t.class_ ] , name=name , function=function @@ -413,7 +409,7 @@ , recursive=recursive) def classes( self, name=None, function=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ): - """returns a set of class declarations, that are matched defined criterias""" + """returns a set of class declarations, that are matched defined criteria""" return self._find_multiple( self._impl_matchers[ scopedef_t.class_ ] , name=name , function=function @@ -424,7 +420,7 @@ , allow_empty=allow_empty) def variable( self, name=None, function=None, type=None, header_dir=None, header_file=None, recursive=None ): - """returns reference to variable declaration, that is matched defined criterias""" + """returns reference to variable declaration, that is matched defined criteria""" return self._find_single( self._impl_matchers[ scopedef_t.variable ] , name=name , function=function @@ -435,7 +431,7 @@ var = variable #small alias def variables( self, name=None, function=None, type=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ): - """returns a set of variable declarations, that are matched defined criterias""" + """returns a set of variable declarations, that are matched defined criteria""" return self._find_multiple( self._impl_matchers[ scopedef_t.variable ] , name=name , function=function @@ -447,7 +443,7 @@ vars = variables #small alias def calldef( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ): - """returns reference to "calldef" declaration, that is matched defined criterias""" + """returns reference to "calldef" declaration, that is matched defined criteria""" return self._find_single( self._impl_matchers[ scopedef_t.calldef ] , name=name , function=function @@ -459,7 +455,7 @@ , recursive=recursive ) def calldefs( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ): - """returns a set of calldef declarations, that are matched defined criterias""" + """returns a set of calldef declarations, that are matched defined criteria""" return self._find_multiple( self._impl_matchers[ scopedef_t.calldef ] , name=name , function=function @@ -472,7 +468,7 @@ , allow_empty=allow_empty) def operator( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ): - """returns reference to operator declaration, that is matched defined criterias""" + """returns reference to operator declaration, that is matched defined criteria""" return self._find_single( self._impl_matchers[ scopedef_t.operator ] , name=self._build_operator_name( name, function, symbol ) , symbol=symbol @@ -485,7 +481,7 @@ , recursive=recursive ) def operators( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ): - """returns a set of operator declarations, that are matched defined criterias""" + """returns a set of operator declarations, that are matched defined criteria""" return self._find_multiple( self._impl_matchers[ scopedef_t.operator ] , name=self._build_operator_name( name, function, symbol ) , symbol=symbol @@ -499,7 +495,7 @@ , allow_empty=allow_empty) def member_function( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ): - """returns reference to member declaration, that is matched defined criterias""" + """returns reference to member declaration, that is matched defined criteria""" return self._find_single( self._impl_matchers[ scopedef_t.member_function ] , name=name , function=function @@ -512,7 +508,7 @@ mem_fun = member_function def member_functions( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ): - """returns a set of member function declarations, that are matched defined criterias""" + """returns a set of member function declarations, that are matched defined criteria""" return self._find_multiple( self._impl_matchers[ scopedef_t.member_function ] , name=name , function=function @@ -526,7 +522,7 @@ mem_funs = member_functions def constructor( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ): - """returns reference to constructor declaration, that is matched defined criterias""" + """returns reference to constructor declaration, that is matched defined criteria""" return self._find_single( self._impl_matchers[ scopedef_t.constructor ] , name=name , function=function @@ -538,7 +534,7 @@ , recursive=recursive ) def constructors( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ): - """returns a set of constructor declarations, that are matched defined criterias""" + """returns a set of constructor declarations, that are matched defined criteria""" return self._find_multiple( self._impl_matchers[ scopedef_t.constructor ] , name=name , function=function @@ -551,7 +547,7 @@ , allow_empty=allow_empty) def member_operator( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ): - """returns reference to member operator declaration, that is matched defined criterias""" + """returns reference to member operator declaration, that is matched defined criteria""" return self._find_single( self._impl_matchers[ scopedef_t.member_operator ] , name=self._build_operator_name( name, function, symbol ) , symbol=symbol @@ -564,7 +560,7 @@ , recursive=recursive ) mem_oper = member_operator def member_operators( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ): - """returns a set of member operator declarations, that are matched defined criterias""" + """returns a set of member operator declarations, that are matched defined criteria""" return self._find_multiple( self._impl_matchers[ scopedef_t.member_operator ] , name=self._build_operator_name( name, function, symbol ) , symbol=symbol @@ -579,7 +575,7 @@ mem_opers = member_operators def casting_operator( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ): - """returns reference to casting operator declaration, that is matched defined criterias""" + """returns reference to casting operator declaration, that is matched defined criteria""" return self._find_single( self._impl_matchers[ scopedef_t.casting_operator ] , name=name , function=function @@ -591,7 +587,7 @@ , recursive=recursive ) def casting_operators( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ): - """returns a set of casting operator declarations, that are matched defined criterias""" + """returns a set of casting operator declarations, that are matched defined criteria""" return self._find_multiple( self._impl_matchers[ scopedef_t.casting_operator ] , name=name , function=function @@ -604,7 +600,7 @@ , allow_empty=allow_empty) def enumeration( self, name=None, function=None, header_dir=None, header_file=None, recursive=None ): - """returns reference to enumeration declaration, that is matched defined criterias""" + """returns reference to enumeration declaration, that is matched defined criteria""" return self._find_single( self._impl_matchers[ scopedef_t.enumeration ] , name=name , function=function @@ -617,7 +613,7 @@ """adding small aliase to enumeration method""" def enumerations( self, name=None, function=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ): - """returns a set of enumeration declarations, that are matched defined criterias""" + """returns a set of enumeration declarations, that are matched defined criteria""" return self._find_multiple( self._impl_matchers[ scopedef_t.enumeration ] , name=name , function=function @@ -630,7 +626,7 @@ enums = enumerations def typedef( self, name=None, function=None, header_dir=None, header_file=None, recursive=None ): - """returns reference to typedef declaration, that is matched defined criterias""" + """returns reference to typedef declaration, that is matched defined criteria""" return self._find_single( self._impl_matchers[ scopedef_t.typedef ] , name=name , function=function @@ -640,7 +636,7 @@ , recursive=recursive) def typedefs( self, name=None, function=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ): - """returns a set of typedef declarations, that are matched defined criterias""" + """returns a set of typedef declarations, that are matched defined criteria""" return self._find_multiple( self._impl_matchers[ scopedef_t.typedef ] , name=name , function=function @@ -651,9 +647,10 @@ , allow_empty=allow_empty) def __getitem__(self, name_or_function): - """ Allow simple name based find of decls. Internally just calls decls() method. - :param name_or_function Name of decl to lookup or finder function. """ + Allow simple name based find of declarations. Internally just calls `decls` method. + :param name_or_function: Name of `decl` to lookup or finder function. + """ return self.decls(name_or_function) Modified: pygccxml_dev/pygccxml/declarations/templates.py =================================================================== --- pygccxml_dev/pygccxml/declarations/templates.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pygccxml_dev/pygccxml/declarations/templates.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -3,11 +3,11 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -""" +""" template instantiation parser This module implements all functionality necessary to parse C++ template -instantiations.In other words this module is able to extract next information from +instantiations.In other words this module is able to extract next information from the string like this C{ std::vector<int> }. - name ( std::vector ) - list of arguments ( int ) @@ -21,11 +21,11 @@ def is_instantiation( decl_string ): """ - returns True if decl_string is template instantiation and False otherwise - + returns True if `decl_string` is template instantiation and False otherwise + :param decl_string: string that should be checked for pattern presence :type decl_string: str - + :rtype: bool """ global __THE_PARSER @@ -34,7 +34,7 @@ def name( decl_string ): """ returns name of instantiated template - + :type decl_string: str :rtype: str """ @@ -44,18 +44,18 @@ def args( decl_string ): """ returns list of template arguments - - :type decl_string: str - :rtype: [str] + + :type decl_string: `str` + :rtype: [`str`] """ global __THE_PARSER return __THE_PARSER.args( decl_string ) - + def split( decl_string ): """returns (name, [arguments] )""" global __THE_PARSER return __THE_PARSER.split( decl_string ) - + def split_recursive( decl_string ): """returns [(name, [arguments])]""" global __THE_PARSER @@ -67,8 +67,8 @@ return __THE_PARSER.join( name, args ) def normalize( decl_string ): - """returns decl_string, which contains "normalized" spaces - + """returns `decl_string`, which contains "normalized" spaces + this functionality allows to implement comparison of 2 different string which are actually same: x::y< z > and x::y<z> """ Modified: pygccxml_dev/pygccxml/utils/__init__.py =================================================================== --- pygccxml_dev/pygccxml/utils/__init__.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pygccxml_dev/pygccxml/utils/__init__.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -4,7 +4,7 @@ # http://www.boost.org/LICENSE_1_0.txt) """ -defines logger classes and few convinience methods, not related to the declarations +defines logger classes and few convenience methods, not related to the declarations tree """ @@ -59,7 +59,7 @@ """ root = logging.getLogger( 'pygccxml' ) - """root logger exists for your convinience only""" + """root logger exists for your convenience only""" all = [ root, cxx_parser, queries_engine, declarations_cache, pdb_reader ] """contains all logger classes, defined by the class""" @@ -74,7 +74,7 @@ % ( file_name, str( error ) ) ) def create_temp_file_name(suffix, prefix=None, dir=None): - """small convinience function that creates temporal file. + """small convenience function that creates temporal file. This function is a wrapper aroung Python built-in function - tempfile.mkstemp """ Modified: pygccxml_dev/unittests/autoconfig.py =================================================================== --- pygccxml_dev/unittests/autoconfig.py 2009-02-03 20:42:16 UTC (rev 1657) +++ pygccxml_dev/unittests/autoconfig.py 2009-02-04 16:32:04 UTC (rev 1658) @@ -15,8 +15,11 @@ this_module_dir_path = os.path.abspath ( os.path.dirname( sys.modules[__name__].__file__) ) sys.path.append( os.path.abspath( os.path.join( this_module_dir_path, '..', '..', 'pydsc_dev' ) ) ) -#~ import pydsc +import pydsc +pydsc.ignore_dictionary( 'ignore_dictionary.txt' ) +pydsc.set_text_preprocessor( pydsc.sphinx_preprocessor ) +pydsc.include_paths( os.path.join( this_module_dir_path, '..', '..', 'pygccxml_dev' ) ) data_directory = os.path.join( this_module_dir_path, 'data' ) build_directory = os.path.join( this_module_dir_path, 'temp' ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |