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:
[[Category:LanguageBindings::PySide::Shiboken::PySide Binding Generation Tutorial]]<br />[toc align_right=&quot;yes&amp;quot; depth=&quot;3&amp;quot;]
[[Category:LanguageBindings::PySide::Shiboken::PySide Binding Generation Tutorial]]
[toc align_right="yes" depth="3"]


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


* '''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  
* '''Note:''' this article is a member of the multipart "PySide Binding Generation Tutorial":http://developer.qt.nokia.com/wiki/Category:LanguageBindings::PySide::Shiboken::PySide_Binding_Generation_Tutorial  


= Creating the Type System Description =
= Creating the Type System Description =
Line 9: Line 10:
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.
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.


<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>
<code>
<?xml version="1.0"?>
<typesystem package="foo">
<load-typesystem name="typesystem_core.xml" generate="no" />
<object-type name="Math" /&amp;amp;gt;
</typesystem>
</code>

Revision as of 10:04, 25 February 2015

[toc align_right="yes" depth="3"]

English "French":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.

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