diff options
Diffstat (limited to 'sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst')
-rw-r--r-- | sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst | 65 |
1 files changed, 64 insertions, 1 deletions
diff --git a/sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst b/sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst index 322f9bca6..c3180ae88 100644 --- a/sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst +++ b/sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst @@ -11,7 +11,7 @@ typesystem .. code-block:: xml - <typesystem package="..." default-superclass="..."> + <typesystem package="..." default-superclass="..." exception-handling="..."> </typesystem> The **package** attribute is a string describing the package to be used, @@ -19,6 +19,9 @@ typesystem The *optional* **default-superclass** attribute is the canonical C++ base class name of all objects, e.g., "object". + The *optional* **exception-handling** attribute specifies the default exception + handling mode of all objects (see :ref:`modify-function`). + load-typesystem ^^^^^^^^^^^^^^^ @@ -216,6 +219,7 @@ value-type <typesystem> <value-type name="..." since="..." copyable="yes | no" + exception-handling="..." hash-function="..." stream="yes | no" default-constructor="..." @@ -243,6 +247,9 @@ value-type The **revision** attribute can be used to specify a revision for each type, easing the production of ABI compatible bindings. + The *optional* **exception-handling** attribute specifies the default exception + handling mode of all functions (see :ref:`modify-function`). + .. _object-type: object-type @@ -258,6 +265,7 @@ object-type <object-type name="..." since="..." copyable="yes | no" + exception-handling="..." hash-function="..." stream="yes | no" revision="..." /> @@ -278,6 +286,9 @@ object-type The **revision** attribute can be used to specify a revision for each type, easing the production of ABI compatible bindings. + The *optional* **exception-handling** attribute specifies the default exception + handling mode of all functions (see :ref:`modify-function`). + interface-type ^^^^^^^^^^^^^^ @@ -329,6 +340,38 @@ container-type The *optional* **since** value is used to specify the API version of this container. +typedef-type +^^^^^^^^^^^^ + + The typedef-type allows for specifying typedefs in the typesystem. They + are mostly equivalent to spelling out the typedef in the included header, which + is often complicated when trying to wrap libraries whose source code cannot be + easily extended. + + .. code-block:: xml + + <typesystem> + <typedef-type name="..." + source="..." + since="..." + </typesystem> + + The **source** attribute is the source. Example: + + .. code-block:: xml + + <namespace-type name='std'> + <value-type name='optional' generate='no'/>\n" + </namespace-type> + <typedef-type name="IntOptional" source="std::optional<int>"/> + + is equivalent to + + .. code-block:: c++ + + typedef std::optional<int> IntOptional; + + The *optional* **since** value is used to specify the API version of this type. .. _custom-type: @@ -348,6 +391,26 @@ custom-type The **name** attribute is the name of the custom type, e.g., "PyObject". +.. _smart-pointer-type: + +smart-pointer-type +^^^^^^^^^^^^^^^^^^ + + The smart pointer type node indicates that the given class is a smart pointer + and requires inserting calls to **getter** to access the pointeee. + Currently, only the **type** *shared* is supported and the usage is limited + to function return values. + **ref-count-method** specifies the name of the method used to do reference counting. + + .. code-block:: xml + + <typesystem> + <smart-pointer-type name="..." + since="..." + type="..." + getter="..." + ref-count-method="..."/> + </typesystem> .. _function: |