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
 
No edit summary
Line 1: Line 1:
'''English''' [http://qt-devnet.developpez.com/tutoriels/python/pyside/binding-shiboken/#LV French] ''[qt-devnet.developpez.com]''
[[Category:LanguageBindings::PySide::Shiboken::PySide Binding Generation Tutorial]]<br />[toc align_right=&quot;yes&amp;quot; depth=&quot;3&amp;quot;]


* '''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]''
'''English''' &quot;French&amp;quot;:http://qt-devnet.developpez.com/tutoriels/python/pyside/binding-shiboken/#LV


=Creating the Type System Description=
* '''Note:''' this article is a member of the multipart &quot;PySide Binding Generation Tutorial&amp;quot;:http://developer.qt.nokia.com/wiki/Category:LanguageBindings::PySide::Shiboken::PySide_Binding_Generation_Tutorial


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.
= Creating the Type System Description =


'''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.
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.


===Categories:===
<code><br />&amp;lt;?xml version=&quot;1.0&amp;quot;?&amp;gt;<br />&lt;typesystem package=&quot;foo&amp;quot;&gt;<br /> &lt;load-typesystem name=&quot;typesystem_core.xml&amp;quot; generate=&quot;no&amp;quot; /&amp;gt;<br /> &amp;lt;object-type name=&quot;Math&amp;quot; /&amp;amp;gt;<br />&lt;/typesystem&amp;gt;<br /></code>
 
* [[:Category:LanguageBindings|LanguageBindings]]
** [[:Category:LanguageBindings::PySide|PySide]]
* [[:Category:LanguageBindings::PySide::Shiboken|Shiboken]]
** [[:Category:LanguageBindings::PySide::Shiboken::PySide-Binding-Generation-Tutorial|PySide Binding Generation Tutorial]]

Revision as of 09:43, 24 February 2015


[toc align_right="yes&quot; depth="3&quot;]

English "French&quot;:http://qt-devnet.developpez.com/tutoriels/python/pyside/binding-shiboken/#LV

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.

<br />&amp;lt;?xml version=&quot;1.0&amp;quot;?&amp;gt;<br />&lt;typesystem package=&quot;foo&amp;quot;&gt;<br /> &lt;load-typesystem name=&quot;typesystem_core.xml&amp;quot; generate=&quot;no&amp;quot; /&amp;gt;<br /> &amp;lt;object-type name=&quot;Math&amp;quot; /&amp;amp;gt;<br />&lt;/typesystem&amp;gt;<br />