@@ -22,7 +22,7 @@ a reference to an integer. More over, I want those functions names to end with
2222 query = query & ~ declarations.access_type_matcher_t( ' public' )
2323 global_ns.member_functions( function = query, arg_types = [None , ' int &' ] )
2424
25- The example is complex , but still readable. In many cases you will find
25+ The example is complex , but still readable. In many cases you will find
2626yourself, looking for one or many declarations, using one or two declaration properties.
2727For example:
2828
@@ -38,11 +38,16 @@ User interface
3838
3939As you already know, `` pygccxml.declarations`` package defines the following classes:
4040
41- * `` scopedef_t`` - base class for all classes, that can contain other declarations
41+ * :class :`scopedef_t < pygccxml.declarations.scopedef.scopedef_t> ` - base class
42+ for all classes, that can contain other declarations
4243
43- * `` namespace_t`` - derives from `` scopedef_t`` class , represents C++ namespace
44+ * :class :`namespace_t < pygccxml.declarations.namespace.namespace_t> ` - derives
45+ from :class :`scopedef_t < pygccxml.declarations.scopedef.scopedef_t> ` class ,
46+ represents C++ namespace
4447
45- * `` class_t`` - derives from `` scopedef_t`` class , represents C++ class / struct/ union.
48+ * :class :`class_t < pygccxml.declarations.class_declaration.class_t> ` - derives
49+ from :class :`scopedef_t < pygccxml.declarations.scopedef.scopedef_t> ` class ,
50+ represents C++ class / struct/ union.
4651
4752So, the query methods defined on `` scopedef_t`` class could be used on instances
4853of `` class_t`` and `` namespace_t`` classes. I am sure you knew that.
@@ -64,9 +69,9 @@ methods:
6469 header_dir = None ,
6570 header_file = None ,
6671 recursive = None )
67-
72+
6873 mem_fun = member_function # just an alias
69-
74+
7075 def member_functions( self ,
7176 name = None ,
7277 function = None ,
@@ -76,7 +81,7 @@ methods:
7681 header_file = None ,
7782 recursive = None ,
7883 allow_empty = None )
79- mem_funs = member_functions
84+ mem_funs = member_functions
8085
8186
8287As you can see, from the method arguments you can search for member function
@@ -106,13 +111,13 @@ by:
106111
107112 * `` return_type``
108113
109- the function return type . This argument can be string or an object that describes
114+ the function return type . This argument can be string or an object that describes
110115 C++ type .
111116
112117 .. code- block:: python
113118
114119 mem_funcs = my_class.member_functions( return_type = ' int' )
115-
120+
116121 i = declarations.int_t()
117122 ref_i = declarations.reference_t( i )
118123 const_ref_i = declarations.const_t( ref_i )
128133
129134 .. code- block:: python
130135
131- mem_funcs = my_class.member_functions( arg_types = [ None , ' int' ] )
136+ mem_funcs = my_class.member_functions( arg_types = [ None , ' int' ] )
132137
133138 `` mem_funcs`` will contain all member functions, which have two arguments
134139 and type of second argument is `` int `` .
@@ -286,10 +291,8 @@ query method, you can take a look on API documentation or into source code.
286291.. _`call policies` : http:// boost.org/ libs/ python/ doc/ tutorial/ doc/ html/ python/ functions.html# python.call_policies
287292.. _`Call policies` : http:// boost.org/ libs/ python/ doc/ tutorial/ doc/ html/ python/ functions.html# python.call_policies
288293
289- .. _`SourceForge` : http:// sourceforge.net/ index.php
290294.. _`Python` : http:// www.python.org
291295.. _`GCC - XML ` : http:// www.gccxml.org
292296.. _`UML diagram` : declarations_uml.png
293297.. _`parser package UML diagram` : parser_uml.png
294- .. _`ReleaseForge` : http:// releaseforge.sourceforge.net
295298.. _`boost::type_traits` : http:// www.boost.org/ libs/ type_traits/ index.html
0 commit comments