[PyQt] %MappedType with non-class template arg?

Phil Thompson phil at riverbankcomputing.com
Fri Sep 10 10:56:30 BST 2010


On Fri, 10 Sep 2010 10:43:24 +0200, Hans Meine
<meine at informatik.uni-hamburg.de> wrote:
> Hi again!
> 
> Am Freitag 10 September 2010, 10:21:08 Phil wrote:
>> So the template arguments are constant, so don't even bother with a
>> template in sip. Just do...
>> 
>> %MappedType UInt16Array4D
>> {
>> ...
>> };
> 
> That's what I do, but it's a lot of copy-pasting, since I have different

> value_types (8,16,32 bit ints or floating point) and dimensions (2,3,4).

...you said you were only interested in the one case...

> It would be much nicer to just list the typedefs..

It's impossible to implement. The code needed would be different for each
value type. sip templates can handle different class types with the same
code because the code is identical (apart from the name of the class
itself) for all cases.

Phil


More information about the PyQt mailing list