PySide Binding Generation Tutorial: Module 3 Creating Type System Description: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
(Change category "LanguageBindings::PySide::Shiboken::PySide Binding Generation Tutorial" -> "PySide")
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''English''' [http://qt-devnet.developpez.com/tutoriels/python/pyside/binding-shiboken/#LV French] ''[qt-devnet.developpez.com]''


* '''Note:''' this article is a member of the multipart [http://developer.qt.nokia.com/wiki/Category:LanguageBindings::PySide::Shiboken::PySide_Binding_Generation_Tutorial PySide Binding Generation Tutorial] ''[developer.qt.nokia.com]''
[[Category:PySide]]


=Creating the Type System Description=


The type system is a specification that maps a C++ based library onto a corresponding Python module. The specification is a handwritten <span class="caps">XML</span> document listing the types that will be available in the generated binding, modifications to classes and function signatures to better suit the target language, and listing the components that should be rejected for the binding.
'''English''' [http://qt-devnet.developpez.com/tutoriels/python/pyside/binding-shiboken/#LV French]


'''PySide''' type system format is described to some extent in the [http://www.pyside.org/docs/apiextractor/typesystem.html <span class="caps">API</span> Extractor Reference] ''[pyside.org]'' (this format is similar to the one used by '''QtJambi''' and '''QtScript''' as described in [http://doc.trolltech.com/qtjambi-4.4/html/com/trolltech/qt/qtjambi-typesystem.html The Qt Jambi Type System] ''[doc.trolltech.com]'' page). Each Qt module is mapped to it’s own typesystem provided by PySide, i. e. QtCore/typesystem_core.xml, QtGui/typesystem_gui.xml.
* '''Note:''' this article is a member of the multipart [https://wiki.qt.io/PySide_Binding_Generation_Tutorial PySide Binding Generation Tutorial]  


===Categories:===
= Creating the Type System Description =


* [[:Category:LanguageBindings|LanguageBindings]]
The type system is a specification that maps a C++ based library onto a corresponding Python module. The specification is a handwritten XML document listing the types that will be available in the generated binding, modifications to classes and function signatures to better suit the target language, and listing the components that should be rejected for the binding.
** [[:Category:LanguageBindings::PySide|PySide]]
 
* [[:Category:LanguageBindings::PySide::Shiboken|Shiboken]]
<code>
** [[:Category:LanguageBindings::PySide::Shiboken::PySide-Binding-Generation-Tutorial|PySide Binding Generation Tutorial]]
<?xml version="1.0"?>
<typesystem package="foo">
<load-typesystem name="typesystem_core.xml" generate="no" />
<object-type name="Math" />
</typesystem>
</code>

Latest revision as of 05:06, 5 June 2016


English French

Creating the Type System Description

The type system is a specification that maps a C++ based library onto a corresponding Python module. The specification is a handwritten XML document listing the types that will be available in the generated binding, modifications to classes and function signatures to better suit the target language, and listing the components that should be rejected for the binding.

<?xml version="1.0"?>
<typesystem package="foo">
 <load-typesystem name="typesystem_core.xml" generate="no" />
 <object-type name="Math" />
</typesystem>