aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/doc/shibokengenerator.rst
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/doc/shibokengenerator.rst')
-rw-r--r--sources/shiboken6/doc/shibokengenerator.rst104
1 files changed, 72 insertions, 32 deletions
diff --git a/sources/shiboken6/doc/shibokengenerator.rst b/sources/shiboken6/doc/shibokengenerator.rst
index ddc2c64a1..14340ab69 100644
--- a/sources/shiboken6/doc/shibokengenerator.rst
+++ b/sources/shiboken6/doc/shibokengenerator.rst
@@ -52,13 +52,13 @@ Handwritten inputs
Creating new bindings involves creating several pieces of "code": the header,
the typesystem and, in most cases, the injected code.
-:header: A header with ``#include`` directives listing all the headers of the
- desired classes. This header is not referenced by the generated code.
- Alternatively, it is possible to pass a list of the headers of the
- desired classes directly on the command line. In this case,
- the command line option ``--use-global-header`` should be passed as
- well to prevent the headers from being suppressed in the generated
- code.
+**header** A header with ``#include`` directives listing all the headers of the
+ desired classes. This header is not referenced by the generated code.
+ Alternatively, it is possible to pass a list of the headers of the
+ desired classes directly on the command line. In this case,
+ the command line option ``--use-global-header`` should be passed as
+ well to prevent the headers from being suppressed in the generated
+ code.
::ref:`typesystem`: XML files that provides the developer with a tool to customize the
way that the generators will see the classes and functions. For
@@ -112,17 +112,30 @@ Options
``--avoid-protected-hack``
Avoid the use of the '#define protected public' hack.
-.. _use-isnull-as-nb-nonzero:
+.. _use-isnull-as-nb-bool:
-``--use-isnull-as-nb_nonzero``
+``--use-isnull-as-nb-bool``
If a class has an isNull() const method, it will be used to
compute the value of boolean casts (see :ref:`bool-cast`).
+ The legacy option ``--use-isnull-as-nb_nonzero`` has the
+ same effect, but should not be used any more.
-.. _use-operator-bool-as-nb-nonzero:
+``--lean-headers``
+ Forward declare classes in module headers instead of including their class
+ headers where possible.
-``--use-operator-bool-as-nb_nonzero``
+.. _use-operator-bool-as-nb-bool:
+
+``--use-operator-bool-as-nb-bool``
If a class has an operator bool, it will be used to compute
the value of boolean casts (see :ref:`bool-cast`).
+ The legacy option ``--use-operator-bool-as-nb_nonzero`` has the
+ same effect, but should not be used any more.
+
+.. _no-implicit-conversions:
+
+``--no-implicit-conversions``
+ Do not generate implicit_conversions for function arguments.
.. _api-version:
@@ -189,12 +202,21 @@ Options
When '-' is passed as the first option in the list, none of the options
built into shiboken will be added, allowing for a complete replacement.
+``--compiler=<type>``
+ Emulated compiler type (g++, msvc, clang)
+
+``--compiler-path=<file>``
+ Path to the compiler for determining builtin include paths
+
+``--platform=<file>``
+ Emulated platform (windows, darwin, unix)
+
.. _include-paths:
``-I<path>, --include-paths=<path>[:<path>:...]``
Include paths used by the C++ parser.
-... _system-include-paths:
+.. _system-include-paths:
``-isystem<path>, --system-include-paths=<path>[:<path>:...]``
System include paths used by the C++ parser
@@ -204,6 +226,12 @@ Options
``-F<path>, --framework-include-paths=<path>[:<path>:...]``
Framework include paths used by the C++ parser
+.. _force-process-system-include-paths:
+
+``--force-process-system-include-paths=<path>[:<path>:...]``
+ Include paths that are considered as system headers by the C++ parser,
+ but should still be processed to extract types
+
.. _language-level:
``--language-level=, -std=<level>``
@@ -229,6 +257,10 @@ Options
``--no-suppress-warnings``
Show all warnings.
+``--log-unmatched``
+ Prints :ref:`suppress-warning` and :ref:`rejection` elements that were
+ not matched. This is useful for cleaning up old type system files.
+
.. _silent:
``--silent``
@@ -244,6 +276,9 @@ Options
``--help``
Display this help and exit.
+``--print-builtin-types``
+ Print information about builtin types
+
.. _version:
``--version``
@@ -284,6 +319,12 @@ QtDocGenerator Options
List of additional XML files to be converted to .rst files
(for example, tutorials).
+``--inheritance-file=<file>``
+ Generate a JSON file containing the class inheritance.
+
+``--disable-inheritance-diagram``
+ Disable the generation of the inheritance diagram.
+
.. _project-file:
********************
@@ -301,18 +342,18 @@ The project file structure
Here follows a comprehensive example of a generator project file.
- .. code-block:: ini
+.. code-block:: ini
- [generator-project]
- generator-set = path/to/generator/CHOICE_GENERATOR
- header-file = DIR/global.h" />
- typesystem-file = DIR/typesystem_for_your_binding.xml
- output-directory location="OUTPUTDIR" />
- include-path = path/to/library/being/wrapped/headers/1
- include-path = path/to/library/being/wrapped/headers/2
- typesystem-path = path/to/directory/containing/type/system/files/1
- typesystem-path = path/to/directory/containing/type/system/files/2
- enable-parent-ctor-heuristic
+ [generator-project]
+ generator-set = path/to/generator/CHOICE_GENERATOR
+ header-file = DIR/global.h" />
+ typesystem-file = DIR/typesystem_for_your_binding.xml
+ output-directory location="OUTPUTDIR" />
+ include-path = path/to/library/being/wrapped/headers/1
+ include-path = path/to/library/being/wrapped/headers/2
+ typesystem-path = path/to/directory/containing/type/system/files/1
+ typesystem-path = path/to/directory/containing/type/system/files/2
+ enable-parent-ctor-heuristic
Project file tags
@@ -328,26 +369,25 @@ generator project file following simple conversion rules.
For tags without options, just write as an empty tag without any attributes.
Example:
- .. code-block:: bash
+.. code-block:: bash
- --BOOLEAN-ARGUMENT
+ --BOOLEAN-ARGUMENT
becomes
- .. code-block:: ini
+.. code-block:: ini
- BOOLEAN-ARGUMENT
+ BOOLEAN-ARGUMENT
and
- .. code-block:: bash
+.. code-block:: bash
- --VALUE-ARGUMENT=VALUE
+ --VALUE-ARGUMENT=VALUE
becomes
- .. code-block:: ini
-
- VALUE-ARGUMENT = VALUE
+.. code-block:: ini
+ VALUE-ARGUMENT = VALUE