[pygccxml-commit] SF.net SVN: pygccxml:[1664] pyplusplus_dev/pyplusplus
Brought to you by:
mbaas,
roman_yakovenko
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. |