PLplot  5.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
sipplplot_pyqt4QtPLDriver.cpp
Go to the documentation of this file.
1 /*
2  * Interface wrapper code.
3  *
4  * Generated by SIP 4.14.7 on Wed Aug 14 07:31:26 2013
5  */
6 
7 #include "sipAPIplplot_pyqt4.h"
8 
9 #line 33 "/builddir/build/BUILD/plplot-5.9.9-svn12479/bindings/qt_gui/pyqt4/plplot_pyqt4.sip"
10 #include "qt.h"
11 #line 12 "./sipplplot_pyqt4QtPLDriver.cpp"
12 
13 
14 
15 class sipQtPLDriver : public QtPLDriver
16 {
17 public:
18  sipQtPLDriver(int,int);
19  sipQtPLDriver(const QtPLDriver&);
21 
22 public:
23  sipSimpleWrapper *sipPySelf;
24 
25 private:
28 };
29 
30 sipQtPLDriver::sipQtPLDriver(int a0,int a1): QtPLDriver(a0,a1), sipPySelf(0)
31 {
32 }
33 
34 sipQtPLDriver::sipQtPLDriver(const QtPLDriver& a0): QtPLDriver(a0), sipPySelf(0)
35 {
36 }
37 
39 {
41 }
42 
43 
44 /* Cast a pointer to a type somewhere in its superclass hierarchy. */
45 extern "C" {static void *cast_QtPLDriver(void *, const sipTypeDef *);}
46 static void *cast_QtPLDriver(void *ptr, const sipTypeDef *targetType)
47 {
48  if (targetType == sipType_QtPLDriver)
49  return ptr;
50 
51  return NULL;
52 }
53 
54 
55 /* Call the instance's destructor. */
56 extern "C" {static void release_QtPLDriver(void *, int);}
57 static void release_QtPLDriver(void *sipCppV,int sipState)
58 {
59  Py_BEGIN_ALLOW_THREADS
60 
61  if (sipState & SIP_DERIVED_CLASS)
62  delete reinterpret_cast<sipQtPLDriver *>(sipCppV);
63  else
64  delete reinterpret_cast<QtPLDriver *>(sipCppV);
65 
66  Py_END_ALLOW_THREADS
67 }
68 
69 
70 extern "C" {static void assign_QtPLDriver(void *, SIP_SSIZE_T, const void *);}
71 static void assign_QtPLDriver(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
72 {
73  reinterpret_cast<QtPLDriver *>(sipDst)[sipDstIdx] = *reinterpret_cast<const QtPLDriver *>(sipSrc);
74 }
75 
76 
77 extern "C" {static void *array_QtPLDriver(SIP_SSIZE_T);}
78 static void *array_QtPLDriver(SIP_SSIZE_T sipNrElem)
79 {
80  return new QtPLDriver[sipNrElem];
81 }
82 
83 
84 extern "C" {static void *copy_QtPLDriver(const void *, SIP_SSIZE_T);}
85 static void *copy_QtPLDriver(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
86 {
87  return new QtPLDriver(reinterpret_cast<const QtPLDriver *>(sipSrc)[sipSrcIdx]);
88 }
89 
90 
91 extern "C" {static void dealloc_QtPLDriver(sipSimpleWrapper *);}
92 static void dealloc_QtPLDriver(sipSimpleWrapper *sipSelf)
93 {
94  if (sipIsDerived(sipSelf))
95  reinterpret_cast<sipQtPLDriver *>(sipGetAddress(sipSelf))->sipPySelf = NULL;
96 
97  if (sipIsPyOwned(sipSelf))
98  {
99  release_QtPLDriver(sipGetAddress(sipSelf),sipSelf->flags);
100  }
101 }
102 
103 
104 extern "C" {static void *init_QtPLDriver(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
105 static void *init_QtPLDriver(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
106 {
107  sipQtPLDriver *sipCpp = 0;
108 
109  {
110  int a0 = QT_DEFAULT_X;
111  int a1 = QT_DEFAULT_Y;
112 
113  if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "|ii", &a0, &a1))
114  {
115  Py_BEGIN_ALLOW_THREADS
116  sipCpp = new sipQtPLDriver(a0,a1);
117  Py_END_ALLOW_THREADS
118 
119  sipCpp->sipPySelf = sipSelf;
120 
121  return sipCpp;
122  }
123  }
124 
125  {
126  const QtPLDriver * a0;
127 
128  if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_QtPLDriver, &a0))
129  {
130  Py_BEGIN_ALLOW_THREADS
131  sipCpp = new sipQtPLDriver(*a0);
132  Py_END_ALLOW_THREADS
133 
134  sipCpp->sipPySelf = sipSelf;
135 
136  return sipCpp;
137  }
138  }
139 
140  return NULL;
141 }
142 
143 
145 {
146  {
147  -1,
148  0,
149  0,
150  SIP_TYPE_CLASS,
152  {0}
153  },
154  {
156  {0, 0, 1},
157  0, 0,
158  0, 0,
159  0, 0,
160  {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
161  },
162  0,
164  -1,
165  0,
166  0,
168  0,
169  0,
170 #if PY_MAJOR_VERSION >= 3
171  0,
172  0,
173 #else
174  0,
175  0,
176  0,
177  0,
178 #endif
185  0,
186  0,
187  0,
188  0
189 },
190  0,
191  0,
192  0
193 };