Revision: 645
http://svn.sourceforge.net/pygccxml/?rev=645&view=rev
Author: roman_yakovenko
Date: 2006-10-11 04:45:34 -0700 (Wed, 11 Oct 2006)
Log Message:
-----------
small fix in documentation formatting
Modified Paths:
--------------
pygccxml_dev/docs/query_interface.rest
Modified: pygccxml_dev/docs/query_interface.rest
===================================================================
--- pygccxml_dev/docs/query_interface.rest 2006-10-11 10:43:41 UTC (rev 644)
+++ pygccxml_dev/docs/query_interface.rest 2006-10-11 11:45:34 UTC (rev 645)
@@ -15,6 +15,7 @@
I don't care about first argument type, but I do want second argument type to be
a reference to an integer. More over, I want those functions names to end with
"impl" string and they should be protected or private.
+
.. code-block:: Python
#global_ns is the reference to an instance of namespace_t object, that
@@ -26,6 +27,7 @@
The example is complex, but still readable. In many cases you will find your
self looking for one or many declarations using one or two properties of that
declaration(s). For example:
+
.. code-block:: Python
global_ns.namespaces( 'details' )
@@ -53,6 +55,7 @@
I will explain the usage of ``member_function`` and ``member_functions`` methods.
The usage of other methods is very similar to them. Here is definition of those
methods:
+
.. code-block:: Python
def member_function( self,
@@ -63,8 +66,8 @@
header_dir=None,
header_file=None,
recursive=None )
-
-
+
+
def member_functions( self,
name=None,
function=None,
@@ -93,10 +96,11 @@
build custom query. This object will be called with one argument - declaration,
and it should return ``True`` or ``False``.
- .. code-block:: Python
+ .. code-block:: Python
impls = my_class.member_functions( lambda decl: decl.name.endswith( 'impl' ) )
+
``impls`` will contain all member functions, that their name ends with "impl".
* ``return_type``
@@ -121,9 +125,9 @@
to skip some argument type from within comparison, you put ``None``, into
relevant position within the list.
- .. code-block:: Python
+ .. code-block:: Python
- mem_funcs = my_class.member_functions( arg_types=[ None, 'int'] )
+ mem_funcs = my_class.member_functions( arg_types=[ None, 'int'] )
``mem_funcs`` will contain all member functions, that have two arguments
and type of second argument is ``int``.
@@ -218,6 +222,7 @@
class you don't have to write loops. If will do it for you. Also if you insist to
write loops, ``mdecl_wrapper_t`` class implements ``__len__``, ``__getitem__``
and ``__iter__`` methods. So you can write next code:
+
.. code-block:: Python
for clone in global_ns.member_functions( 'clone' ):
@@ -238,7 +243,7 @@
Data structures
~~~~~~~~~~~~~~~
-Here is a short explanation of what data structures is initialized.
+Here is a short explanation of what data structures is initialized.
* ``scopedef_t._type2decls``, ``scopedef_t._type2decls_nr``
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|