From 2bfd1de3495b18c0ecc251260442a9a46009861e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 20 Jul 2018 14:52:21 +0200 Subject: shiboken: Add a typedef typesystem entry The intention is be able to specify typedef std::optional OptionalInt in the typesystem file and generate code for it (without having a typedef in C++). Task-number: PYSIDE-725 Change-Id: I5847a3c3f68556ac1d0ea3635f65a29caa6cb208 Reviewed-by: Christian Tismer --- .../doc/typesystem_specifying_types.rst | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst') diff --git a/sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst b/sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst index c5f6463fd..c8a31a426 100644 --- a/sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst +++ b/sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst @@ -329,6 +329,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 + + + + + The **source** attribute is the source. Example: + + .. code-block:: xml + + + \n" + + + + is equivalent to + + .. code-block:: c++ + + typedef std::optional IntOptional; + + The *optional* **since** value is used to specify the API version of this type. .. _custom-type: -- cgit v1.2.3