summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-11-30 18:00:24 -0200
committerHugo Lima <hugo.lima@openbossa.org>2009-11-30 20:43:18 -0200
commitea768f172b2114c0a07e07e5ae7903f675bc665d (patch)
treed118a5c3fd37fdbd36416bc9481d03f861a80639 /doc
parented4721dd84cb3f637dabb6803c7692c11437f80a (diff)
downloadshiboken-ea768f172b2114c0a07e07e5ae7903f675bc665d.tar.gz
shiboken-ea768f172b2114c0a07e07e5ae7903f675bc665d.tar.xz
shiboken-ea768f172b2114c0a07e07e5ae7903f675bc665d.zip
Added documentation to shiboken command line options.
Diffstat (limited to 'doc')
-rw-r--r--doc/_templates/index.html2
-rw-r--r--doc/commandlineoptions.rst15
2 files changed, 17 insertions, 0 deletions
diff --git a/doc/_templates/index.html b/doc/_templates/index.html
index 2accb5d2..a92815e2 100644
--- a/doc/_templates/index.html
+++ b/doc/_templates/index.html
@@ -15,6 +15,8 @@
<span class="linkdescr">describes the type system variables that could be used in user custom code</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("codeinjectionsemantics") }}">Code Injection Semantics</a><br/>
<span class="linkdescr">explains how custom code injection is interpreted by {{ project }}</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("commandlineoptions") }}">Command line options</a><br/>
+ <span class="linkdescr">explains the few flags used to change {{ project }} behaviour</span></p>
</td>
<td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("sequenceprotocol") }}">Sequence Protocol</a><br/>
diff --git a/doc/commandlineoptions.rst b/doc/commandlineoptions.rst
new file mode 100644
index 00000000..ddd864a4
--- /dev/null
+++ b/doc/commandlineoptions.rst
@@ -0,0 +1,15 @@
+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.
+
+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.
+
+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.