Skip to content

Commit 36a5d17

Browse files
author
roman_yakovenko
committed
sphinx
1 parent 35e8c32 commit 36a5d17

File tree

13 files changed

+54
-46
lines changed

13 files changed

+54
-46
lines changed

pygccxml/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
This package provides functionality to extract and inspect
99
declarations from C/C++ header files. This is accomplished
10-
by invoking the external tool U{gccxml<http://www.gccxml.org/>}
10+
by invoking the external tool `gccxml <http://www.gccxml.org/>`_
1111
which parses a header file and dumps the declarations as a
1212
XML file. This XML file is then read by pygccxml and the contents
1313
are made available as appropriate Python objects.

pygccxml/declarations/algorithm.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,11 @@ def does_match_exist(self, inst):
227227
return answer
228228

229229
def __call__(self, inst):
230-
"""C{return self.does_match_exist(inst)}"""
230+
"""
231+
.. code-block:: python
232+
233+
return self.does_match_exist(inst)
234+
"""
231235
return self.does_match_exist(inst)
232236

233237
def find_all_declarations( declarations

pygccxml/declarations/cpptypes.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def __init__( self ):
354354
## Compaund types:
355355

356356
class compound_t( type_t ):
357-
"""class that allows to represent compound types like C{const int*}"""
357+
"""class that allows to represent compound types like `const int*`"""
358358
def __init__( self, base ):
359359
type_t.__init__( self )
360360
self._base = base
@@ -368,7 +368,7 @@ def _set_base(self, new_base):
368368
, doc="reference to internal/base class")
369369

370370
class volatile_t( compound_t ):
371-
"""represents C{volatile whatever} type"""
371+
"""represents `volatile whatever` type"""
372372
def __init__( self, base ):
373373
compound_t.__init__( self, base)
374374

@@ -379,7 +379,7 @@ def _clone_impl( self ):
379379
return volatile_t( self.base.clone() )
380380

381381
class restrict_t( compound_t ):
382-
"""represents C{restrict whatever} type"""
382+
"""represents `restrict whatever` type"""
383383

384384
#The restrict keyword can be considered an extension to the strict aliasing
385385
#rule. It allows the programmer to declare that pointers which share the same
@@ -400,7 +400,7 @@ def _clone_impl( self ):
400400
return restrict_t( self.base.clone() )
401401

402402
class const_t( compound_t ):
403-
"""represents C{whatever const} type"""
403+
"""represents `whatever const` type"""
404404
def __init__( self, base ):
405405
compound_t.__init__( self, base )
406406

@@ -411,7 +411,7 @@ def _clone_impl( self ):
411411
return const_t( self.base.clone() )
412412

413413
class pointer_t( compound_t ):
414-
"""represents C{whatever*} type"""
414+
"""represents `whatever*` type"""
415415
def __init__( self, base ):
416416
compound_t.__init__( self, base )
417417

@@ -422,7 +422,7 @@ def _clone_impl( self ):
422422
return pointer_t( self.base.clone() )
423423

424424
class reference_t( compound_t ):
425-
"""represents C{whatever&} type"""
425+
"""represents `whatever&` type"""
426426
def __init__( self, base ):
427427
compound_t.__init__( self, base)
428428

pygccxml/declarations/declaration.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,11 @@ def __ne__( self, other):
128128

129129
def __lt__(self, other):
130130
"""
131-
C{if not isinstance( other, self.__class__ ):}
132-
C{ return self.__class__.__name__ < other.__class__.__name__}
133-
C{return self._get__cmp__data() < other._get__cmp__data()}
131+
.. code-block:: python
132+
133+
if not isinstance( other, self.__class__ ):
134+
return self.__class__.__name__ < other.__class__.__name__
135+
return self._get__cmp__data() < other._get__cmp__data()
134136
"""
135137
if not isinstance( other, self.__class__ ):
136138
return self.__class__.__name__ < other.__class__.__name__

pygccxml/declarations/matchers.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,14 @@ def __str__(self):
9494

9595

9696
class not_matcher_t(matcher_base_t):
97-
"""Return the inverse result of matcher, using "~"
97+
"""
98+
return the inverse result of a matcher
9899
99-
For example: find all private and protected declarations
100+
For example: find all public and protected declarations
100101
101-
C{ matcher = ~access_type_matcher_t( 'private' ) }
102+
.. code-block:: python
102103
104+
matcher = ~access_type_matcher_t( 'private' )
103105
"""
104106
def __init__(self, matcher):
105107
matcher_base_t.__init__(self)
@@ -343,7 +345,6 @@ def __init__( self, name=None, return_type=None, arg_types=None, decl_type=None,
343345
reference to integer and second any
344346
345347
:type arg_types: list
346-
347348
"""
348349
if None is decl_type:
349350
decl_type = calldef.calldef_t

pygccxml/declarations/mdecl_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ class call_redirector_t( object ):
1717
def __init__( self, name, decls ):
1818
"""creates call_redirector_t instance.
1919
20-
:param name: name of method, to be called on every object in C{decls} list
20+
:param name: name of method, to be called on every object in the `decls` list
2121
:param decls: list of objects
2222
"""
2323
object.__init__( self )
2424
self.name = name
2525
self.decls = decls
2626

2727
def __call__( self, *arguments, **keywords ):
28-
"""calls method C{self.name} on every object within C{self.decls} list"""
28+
"""calls method :attr:`call_redirector_t.name` on every object within the :attr:`call_redirector_t.decls` list"""
2929
for d in self.decls:
3030
callable_ = getattr(d, self.name)
3131
callable_( *arguments, **keywords )

pygccxml/declarations/scopedef.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class scopedef_t( declaration.declaration_t ):
1818
Base class for :class:`namespace_t` and :class:`class_t` classes.
1919
2020
This is the base class for all declaration classes that may have
21-
children nodes. The children can be accessed via the C{declarations}
21+
children nodes. The children can be accessed via the :attr:`scopedef_t.declarations`
2222
property.
2323
2424
Also this class provides "get/select/find" interface. Using this class you
@@ -84,7 +84,7 @@ def __init__( self, name=''):
8484

8585
def _get_logger( self ):
8686
return utils.loggers.queries_engine
87-
_logger = property( _get_logger, doc="reference to C{queries_engine} logger" )
87+
_logger = property( _get_logger, doc="reference to :attr:`pygccxml.utils.loggers.queries_engine` logger" )
8888

8989
def _get__cmp__scope_items(self):
9090
"""implementation details"""

pygccxml/declarations/templates.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
99
This module implements all functionality necessary to parse C++ template
1010
instantiations.In other words this module is able to extract next information from
11-
the string like this C{ std::vector<int> }.
12-
- name ( std::vector )
13-
- list of arguments ( int )
11+
the string like this `std::vector<int>`.
12+
- name ( `std::vector` )
13+
- list of arguments ( `int` )
1414
1515
This module also defines few convenience function like :func:split and :func:join.
1616
"""

pygccxml/declarations/type_traits.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def decompose_class(type):
8484
def base_type(type):
8585
"""returns base type.
8686
87-
For C{const int} will return C{int}
87+
For `const int` will return `int`
8888
"""
8989
types = decompose_type( type )
9090
return types[-1]
@@ -115,15 +115,15 @@ def does_match_definition(given, main, secondary ):
115115
return False
116116

117117
def is_bool( type_ ):
118-
"""returns True, if type represents C{bool}, False otherwise"""
118+
"""returns True, if type represents `bool`, False otherwise"""
119119
return remove_alias( type_ ) in create_cv_types( cpptypes.bool_t() )
120120

121121
def is_void( type ):
122-
"""returns True, if type represents C{void}, False otherwise"""
122+
"""returns True, if type represents `void`, False otherwise"""
123123
return remove_alias( type ) in create_cv_types( cpptypes.void_t() )
124124

125125
def is_void_pointer( type ):
126-
"""returns True, if type represents C{void*}, False otherwise"""
126+
"""returns True, if type represents `void*`, False otherwise"""
127127
return is_same( type, cpptypes.pointer_t( cpptypes.void_t() ) )
128128

129129
def is_integral( type ):
@@ -889,8 +889,9 @@ def is_noncopyable( class_ ):
889889
return __is_noncopyable_single( class_ )
890890

891891
def is_defined_in_xxx( xxx, cls ):
892-
"""small helper function, that checks whether class ( C{cls} ) is defined
893-
under C{::xxx} namespace"""
892+
"""
893+
small helper function, that checks whether the class `cls` is defined under `::xxx` namespace
894+
"""
894895
if not cls.parent:
895896
return False
896897

pygccxml/parser/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ def parse( files
4040
:param files: The header files that should be parsed
4141
:type files: list of str
4242
:param config: Configuration object or None
43-
:type config: L{config_t}
43+
:type config: :class:`parser.config_t`
4444
:param compilation_mode: Determines whether the files are parsed individually or as one single chunk
45-
:type compilation_mode: L{COMPILATION_MODE}
45+
:type compilation_mode: :class:`parser.COMPILATION_MODE`
4646
:param cache: Declaration cache (None=no cache)
47-
:type cache: L{cache_base_t} or str
48-
:rtype: Declarations
47+
:type cache: :class:`parser.cache_base_t` or str
48+
:rtype: list of :class:`declarations.declaration_t`
4949
"""
5050
if not config:
5151
config = config_t()

0 commit comments

Comments
 (0)