1 /*
2  * Interface wrapper code.
3  *
4  * Generated by SIP 4.19.16
5  *
6  *     Copyright: (c) 2018 by Total Control Software
7  *     License:   wxWindows License
8  */
9 
10 #include "sipAPI_core.h"
11 
12         #include <wx/filesys.h>
13 
14         #include <wx/filesys.h>
15         #include <wx/filesys.h>
16         #include <wx/object.h>
17         #include <wx/object.h>
18         #include <wx/object.h>
19 
20 
21 class sipwxFileSystemHandler : public  ::wxFileSystemHandler
22 {
23 public:
24     sipwxFileSystemHandler();
25     sipwxFileSystemHandler(const  ::wxFileSystemHandler&);
26     virtual ~sipwxFileSystemHandler();
27 
28     /*
29      * There is a public method for every protected method visible from
30      * this class.
31      */
32     static  ::wxString sipProtect_GetAnchor(const  ::wxString&);
33     static  ::wxString sipProtect_GetLeftLocation(const  ::wxString&);
34     static  ::wxString sipProtect_GetProtocol(const  ::wxString&);
35     static  ::wxString sipProtect_GetRightLocation(const  ::wxString&);
36 
37     /*
38      * There is a protected method for every virtual method visible from
39      * this class.
40      */
41 protected:
42      ::wxFSFile* OpenFile( ::wxFileSystem&,const  ::wxString&) SIP_OVERRIDE;
43      ::wxString FindNext() SIP_OVERRIDE;
44      ::wxString FindFirst(const  ::wxString&,int) SIP_OVERRIDE;
45     bool CanOpen(const  ::wxString&) SIP_OVERRIDE;
46 
47 public:
48     sipSimpleWrapper *sipPySelf;
49 
50 private:
51     sipwxFileSystemHandler(const sipwxFileSystemHandler &);
52     sipwxFileSystemHandler &operator = (const sipwxFileSystemHandler &);
53 
54     char sipPyMethods[4];
55 };
56 
sipwxFileSystemHandler()57 sipwxFileSystemHandler::sipwxFileSystemHandler():  ::wxFileSystemHandler(), sipPySelf(SIP_NULLPTR)
58 {
59     memset(sipPyMethods, 0, sizeof (sipPyMethods));
60 }
61 
sipwxFileSystemHandler(const::wxFileSystemHandler & a0)62 sipwxFileSystemHandler::sipwxFileSystemHandler(const  ::wxFileSystemHandler& a0):  ::wxFileSystemHandler(a0), sipPySelf(SIP_NULLPTR)
63 {
64     memset(sipPyMethods, 0, sizeof (sipPyMethods));
65 }
66 
~sipwxFileSystemHandler()67 sipwxFileSystemHandler::~sipwxFileSystemHandler()
68 {
69     sipInstanceDestroyedEx(&sipPySelf);
70 }
71 
OpenFile(::wxFileSystem & fs,const::wxString & location)72  ::wxFSFile* sipwxFileSystemHandler::OpenFile( ::wxFileSystem& fs,const  ::wxString& location)
73 {
74     sip_gilstate_t sipGILState;
75     PyObject *sipMeth;
76 
77     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,sipName_FileSystemHandler,sipName_OpenFile);
78 
79     if (!sipMeth)
80         return 0;
81 
82     extern  ::wxFSFile* sipVH__core_12(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxFileSystem&,const  ::wxString&);
83 
84     return sipVH__core_12(sipGILState, 0, sipPySelf, sipMeth, fs, location);
85 }
86 
FindNext()87  ::wxString sipwxFileSystemHandler::FindNext()
88 {
89     sip_gilstate_t sipGILState;
90     PyObject *sipMeth;
91 
92     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,SIP_NULLPTR,sipName_FindNext);
93 
94     if (!sipMeth)
95         return  ::wxFileSystemHandler::FindNext();
96 
97     extern  ::wxString sipVH__core_11(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
98 
99     return sipVH__core_11(sipGILState, 0, sipPySelf, sipMeth);
100 }
101 
FindFirst(const::wxString & wildcard,int flags)102  ::wxString sipwxFileSystemHandler::FindFirst(const  ::wxString& wildcard,int flags)
103 {
104     sip_gilstate_t sipGILState;
105     PyObject *sipMeth;
106 
107     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[2],sipPySelf,SIP_NULLPTR,sipName_FindFirst);
108 
109     if (!sipMeth)
110         return  ::wxFileSystemHandler::FindFirst(wildcard,flags);
111 
112     extern  ::wxString sipVH__core_10(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::wxString&,int);
113 
114     return sipVH__core_10(sipGILState, 0, sipPySelf, sipMeth, wildcard, flags);
115 }
116 
CanOpen(const::wxString & location)117 bool sipwxFileSystemHandler::CanOpen(const  ::wxString& location)
118 {
119     sip_gilstate_t sipGILState;
120     PyObject *sipMeth;
121 
122     sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[3],sipPySelf,sipName_FileSystemHandler,sipName_CanOpen);
123 
124     if (!sipMeth)
125         return 0;
126 
127     extern bool sipVH__core_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::wxString&);
128 
129     return sipVH__core_9(sipGILState, 0, sipPySelf, sipMeth, location);
130 }
131 
sipProtect_GetAnchor(const::wxString & location)132  ::wxString sipwxFileSystemHandler::sipProtect_GetAnchor(const  ::wxString& location)
133 {
134     return  ::wxFileSystemHandler::GetAnchor(location);
135 }
136 
sipProtect_GetLeftLocation(const::wxString & location)137  ::wxString sipwxFileSystemHandler::sipProtect_GetLeftLocation(const  ::wxString& location)
138 {
139     return  ::wxFileSystemHandler::GetLeftLocation(location);
140 }
141 
sipProtect_GetProtocol(const::wxString & location)142  ::wxString sipwxFileSystemHandler::sipProtect_GetProtocol(const  ::wxString& location)
143 {
144     return  ::wxFileSystemHandler::GetProtocol(location);
145 }
146 
sipProtect_GetRightLocation(const::wxString & location)147  ::wxString sipwxFileSystemHandler::sipProtect_GetRightLocation(const  ::wxString& location)
148 {
149     return  ::wxFileSystemHandler::GetRightLocation(location);
150 }
151 
152 
153 PyDoc_STRVAR(doc_wxFileSystemHandler_CanOpen, "CanOpen(location) -> bool\n"
154 "\n"
155 "Returns true if the handler is able to open this file.");
156 
157 extern "C" {static PyObject *meth_wxFileSystemHandler_CanOpen(PyObject *, PyObject *, PyObject *);}
meth_wxFileSystemHandler_CanOpen(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)158 static PyObject *meth_wxFileSystemHandler_CanOpen(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
159 {
160     PyObject *sipParseErr = SIP_NULLPTR;
161     PyObject *sipOrigSelf = sipSelf;
162 
163     {
164         const  ::wxString* location;
165         int locationState = 0;
166          ::wxFileSystemHandler *sipCpp;
167 
168         static const char *sipKwdList[] = {
169             sipName_location,
170         };
171 
172         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxFileSystemHandler, &sipCpp, sipType_wxString,&location, &locationState))
173         {
174             bool sipRes;
175 
176             if (!sipOrigSelf)
177             {
178                 sipAbstractMethod(sipName_FileSystemHandler, sipName_CanOpen);
179                 return SIP_NULLPTR;
180             }
181 
182             PyErr_Clear();
183 
184             Py_BEGIN_ALLOW_THREADS
185             sipRes = sipCpp->CanOpen(*location);
186             Py_END_ALLOW_THREADS
187             sipReleaseType(const_cast< ::wxString *>(location),sipType_wxString,locationState);
188 
189             if (PyErr_Occurred())
190                 return 0;
191 
192             return PyBool_FromLong(sipRes);
193         }
194     }
195 
196     /* Raise an exception if the arguments couldn't be parsed. */
197     sipNoMethod(sipParseErr, sipName_FileSystemHandler, sipName_CanOpen, SIP_NULLPTR);
198 
199     return SIP_NULLPTR;
200 }
201 
202 
203 PyDoc_STRVAR(doc_wxFileSystemHandler_FindFirst, "FindFirst(wildcard, flags=0) -> String\n"
204 "\n"
205 "Works like wxFindFirstFile().");
206 
207 extern "C" {static PyObject *meth_wxFileSystemHandler_FindFirst(PyObject *, PyObject *, PyObject *);}
meth_wxFileSystemHandler_FindFirst(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)208 static PyObject *meth_wxFileSystemHandler_FindFirst(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
209 {
210     PyObject *sipParseErr = SIP_NULLPTR;
211     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
212 
213     {
214         const  ::wxString* wildcard;
215         int wildcardState = 0;
216         int flags = 0;
217          ::wxFileSystemHandler *sipCpp;
218 
219         static const char *sipKwdList[] = {
220             sipName_wildcard,
221             sipName_flags,
222         };
223 
224         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|i", &sipSelf, sipType_wxFileSystemHandler, &sipCpp, sipType_wxString,&wildcard, &wildcardState, &flags))
225         {
226              ::wxString*sipRes;
227 
228             PyErr_Clear();
229 
230             Py_BEGIN_ALLOW_THREADS
231             sipRes = new  ::wxString((sipSelfWasArg ? sipCpp-> ::wxFileSystemHandler::FindFirst(*wildcard,flags) : sipCpp->FindFirst(*wildcard,flags)));
232             Py_END_ALLOW_THREADS
233             sipReleaseType(const_cast< ::wxString *>(wildcard),sipType_wxString,wildcardState);
234 
235             if (PyErr_Occurred())
236                 return 0;
237 
238             return sipConvertFromNewType(sipRes,sipType_wxString,SIP_NULLPTR);
239         }
240     }
241 
242     /* Raise an exception if the arguments couldn't be parsed. */
243     sipNoMethod(sipParseErr, sipName_FileSystemHandler, sipName_FindFirst, SIP_NULLPTR);
244 
245     return SIP_NULLPTR;
246 }
247 
248 
249 PyDoc_STRVAR(doc_wxFileSystemHandler_FindNext, "FindNext() -> String\n"
250 "\n"
251 "Returns next filename that matches parameters passed to\n"
252 "wxFileSystem::FindFirst.");
253 
254 extern "C" {static PyObject *meth_wxFileSystemHandler_FindNext(PyObject *, PyObject *);}
meth_wxFileSystemHandler_FindNext(PyObject * sipSelf,PyObject * sipArgs)255 static PyObject *meth_wxFileSystemHandler_FindNext(PyObject *sipSelf, PyObject *sipArgs)
256 {
257     PyObject *sipParseErr = SIP_NULLPTR;
258     bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
259 
260     {
261          ::wxFileSystemHandler *sipCpp;
262 
263         if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxFileSystemHandler, &sipCpp))
264         {
265              ::wxString*sipRes;
266 
267             PyErr_Clear();
268 
269             Py_BEGIN_ALLOW_THREADS
270             sipRes = new  ::wxString((sipSelfWasArg ? sipCpp-> ::wxFileSystemHandler::FindNext() : sipCpp->FindNext()));
271             Py_END_ALLOW_THREADS
272 
273             if (PyErr_Occurred())
274                 return 0;
275 
276             return sipConvertFromNewType(sipRes,sipType_wxString,SIP_NULLPTR);
277         }
278     }
279 
280     /* Raise an exception if the arguments couldn't be parsed. */
281     sipNoMethod(sipParseErr, sipName_FileSystemHandler, sipName_FindNext, SIP_NULLPTR);
282 
283     return SIP_NULLPTR;
284 }
285 
286 
287 PyDoc_STRVAR(doc_wxFileSystemHandler_OpenFile, "OpenFile(fs, location) -> FSFile\n"
288 "\n"
289 "Opens the file and returns wxFSFile pointer or NULL if failed.");
290 
291 extern "C" {static PyObject *meth_wxFileSystemHandler_OpenFile(PyObject *, PyObject *, PyObject *);}
meth_wxFileSystemHandler_OpenFile(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)292 static PyObject *meth_wxFileSystemHandler_OpenFile(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
293 {
294     PyObject *sipParseErr = SIP_NULLPTR;
295     PyObject *sipOrigSelf = sipSelf;
296 
297     {
298          ::wxFileSystem* fs;
299         const  ::wxString* location;
300         int locationState = 0;
301          ::wxFileSystemHandler *sipCpp;
302 
303         static const char *sipKwdList[] = {
304             sipName_fs,
305             sipName_location,
306         };
307 
308         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9J1", &sipSelf, sipType_wxFileSystemHandler, &sipCpp, sipType_wxFileSystem, &fs, sipType_wxString,&location, &locationState))
309         {
310              ::wxFSFile*sipRes;
311 
312             if (!sipOrigSelf)
313             {
314                 sipAbstractMethod(sipName_FileSystemHandler, sipName_OpenFile);
315                 return SIP_NULLPTR;
316             }
317 
318             PyErr_Clear();
319 
320             Py_BEGIN_ALLOW_THREADS
321             sipRes = sipCpp->OpenFile(*fs,*location);
322             Py_END_ALLOW_THREADS
323             sipReleaseType(const_cast< ::wxString *>(location),sipType_wxString,locationState);
324 
325             if (PyErr_Occurred())
326                 return 0;
327 
328             return sipConvertFromNewType(sipRes,sipType_wxFSFile,SIP_NULLPTR);
329         }
330     }
331 
332     /* Raise an exception if the arguments couldn't be parsed. */
333     sipNoMethod(sipParseErr, sipName_FileSystemHandler, sipName_OpenFile, SIP_NULLPTR);
334 
335     return SIP_NULLPTR;
336 }
337 
338 
339 PyDoc_STRVAR(doc_wxFileSystemHandler_GetMimeTypeFromExt, "GetMimeTypeFromExt(location) -> String\n"
340 "\n"
341 "Returns the MIME type based on extension of location.");
342 
343 extern "C" {static PyObject *meth_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *, PyObject *, PyObject *);}
meth_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *,PyObject * sipArgs,PyObject * sipKwds)344 static PyObject *meth_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *, PyObject *sipArgs, PyObject *sipKwds)
345 {
346     PyObject *sipParseErr = SIP_NULLPTR;
347 
348     {
349         const  ::wxString* location;
350         int locationState = 0;
351 
352         static const char *sipKwdList[] = {
353             sipName_location,
354         };
355 
356         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1", sipType_wxString,&location, &locationState))
357         {
358              ::wxString*sipRes;
359 
360             PyErr_Clear();
361 
362             Py_BEGIN_ALLOW_THREADS
363             sipRes = new  ::wxString( ::wxFileSystemHandler::GetMimeTypeFromExt(*location));
364             Py_END_ALLOW_THREADS
365             sipReleaseType(const_cast< ::wxString *>(location),sipType_wxString,locationState);
366 
367             if (PyErr_Occurred())
368                 return 0;
369 
370             return sipConvertFromNewType(sipRes,sipType_wxString,SIP_NULLPTR);
371         }
372     }
373 
374     /* Raise an exception if the arguments couldn't be parsed. */
375     sipNoMethod(sipParseErr, sipName_FileSystemHandler, sipName_GetMimeTypeFromExt, SIP_NULLPTR);
376 
377     return SIP_NULLPTR;
378 }
379 
380 
381 PyDoc_STRVAR(doc_wxFileSystemHandler_GetAnchor, "GetAnchor(location) -> String\n"
382 "\n"
383 "Returns the anchor if present in the location.");
384 
385 extern "C" {static PyObject *meth_wxFileSystemHandler_GetAnchor(PyObject *, PyObject *, PyObject *);}
meth_wxFileSystemHandler_GetAnchor(PyObject *,PyObject * sipArgs,PyObject * sipKwds)386 static PyObject *meth_wxFileSystemHandler_GetAnchor(PyObject *, PyObject *sipArgs, PyObject *sipKwds)
387 {
388     PyObject *sipParseErr = SIP_NULLPTR;
389 
390     {
391         const  ::wxString* location;
392         int locationState = 0;
393 
394         static const char *sipKwdList[] = {
395             sipName_location,
396         };
397 
398         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1", sipType_wxString,&location, &locationState))
399         {
400              ::wxString*sipRes;
401 
402             PyErr_Clear();
403 
404             Py_BEGIN_ALLOW_THREADS
405             sipRes = new  ::wxString(sipwxFileSystemHandler::sipProtect_GetAnchor(*location));
406             Py_END_ALLOW_THREADS
407             sipReleaseType(const_cast< ::wxString *>(location),sipType_wxString,locationState);
408 
409             if (PyErr_Occurred())
410                 return 0;
411 
412             return sipConvertFromNewType(sipRes,sipType_wxString,SIP_NULLPTR);
413         }
414     }
415 
416     /* Raise an exception if the arguments couldn't be parsed. */
417     sipNoMethod(sipParseErr, sipName_FileSystemHandler, sipName_GetAnchor, SIP_NULLPTR);
418 
419     return SIP_NULLPTR;
420 }
421 
422 
423 PyDoc_STRVAR(doc_wxFileSystemHandler_GetLeftLocation, "GetLeftLocation(location) -> String\n"
424 "\n"
425 "Returns the left location string extracted from location.");
426 
427 extern "C" {static PyObject *meth_wxFileSystemHandler_GetLeftLocation(PyObject *, PyObject *, PyObject *);}
meth_wxFileSystemHandler_GetLeftLocation(PyObject *,PyObject * sipArgs,PyObject * sipKwds)428 static PyObject *meth_wxFileSystemHandler_GetLeftLocation(PyObject *, PyObject *sipArgs, PyObject *sipKwds)
429 {
430     PyObject *sipParseErr = SIP_NULLPTR;
431 
432     {
433         const  ::wxString* location;
434         int locationState = 0;
435 
436         static const char *sipKwdList[] = {
437             sipName_location,
438         };
439 
440         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1", sipType_wxString,&location, &locationState))
441         {
442              ::wxString*sipRes;
443 
444             PyErr_Clear();
445 
446             Py_BEGIN_ALLOW_THREADS
447             sipRes = new  ::wxString(sipwxFileSystemHandler::sipProtect_GetLeftLocation(*location));
448             Py_END_ALLOW_THREADS
449             sipReleaseType(const_cast< ::wxString *>(location),sipType_wxString,locationState);
450 
451             if (PyErr_Occurred())
452                 return 0;
453 
454             return sipConvertFromNewType(sipRes,sipType_wxString,SIP_NULLPTR);
455         }
456     }
457 
458     /* Raise an exception if the arguments couldn't be parsed. */
459     sipNoMethod(sipParseErr, sipName_FileSystemHandler, sipName_GetLeftLocation, SIP_NULLPTR);
460 
461     return SIP_NULLPTR;
462 }
463 
464 
465 PyDoc_STRVAR(doc_wxFileSystemHandler_GetProtocol, "GetProtocol(location) -> String\n"
466 "\n"
467 "Returns the protocol string extracted from location.");
468 
469 extern "C" {static PyObject *meth_wxFileSystemHandler_GetProtocol(PyObject *, PyObject *, PyObject *);}
meth_wxFileSystemHandler_GetProtocol(PyObject *,PyObject * sipArgs,PyObject * sipKwds)470 static PyObject *meth_wxFileSystemHandler_GetProtocol(PyObject *, PyObject *sipArgs, PyObject *sipKwds)
471 {
472     PyObject *sipParseErr = SIP_NULLPTR;
473 
474     {
475         const  ::wxString* location;
476         int locationState = 0;
477 
478         static const char *sipKwdList[] = {
479             sipName_location,
480         };
481 
482         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1", sipType_wxString,&location, &locationState))
483         {
484              ::wxString*sipRes;
485 
486             PyErr_Clear();
487 
488             Py_BEGIN_ALLOW_THREADS
489             sipRes = new  ::wxString(sipwxFileSystemHandler::sipProtect_GetProtocol(*location));
490             Py_END_ALLOW_THREADS
491             sipReleaseType(const_cast< ::wxString *>(location),sipType_wxString,locationState);
492 
493             if (PyErr_Occurred())
494                 return 0;
495 
496             return sipConvertFromNewType(sipRes,sipType_wxString,SIP_NULLPTR);
497         }
498     }
499 
500     /* Raise an exception if the arguments couldn't be parsed. */
501     sipNoMethod(sipParseErr, sipName_FileSystemHandler, sipName_GetProtocol, SIP_NULLPTR);
502 
503     return SIP_NULLPTR;
504 }
505 
506 
507 PyDoc_STRVAR(doc_wxFileSystemHandler_GetRightLocation, "GetRightLocation(location) -> String\n"
508 "\n"
509 "Returns the right location string extracted from location.");
510 
511 extern "C" {static PyObject *meth_wxFileSystemHandler_GetRightLocation(PyObject *, PyObject *, PyObject *);}
meth_wxFileSystemHandler_GetRightLocation(PyObject *,PyObject * sipArgs,PyObject * sipKwds)512 static PyObject *meth_wxFileSystemHandler_GetRightLocation(PyObject *, PyObject *sipArgs, PyObject *sipKwds)
513 {
514     PyObject *sipParseErr = SIP_NULLPTR;
515 
516     {
517         const  ::wxString* location;
518         int locationState = 0;
519 
520         static const char *sipKwdList[] = {
521             sipName_location,
522         };
523 
524         if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1", sipType_wxString,&location, &locationState))
525         {
526              ::wxString*sipRes;
527 
528             PyErr_Clear();
529 
530             Py_BEGIN_ALLOW_THREADS
531             sipRes = new  ::wxString(sipwxFileSystemHandler::sipProtect_GetRightLocation(*location));
532             Py_END_ALLOW_THREADS
533             sipReleaseType(const_cast< ::wxString *>(location),sipType_wxString,locationState);
534 
535             if (PyErr_Occurred())
536                 return 0;
537 
538             return sipConvertFromNewType(sipRes,sipType_wxString,SIP_NULLPTR);
539         }
540     }
541 
542     /* Raise an exception if the arguments couldn't be parsed. */
543     sipNoMethod(sipParseErr, sipName_FileSystemHandler, sipName_GetRightLocation, SIP_NULLPTR);
544 
545     return SIP_NULLPTR;
546 }
547 
548 
549 /* Cast a pointer to a type somewhere in its inheritance hierarchy. */
550 extern "C" {static void *cast_wxFileSystemHandler(void *, const sipTypeDef *);}
cast_wxFileSystemHandler(void * sipCppV,const sipTypeDef * targetType)551 static void *cast_wxFileSystemHandler(void *sipCppV, const sipTypeDef *targetType)
552 {
553      ::wxFileSystemHandler *sipCpp = reinterpret_cast< ::wxFileSystemHandler *>(sipCppV);
554 
555     if (targetType == sipType_wxObject)
556         return static_cast< ::wxObject *>(sipCpp);
557 
558     return sipCppV;
559 }
560 
561 
562 /* Call the instance's destructor. */
563 extern "C" {static void release_wxFileSystemHandler(void *, int);}
release_wxFileSystemHandler(void * sipCppV,int sipState)564 static void release_wxFileSystemHandler(void *sipCppV, int sipState)
565 {
566     Py_BEGIN_ALLOW_THREADS
567 
568     if (sipState & SIP_DERIVED_CLASS)
569         delete reinterpret_cast<sipwxFileSystemHandler *>(sipCppV);
570     else
571         delete reinterpret_cast< ::wxFileSystemHandler *>(sipCppV);
572 
573     Py_END_ALLOW_THREADS
574 }
575 
576 
577 extern "C" {static void dealloc_wxFileSystemHandler(sipSimpleWrapper *);}
dealloc_wxFileSystemHandler(sipSimpleWrapper * sipSelf)578 static void dealloc_wxFileSystemHandler(sipSimpleWrapper *sipSelf)
579 {
580     if (sipIsDerivedClass(sipSelf))
581         reinterpret_cast<sipwxFileSystemHandler *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;
582 
583     if (sipIsOwnedByPython(sipSelf))
584     {
585         release_wxFileSystemHandler(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
586     }
587 }
588 
589 
590 extern "C" {static void *init_type_wxFileSystemHandler(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxFileSystemHandler(sipSimpleWrapper * sipSelf,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)591 static void *init_type_wxFileSystemHandler(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
592 {
593     sipwxFileSystemHandler *sipCpp = SIP_NULLPTR;
594 
595     {
596         if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
597         {
598             PyErr_Clear();
599 
600             Py_BEGIN_ALLOW_THREADS
601             sipCpp = new sipwxFileSystemHandler();
602             Py_END_ALLOW_THREADS
603 
604             if (PyErr_Occurred())
605             {
606                 delete sipCpp;
607                 return SIP_NULLPTR;
608             }
609 
610             sipCpp->sipPySelf = sipSelf;
611 
612             return sipCpp;
613         }
614     }
615 
616     {
617         const  ::wxFileSystemHandler* a0;
618 
619         if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxFileSystemHandler, &a0))
620         {
621             Py_BEGIN_ALLOW_THREADS
622             sipCpp = new sipwxFileSystemHandler(*a0);
623             Py_END_ALLOW_THREADS
624 
625             sipCpp->sipPySelf = sipSelf;
626 
627             return sipCpp;
628         }
629     }
630 
631     return SIP_NULLPTR;
632 }
633 
634 
635 /* Define this type's super-types. */
636 static sipEncodedTypeDef supers_wxFileSystemHandler[] = {{358, 255, 1}};
637 
638 
639 static PyMethodDef methods_wxFileSystemHandler[] = {
640     {SIP_MLNAME_CAST(sipName_CanOpen), SIP_MLMETH_CAST(meth_wxFileSystemHandler_CanOpen), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxFileSystemHandler_CanOpen)},
641     {SIP_MLNAME_CAST(sipName_FindFirst), SIP_MLMETH_CAST(meth_wxFileSystemHandler_FindFirst), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxFileSystemHandler_FindFirst)},
642     {SIP_MLNAME_CAST(sipName_FindNext), meth_wxFileSystemHandler_FindNext, METH_VARARGS, SIP_MLDOC_CAST(doc_wxFileSystemHandler_FindNext)},
643     {SIP_MLNAME_CAST(sipName_GetAnchor), SIP_MLMETH_CAST(meth_wxFileSystemHandler_GetAnchor), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxFileSystemHandler_GetAnchor)},
644     {SIP_MLNAME_CAST(sipName_GetLeftLocation), SIP_MLMETH_CAST(meth_wxFileSystemHandler_GetLeftLocation), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxFileSystemHandler_GetLeftLocation)},
645     {SIP_MLNAME_CAST(sipName_GetMimeTypeFromExt), SIP_MLMETH_CAST(meth_wxFileSystemHandler_GetMimeTypeFromExt), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxFileSystemHandler_GetMimeTypeFromExt)},
646     {SIP_MLNAME_CAST(sipName_GetProtocol), SIP_MLMETH_CAST(meth_wxFileSystemHandler_GetProtocol), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxFileSystemHandler_GetProtocol)},
647     {SIP_MLNAME_CAST(sipName_GetRightLocation), SIP_MLMETH_CAST(meth_wxFileSystemHandler_GetRightLocation), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxFileSystemHandler_GetRightLocation)},
648     {SIP_MLNAME_CAST(sipName_OpenFile), SIP_MLMETH_CAST(meth_wxFileSystemHandler_OpenFile), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxFileSystemHandler_OpenFile)}
649 };
650 
651 PyDoc_STRVAR(doc_wxFileSystemHandler, "FileSystemHandler()\n"
652 "\n"
653 "Classes derived from wxFileSystemHandler are used to access virtual\n"
654 "file systems.");
655 
656 
657 sipClassTypeDef sipTypeDef__core_wxFileSystemHandler = {
658     {
659         -1,
660         SIP_NULLPTR,
661         SIP_NULLPTR,
662         SIP_TYPE_ABSTRACT|SIP_TYPE_SCC|SIP_TYPE_CLASS,
663         sipNameNr_wxFileSystemHandler,
664         {SIP_NULLPTR},
665         SIP_NULLPTR
666     },
667     {
668         sipNameNr_FileSystemHandler,
669         {0, 0, 1},
670         9, methods_wxFileSystemHandler,
671         0, SIP_NULLPTR,
672         0, SIP_NULLPTR,
673         {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
674     },
675     doc_wxFileSystemHandler,
676     -1,
677     -1,
678     supers_wxFileSystemHandler,
679     SIP_NULLPTR,
680     init_type_wxFileSystemHandler,
681     SIP_NULLPTR,
682     SIP_NULLPTR,
683 #if PY_MAJOR_VERSION >= 3
684     SIP_NULLPTR,
685     SIP_NULLPTR,
686 #else
687     SIP_NULLPTR,
688     SIP_NULLPTR,
689     SIP_NULLPTR,
690     SIP_NULLPTR,
691 #endif
692     dealloc_wxFileSystemHandler,
693     SIP_NULLPTR,
694     SIP_NULLPTR,
695     SIP_NULLPTR,
696     release_wxFileSystemHandler,
697     cast_wxFileSystemHandler,
698     SIP_NULLPTR,
699     SIP_NULLPTR,
700     SIP_NULLPTR,
701     SIP_NULLPTR,
702     SIP_NULLPTR,
703     SIP_NULLPTR
704 };
705