aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/doc/typesystem_specifying_types.rst
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/doc/typesystem_specifying_types.rst')
-rw-r--r--sources/shiboken2/doc/typesystem_specifying_types.rst81
1 files changed, 53 insertions, 28 deletions
diff --git a/sources/shiboken2/doc/typesystem_specifying_types.rst b/sources/shiboken2/doc/typesystem_specifying_types.rst
index ac1121461..221519541 100644
--- a/sources/shiboken2/doc/typesystem_specifying_types.rst
+++ b/sources/shiboken2/doc/typesystem_specifying_types.rst
@@ -104,6 +104,7 @@ primitive-type
<typesystem>
<primitive-type name="..."
since="..."
+ until="..."
target-name="..."
default-constructor="..."
preferred-conversion="yes | no" />
@@ -114,7 +115,11 @@ primitive-type
language. If the later two attributes are not specified their default value
will be the same as the **name** attribute.
- The *optional* **since** value is used to specify the API version of this type.
+ The *optional* **since** value is used to specify the API version in which
+ the type was introduced.
+
+ Similarly, the *optional* **until** value can be used to specify the API
+ version in which the type will be obsoleted.
If the *optional* **preferred-conversion** attribute is set to *no*, it
indicates that this version of the primitive type is not the preferred C++
@@ -148,7 +153,9 @@ namespace-type
<typesystem>
<namespace-type name="..."
+ visible="true | auto | false"
generate="yes | no"
+ generate-using="yes | no"
package="..."
since="..."
revision="..." />
@@ -156,8 +163,23 @@ namespace-type
The **name** attribute is the name of the namespace, e.g., "Qt".
- The *optional* **generate** attribute is used to inform if you need to prepend
- the given namespace into each generated class. Its default value is **yes**.
+ The *optional* **visible** attribute is used specify whether the
+ namespace is visible in the target language name. Its default value is
+ **auto**. It means that normal namespaces are visible, but inline namespaces
+ (as introduced in C++ 11) will not be visible.
+
+ The detection of inline namespaces requires shiboken to be built
+ using LLVM 9.0.
+
+ The *optional* **generate** is a legacy attribute. Specifying
+ **no** is equivalent to **visible="false"**.
+
+ The *optional* **generate-using** attribute specifies whether
+ ``using namespace`` is generated into the wrapper code for classes within
+ the namespace (default: **yes**). This ensures for example that not fully
+ qualified enumeration values of default argument values compile.
+ However, in rare cases, it might cause ambiguities and can then be turned
+ off.
The **package** attribute can be used to override the package of the type system.
@@ -321,30 +343,7 @@ object-type
interface-type
^^^^^^^^^^^^^^
- The interface-type node indicates that the given class is replaced by an
- interface pattern when mapping from C++ to the target language. Using the
- interface-type node implicitly makes the given type an :ref:`object-type`.
-
- .. code-block:: xml
-
- <typesystem>
- <interface-type name="..."
- since="..."
- package ="..."
- default-superclass ="..."
- revision="..." />
- </typesystem>
-
- The **name** attribute is the fully qualified C++ class name. The *optional*
- **package** attribute can be used to override the package of the type system.
- If there is no C++ base class, the *optional* **default-superclass** attribute
- can be used to specify a superclass in the generated target language API, for
- the given class.
-
- The *optional* **since** value is used to specify the API version of this interface.
-
- The **revision** attribute can be used to specify a revision for each type, easing the
- production of ABI compatible bindings.
+ This type is deprecated and no longer has any effect. Use object-type instead.
.. _container-type:
@@ -431,6 +430,14 @@ smart-pointer-type
to function return values.
**ref-count-method** specifies the name of the method used to do reference counting.
+ The *optional* attribute **instantiations** specifies for which instantiations
+ of the smart pointer wrappers will be generated (comma-separated list).
+ By default, this will happen for all instantiations found by code parsing.
+ This might be a problem when linking different modules, since wrappers for the
+ same instantiation might be generated into different modules, which then clash.
+ Providing an instantiations list makes it possible to specify which wrappers
+ will be generated into specific modules.
+
.. code-block:: xml
<typesystem>
@@ -438,7 +445,8 @@ smart-pointer-type
since="..."
type="..."
getter="..."
- ref-count-method="..."/>
+ ref-count-method="..."
+ instantiations="..."/>
</typesystem>
.. _function:
@@ -462,3 +470,20 @@ function
The function tag has two *optional* attributes: **since**, whose value is used to specify
the API version of this function, and **rename**, to modify the function name.
+.. _system_include:
+
+system-include
+^^^^^^^^^^^^^^
+
+ The optional **system-include** specifies the name of a system include
+ file or a system include path (indicated by a trailing slash) to be
+ parsed. Normally, include files considered to be system include
+ files are skipped by the C++ code parser. Its primary use case
+ is exposing classes from the STL library.
+
+ .. code-block:: xml
+
+ <typesystem>
+ <system-include file-name="memory"/>
+ <system-include file-name="/usr/include/Qt/"/>
+ </typesystem>