diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-03 10:34:54 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-03 10:48:30 +0000 |
commit | 1d7af0b25ac241a95e33bd46561033d0b33b9013 (patch) | |
tree | 665f22d84b263dac40d22bdf8fa58536d7a46c85 /sources/shiboken2/doc/typesystem_modify_function.rst | |
parent | 66f466b6c80dc3bc016c7e8f98898805ab2d149e (diff) |
shiboken: Move the Api extractor documentation into shiboken
It does not really make sense to have it separately and the reference
documentation is currently not accessible from the TOC. Move it over
and append it to the TOC. Merge the chapters on ownership chapters
(for starters, by simply concatenating).
The Api extractor overview chapter is dropped as it is outdated anyways.
Partially reverts 0d12d71920067be499d9237b4ad04f7f11047759.
Task-number: PYSIDE-363
Change-Id: I02f6b0a4bb91fc54267fa03cefd2ac7d4049f07b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Diffstat (limited to 'sources/shiboken2/doc/typesystem_modify_function.rst')
-rw-r--r-- | sources/shiboken2/doc/typesystem_modify_function.rst | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/sources/shiboken2/doc/typesystem_modify_function.rst b/sources/shiboken2/doc/typesystem_modify_function.rst new file mode 100644 index 000000000..071cea4f5 --- /dev/null +++ b/sources/shiboken2/doc/typesystem_modify_function.rst @@ -0,0 +1,78 @@ +.. _modifying-functions: + +Modifying Functions +------------------- + +.. _modify-argument: + +modify-argument +^^^^^^^^^^^^^^^ + + The modify-argument node specifies which of the given function's arguments the + modification affects, and is a child of the modify-function node. Use the + remove-argument, replace-default-expression, remove-default-expression, + replace-type, reference-count and define-ownership nodes to specify the details + of the modification. + + .. code-block:: xml + + <modify-function> + <modify-argument index="return | this | 1 ..." > + // modifications + </modify-argument> + </modify-function> + + Set the ``index`` attribute to "1" for the first argument, "2" for the second + one and so on. Alternatively, set it to "return" or "this" if you want to + modify the function's return value or the object the function is called upon, + respectively. + +.. _remove: + +remove +^^^^^^ + + The remove node removes the given method from the generated target language + API, and it is a child of the modify-function node. + + .. code-block:: xml + + <modify-function> + <remove class="all" /> + </modify-function> + + .. warning:: This tag is deprecated, use the ``remove`` attribute from :ref:`modify-function` tag instead. + +.. _access: + +access +^^^^^^ + + The access node changes the access privileges of the given function in the + generated target language API, and it is a child of the modify-function node. + + .. code-block:: xml + + <modify-function> + <access modifier="public | protected | private"/> + </modify-function> + + .. warning:: This tag is deprecated, use the ``access`` attribute from :ref:`modify-function` tag instead. + +.. _rename: + +rename +^^^^^^ + + The rename node changes the name of the given function in the generated target + language API, and it is a child of the modify-function node. + + .. code-block:: xml + + <modify-function> + <rename to="..." /> + </modify-function> + + The ``to`` attribute is the new name of the function. + + .. warning:: This tag is deprecated, use the ``rename`` attribute from :ref:`modify-function` tag instead. |