[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Wrapping a scoped template type
From:       Philip Lorenz <lorenzph+sip () in ! tum ! de>
Date:       2010-03-21 11:03:04
Message-ID: 4BA5FCE8.9050004 () in ! tum ! de
[Download RAW message or body]

On 03/21/2010 11:38 AM, Phil Thompson wrote:
> Do you want to define a template to SIP, or are you only interested in the
> <MyType>  version?
>
> If the latter then...
>
> %ModuleHeaderCode
> typedef std::set<MyType>::iterator MyTypeSetIterator;
> %End
>
> %MappedType MyTypeSetIterator
> ...
> %End
>
>    
This worked great. Thanks.
> If the former then the following might work...
>
> %ModuleHeaderCode
> typedef std::set<T>::iterator std::set_iterator<T>
> %End
>
> template<T>
> %MappedType std::set_iterator<T>
> ...
> %End
>
>    
Does not seem to work as C++ is currently lacking templated typedefs. 
However the first solution solves my case perfectly.


Philip
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic