summaryrefslogtreecommitdiffstats
path: root/doc/commandlineoptions.rst
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2009-11-30 19:13:52 -0300
committerLauro Neto <lauro.neto@openbossa.org>2009-12-03 17:15:48 -0300
commit88d1620754d316d14bfb7f47db1ea39bf12b0cee (patch)
treeaafb334c07850ea46527d18adeebd46ec79c0cb6 /doc/commandlineoptions.rst
parentfb8e301e45907c43b65a2b7a17dd7f6363746e3a (diff)
downloadshiboken-88d1620754d316d14bfb7f47db1ea39bf12b0cee.tar.gz
shiboken-88d1620754d316d14bfb7f47db1ea39bf12b0cee.tar.xz
shiboken-88d1620754d316d14bfb7f47db1ea39bf12b0cee.zip
Initial ownership documentation
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'doc/commandlineoptions.rst')
-rw-r--r--doc/commandlineoptions.rst22
1 files changed, 14 insertions, 8 deletions
diff --git a/doc/commandlineoptions.rst b/doc/commandlineoptions.rst
index ddd864a4..eede06b3 100644
--- a/doc/commandlineoptions.rst
+++ b/doc/commandlineoptions.rst
@@ -1,15 +1,21 @@
Command line options
********************
-At the moment, there is just one flag to change the |project| behaviour, ``--enable-parent-ctor-heuristic``. This flag enable an usefull heuristic which can save a lot of work when writing the typesystem.
+Usage
+-----
-This heuristic will be triggered when generating code for a method and:
+::
-* The function is a constructor.
-* The argument name is "parent".
-* The argument type is a pointer to an object.
+ shiboken [options]
-When triggered, the heuristic will set the argument named "parent" as the parent of the current object.
-Being a child of an object means that when the object's parent dies, the C++ instance also dies, so the Python references will be invalidated.
-The main focus of this tag was to remove a lot of hand written code from typesystem when binding Qt libraries, for Qt, this heuristic is never wrong, but be aware that it might be when binding your own libraries.
+Options
+-------
+
+.. _option-heuristic:
+
+``--enable-parent-ctor-heuristic``
+ This flag enable an useful heuristic which can save a lot of work related to object ownership when
+ writing the typesystem.
+ For more info, check :ref:`ownership-parent-heuristics`.
+