[PyQt] template / container class default constructor

John Beuving johnbeuving at gmail.com
Thu Feb 3 10:50:10 GMT 2011


Hi,

I have the following c++ code which I want to SIP.

class Input
{
       Input(unsigned int windowSize=1, unsigned int stepSize=1);

       bool DataAvailable(unsigned int elements);
  };

// Template implementation
template<typename T>
class InputT: public Input
{
  public:
     InputT(unsigned int windowSize=1, unsigned int stepSize=1);
     ~InputT();

     const T& operator[] (unsigned int index) const;
     const T* operator-> () const;
     string DataType() const {return TypeName<T>();}
};

struct testData
{
     testData();

     int cnt;
};

In the python code I want to construct an object of type:

InputT<testData> test;

which should probably going to look like:

test = InputTestData()

So now I already have a MappedType for InputT<TYPE>.
But how do I add a constructor of some kind for this template class 
(like InputTestData())


John




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110203/e53f3552/attachment.html>


More information about the PyQt mailing list