Generator Overview¶
In a few words, the Generator is a utility that parses a collection of header and typesystem files, generating other files (code, documentation, etc.) as result.
Creating new bindings¶
Each module of the generator system has an specific role.
Provide enough data about the classes and functions.
Generate valid code, with modifications from typesystems and injected codes.
Modify the API to expose the objects in a way that fits you target language best.
Insert customizations where handwritten code is needed.
The newly created binding will run on top of Shiboken which takes care of interfacing Python and the underlying C++ library.
Handwritten inputs¶
Creating new bindings involves creating two pieces of “code”: the typesystem and the inject code.
- typesystem
XML files that provides the developer with a tool to customize the way that the generators will see the classes and functions. For example, functions can be renamed, have its signature changed and many other actions.
- inject code
allows the developer to insert handwritten code where the generated code is not suitable or needs some customization.
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.