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
13 #include <wx/config.h>
14 #include <wx/object.h>
15 #include <wx/object.h>
16 #include <wx/object.h>
17
18
19 class sipwxConfig : public ::wxConfig
20 {
21 public:
22 sipwxConfig(const ::wxString&,const ::wxString&,const ::wxString&,const ::wxString&,long);
23 virtual ~sipwxConfig();
24
25 /*
26 * There is a protected method for every virtual method visible from
27 * this class.
28 */
29 protected:
30 const ::wxString& GetPath() const SIP_OVERRIDE;
31 void SetPath(const ::wxString&) SIP_OVERRIDE;
32 size_t GetNumberOfEntries(bool) const SIP_OVERRIDE;
33 size_t GetNumberOfGroups(bool) const SIP_OVERRIDE;
34 ::wxConfigBase::EntryType GetEntryType(const ::wxString&) const SIP_OVERRIDE;
35 bool HasEntry(const ::wxString&) const SIP_OVERRIDE;
36 bool HasGroup(const ::wxString&) const SIP_OVERRIDE;
37 bool Flush(bool) SIP_OVERRIDE;
38 bool RenameEntry(const ::wxString&,const ::wxString&) SIP_OVERRIDE;
39 bool RenameGroup(const ::wxString&,const ::wxString&) SIP_OVERRIDE;
40 bool DeleteAll() SIP_OVERRIDE;
41 bool DeleteEntry(const ::wxString&,bool) SIP_OVERRIDE;
42 bool DeleteGroup(const ::wxString&) SIP_OVERRIDE;
43
44 public:
45 sipSimpleWrapper *sipPySelf;
46
47 private:
48 sipwxConfig(const sipwxConfig &);
49 sipwxConfig &operator = (const sipwxConfig &);
50
51 char sipPyMethods[13];
52 };
53
sipwxConfig(const::wxString & appName,const::wxString & vendorName,const::wxString & localFilename,const::wxString & globalFilename,long style)54 sipwxConfig::sipwxConfig(const ::wxString& appName,const ::wxString& vendorName,const ::wxString& localFilename,const ::wxString& globalFilename,long style): ::wxConfig(appName,vendorName,localFilename,globalFilename,style), sipPySelf(SIP_NULLPTR)
55 {
56 memset(sipPyMethods, 0, sizeof (sipPyMethods));
57 }
58
~sipwxConfig()59 sipwxConfig::~sipwxConfig()
60 {
61 sipInstanceDestroyedEx(&sipPySelf);
62 }
63
GetPath() const64 const ::wxString& sipwxConfig::GetPath() const
65 {
66 sip_gilstate_t sipGILState;
67 PyObject *sipMeth;
68
69 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[0]),sipPySelf,SIP_NULLPTR,sipName_GetPath);
70
71 if (!sipMeth)
72 return ::wxConfig::GetPath();
73
74 extern const ::wxString& sipVH__core_85(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
75
76 return sipVH__core_85(sipGILState, 0, sipPySelf, sipMeth);
77 }
78
SetPath(const::wxString & strPath)79 void sipwxConfig::SetPath(const ::wxString& strPath)
80 {
81 sip_gilstate_t sipGILState;
82 PyObject *sipMeth;
83
84 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,SIP_NULLPTR,sipName_SetPath);
85
86 if (!sipMeth)
87 {
88 ::wxConfig::SetPath(strPath);
89 return;
90 }
91
92 extern void sipVH__core_48(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxString&);
93
94 sipVH__core_48(sipGILState, 0, sipPySelf, sipMeth, strPath);
95 }
96
GetNumberOfEntries(bool bRecursive) const97 size_t sipwxConfig::GetNumberOfEntries(bool bRecursive) const
98 {
99 sip_gilstate_t sipGILState;
100 PyObject *sipMeth;
101
102 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[2]),sipPySelf,SIP_NULLPTR,sipName_GetNumberOfEntries);
103
104 if (!sipMeth)
105 return ::wxConfig::GetNumberOfEntries(bRecursive);
106
107 extern size_t sipVH__core_86(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, bool);
108
109 return sipVH__core_86(sipGILState, 0, sipPySelf, sipMeth, bRecursive);
110 }
111
GetNumberOfGroups(bool bRecursive) const112 size_t sipwxConfig::GetNumberOfGroups(bool bRecursive) const
113 {
114 sip_gilstate_t sipGILState;
115 PyObject *sipMeth;
116
117 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[3]),sipPySelf,SIP_NULLPTR,sipName_GetNumberOfGroups);
118
119 if (!sipMeth)
120 return ::wxConfig::GetNumberOfGroups(bRecursive);
121
122 extern size_t sipVH__core_86(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, bool);
123
124 return sipVH__core_86(sipGILState, 0, sipPySelf, sipMeth, bRecursive);
125 }
126
GetEntryType(const::wxString & name) const127 ::wxConfigBase::EntryType sipwxConfig::GetEntryType(const ::wxString& name) const
128 {
129 sip_gilstate_t sipGILState;
130 PyObject *sipMeth;
131
132 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[4]),sipPySelf,SIP_NULLPTR,sipName_GetEntryType);
133
134 if (!sipMeth)
135 return ::wxConfig::GetEntryType(name);
136
137 extern ::wxConfigBase::EntryType sipVH__core_87(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxString&);
138
139 return sipVH__core_87(sipGILState, 0, sipPySelf, sipMeth, name);
140 }
141
HasEntry(const::wxString & strName) const142 bool sipwxConfig::HasEntry(const ::wxString& strName) const
143 {
144 sip_gilstate_t sipGILState;
145 PyObject *sipMeth;
146
147 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[5]),sipPySelf,SIP_NULLPTR,sipName_HasEntry);
148
149 if (!sipMeth)
150 return ::wxConfig::HasEntry(strName);
151
152 extern bool sipVH__core_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxString&);
153
154 return sipVH__core_9(sipGILState, 0, sipPySelf, sipMeth, strName);
155 }
156
HasGroup(const::wxString & strName) const157 bool sipwxConfig::HasGroup(const ::wxString& strName) const
158 {
159 sip_gilstate_t sipGILState;
160 PyObject *sipMeth;
161
162 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[6]),sipPySelf,SIP_NULLPTR,sipName_HasGroup);
163
164 if (!sipMeth)
165 return ::wxConfig::HasGroup(strName);
166
167 extern bool sipVH__core_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxString&);
168
169 return sipVH__core_9(sipGILState, 0, sipPySelf, sipMeth, strName);
170 }
171
Flush(bool bCurrentOnly)172 bool sipwxConfig::Flush(bool bCurrentOnly)
173 {
174 sip_gilstate_t sipGILState;
175 PyObject *sipMeth;
176
177 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[7],sipPySelf,SIP_NULLPTR,sipName_Flush);
178
179 if (!sipMeth)
180 return ::wxConfig::Flush(bCurrentOnly);
181
182 extern bool sipVH__core_88(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, bool);
183
184 return sipVH__core_88(sipGILState, 0, sipPySelf, sipMeth, bCurrentOnly);
185 }
186
RenameEntry(const::wxString & oldName,const::wxString & newName)187 bool sipwxConfig::RenameEntry(const ::wxString& oldName,const ::wxString& newName)
188 {
189 sip_gilstate_t sipGILState;
190 PyObject *sipMeth;
191
192 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[8],sipPySelf,SIP_NULLPTR,sipName_RenameEntry);
193
194 if (!sipMeth)
195 return ::wxConfig::RenameEntry(oldName,newName);
196
197 extern bool sipVH__core_19(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxString&,const ::wxString&);
198
199 return sipVH__core_19(sipGILState, 0, sipPySelf, sipMeth, oldName, newName);
200 }
201
RenameGroup(const::wxString & oldName,const::wxString & newName)202 bool sipwxConfig::RenameGroup(const ::wxString& oldName,const ::wxString& newName)
203 {
204 sip_gilstate_t sipGILState;
205 PyObject *sipMeth;
206
207 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[9],sipPySelf,SIP_NULLPTR,sipName_RenameGroup);
208
209 if (!sipMeth)
210 return ::wxConfig::RenameGroup(oldName,newName);
211
212 extern bool sipVH__core_19(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxString&,const ::wxString&);
213
214 return sipVH__core_19(sipGILState, 0, sipPySelf, sipMeth, oldName, newName);
215 }
216
DeleteAll()217 bool sipwxConfig::DeleteAll()
218 {
219 sip_gilstate_t sipGILState;
220 PyObject *sipMeth;
221
222 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[10],sipPySelf,SIP_NULLPTR,sipName_DeleteAll);
223
224 if (!sipMeth)
225 return ::wxConfig::DeleteAll();
226
227 extern bool sipVH__core_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
228
229 return sipVH__core_6(sipGILState, 0, sipPySelf, sipMeth);
230 }
231
DeleteEntry(const::wxString & key,bool bDeleteGroupIfEmpty)232 bool sipwxConfig::DeleteEntry(const ::wxString& key,bool bDeleteGroupIfEmpty)
233 {
234 sip_gilstate_t sipGILState;
235 PyObject *sipMeth;
236
237 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[11],sipPySelf,SIP_NULLPTR,sipName_DeleteEntry);
238
239 if (!sipMeth)
240 return ::wxConfig::DeleteEntry(key,bDeleteGroupIfEmpty);
241
242 extern bool sipVH__core_89(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxString&,bool);
243
244 return sipVH__core_89(sipGILState, 0, sipPySelf, sipMeth, key, bDeleteGroupIfEmpty);
245 }
246
DeleteGroup(const::wxString & key)247 bool sipwxConfig::DeleteGroup(const ::wxString& key)
248 {
249 sip_gilstate_t sipGILState;
250 PyObject *sipMeth;
251
252 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[12],sipPySelf,SIP_NULLPTR,sipName_DeleteGroup);
253
254 if (!sipMeth)
255 return ::wxConfig::DeleteGroup(key);
256
257 extern bool sipVH__core_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxString&);
258
259 return sipVH__core_9(sipGILState, 0, sipPySelf, sipMeth, key);
260 }
261
262
263 PyDoc_STRVAR(doc_wxConfig_GetPath, "GetPath(self) -> object");
264
265 extern "C" {static PyObject *meth_wxConfig_GetPath(PyObject *, PyObject *);}
meth_wxConfig_GetPath(PyObject * sipSelf,PyObject * sipArgs)266 static PyObject *meth_wxConfig_GetPath(PyObject *sipSelf, PyObject *sipArgs)
267 {
268 PyObject *sipParseErr = SIP_NULLPTR;
269 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
270
271 {
272 const ::wxConfig *sipCpp;
273
274 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxConfig, &sipCpp))
275 {
276 ::wxString*sipRes;
277
278 PyErr_Clear();
279
280 Py_BEGIN_ALLOW_THREADS
281 sipRes = new ::wxString((sipSelfWasArg ? sipCpp-> ::wxConfig::GetPath() : sipCpp->GetPath()));
282 Py_END_ALLOW_THREADS
283
284 if (PyErr_Occurred())
285 return 0;
286
287 return sipConvertFromNewType(sipRes,sipType_wxString,SIP_NULLPTR);
288 }
289 }
290
291 /* Raise an exception if the arguments couldn't be parsed. */
292 sipNoMethod(sipParseErr, sipName_Config, sipName_GetPath, doc_wxConfig_GetPath);
293
294 return SIP_NULLPTR;
295 }
296
297
298 PyDoc_STRVAR(doc_wxConfig_SetPath, "SetPath(self, strPath: object)");
299
300 extern "C" {static PyObject *meth_wxConfig_SetPath(PyObject *, PyObject *, PyObject *);}
meth_wxConfig_SetPath(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)301 static PyObject *meth_wxConfig_SetPath(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
302 {
303 PyObject *sipParseErr = SIP_NULLPTR;
304 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
305
306 {
307 const ::wxString* strPath;
308 int strPathState = 0;
309 ::wxConfig *sipCpp;
310
311 static const char *sipKwdList[] = {
312 sipName_strPath,
313 };
314
315 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxConfig, &sipCpp, sipType_wxString,&strPath, &strPathState))
316 {
317 PyErr_Clear();
318
319 Py_BEGIN_ALLOW_THREADS
320 (sipSelfWasArg ? sipCpp-> ::wxConfig::SetPath(*strPath) : sipCpp->SetPath(*strPath));
321 Py_END_ALLOW_THREADS
322 sipReleaseType(const_cast< ::wxString *>(strPath),sipType_wxString,strPathState);
323
324 if (PyErr_Occurred())
325 return 0;
326
327 Py_INCREF(Py_None);
328 return Py_None;
329 }
330 }
331
332 /* Raise an exception if the arguments couldn't be parsed. */
333 sipNoMethod(sipParseErr, sipName_Config, sipName_SetPath, doc_wxConfig_SetPath);
334
335 return SIP_NULLPTR;
336 }
337
338
339 PyDoc_STRVAR(doc_wxConfig_GetNumberOfEntries, "GetNumberOfEntries(self, bRecursive: bool = False) -> int");
340
341 extern "C" {static PyObject *meth_wxConfig_GetNumberOfEntries(PyObject *, PyObject *, PyObject *);}
meth_wxConfig_GetNumberOfEntries(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)342 static PyObject *meth_wxConfig_GetNumberOfEntries(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
343 {
344 PyObject *sipParseErr = SIP_NULLPTR;
345 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
346
347 {
348 bool bRecursive = 0;
349 const ::wxConfig *sipCpp;
350
351 static const char *sipKwdList[] = {
352 sipName_bRecursive,
353 };
354
355 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|b", &sipSelf, sipType_wxConfig, &sipCpp, &bRecursive))
356 {
357 size_t sipRes;
358
359 PyErr_Clear();
360
361 Py_BEGIN_ALLOW_THREADS
362 sipRes = (sipSelfWasArg ? sipCpp-> ::wxConfig::GetNumberOfEntries(bRecursive) : sipCpp->GetNumberOfEntries(bRecursive));
363 Py_END_ALLOW_THREADS
364
365 if (PyErr_Occurred())
366 return 0;
367
368 return PyLong_FromUnsignedLong(sipRes);
369 }
370 }
371
372 /* Raise an exception if the arguments couldn't be parsed. */
373 sipNoMethod(sipParseErr, sipName_Config, sipName_GetNumberOfEntries, doc_wxConfig_GetNumberOfEntries);
374
375 return SIP_NULLPTR;
376 }
377
378
379 PyDoc_STRVAR(doc_wxConfig_GetNumberOfGroups, "GetNumberOfGroups(self, bRecursive: bool = False) -> int");
380
381 extern "C" {static PyObject *meth_wxConfig_GetNumberOfGroups(PyObject *, PyObject *, PyObject *);}
meth_wxConfig_GetNumberOfGroups(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)382 static PyObject *meth_wxConfig_GetNumberOfGroups(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
383 {
384 PyObject *sipParseErr = SIP_NULLPTR;
385 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
386
387 {
388 bool bRecursive = 0;
389 const ::wxConfig *sipCpp;
390
391 static const char *sipKwdList[] = {
392 sipName_bRecursive,
393 };
394
395 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|b", &sipSelf, sipType_wxConfig, &sipCpp, &bRecursive))
396 {
397 size_t sipRes;
398
399 PyErr_Clear();
400
401 Py_BEGIN_ALLOW_THREADS
402 sipRes = (sipSelfWasArg ? sipCpp-> ::wxConfig::GetNumberOfGroups(bRecursive) : sipCpp->GetNumberOfGroups(bRecursive));
403 Py_END_ALLOW_THREADS
404
405 if (PyErr_Occurred())
406 return 0;
407
408 return PyLong_FromUnsignedLong(sipRes);
409 }
410 }
411
412 /* Raise an exception if the arguments couldn't be parsed. */
413 sipNoMethod(sipParseErr, sipName_Config, sipName_GetNumberOfGroups, doc_wxConfig_GetNumberOfGroups);
414
415 return SIP_NULLPTR;
416 }
417
418
419 PyDoc_STRVAR(doc_wxConfig_HasEntry, "HasEntry(self, strName: object) -> bool");
420
421 extern "C" {static PyObject *meth_wxConfig_HasEntry(PyObject *, PyObject *, PyObject *);}
meth_wxConfig_HasEntry(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)422 static PyObject *meth_wxConfig_HasEntry(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
423 {
424 PyObject *sipParseErr = SIP_NULLPTR;
425 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
426
427 {
428 const ::wxString* strName;
429 int strNameState = 0;
430 const ::wxConfig *sipCpp;
431
432 static const char *sipKwdList[] = {
433 sipName_strName,
434 };
435
436 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxConfig, &sipCpp, sipType_wxString,&strName, &strNameState))
437 {
438 bool sipRes;
439
440 PyErr_Clear();
441
442 Py_BEGIN_ALLOW_THREADS
443 sipRes = (sipSelfWasArg ? sipCpp-> ::wxConfig::HasEntry(*strName) : sipCpp->HasEntry(*strName));
444 Py_END_ALLOW_THREADS
445 sipReleaseType(const_cast< ::wxString *>(strName),sipType_wxString,strNameState);
446
447 if (PyErr_Occurred())
448 return 0;
449
450 return PyBool_FromLong(sipRes);
451 }
452 }
453
454 /* Raise an exception if the arguments couldn't be parsed. */
455 sipNoMethod(sipParseErr, sipName_Config, sipName_HasEntry, doc_wxConfig_HasEntry);
456
457 return SIP_NULLPTR;
458 }
459
460
461 PyDoc_STRVAR(doc_wxConfig_HasGroup, "HasGroup(self, strName: object) -> bool");
462
463 extern "C" {static PyObject *meth_wxConfig_HasGroup(PyObject *, PyObject *, PyObject *);}
meth_wxConfig_HasGroup(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)464 static PyObject *meth_wxConfig_HasGroup(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
465 {
466 PyObject *sipParseErr = SIP_NULLPTR;
467 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
468
469 {
470 const ::wxString* strName;
471 int strNameState = 0;
472 const ::wxConfig *sipCpp;
473
474 static const char *sipKwdList[] = {
475 sipName_strName,
476 };
477
478 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxConfig, &sipCpp, sipType_wxString,&strName, &strNameState))
479 {
480 bool sipRes;
481
482 PyErr_Clear();
483
484 Py_BEGIN_ALLOW_THREADS
485 sipRes = (sipSelfWasArg ? sipCpp-> ::wxConfig::HasGroup(*strName) : sipCpp->HasGroup(*strName));
486 Py_END_ALLOW_THREADS
487 sipReleaseType(const_cast< ::wxString *>(strName),sipType_wxString,strNameState);
488
489 if (PyErr_Occurred())
490 return 0;
491
492 return PyBool_FromLong(sipRes);
493 }
494 }
495
496 /* Raise an exception if the arguments couldn't be parsed. */
497 sipNoMethod(sipParseErr, sipName_Config, sipName_HasGroup, doc_wxConfig_HasGroup);
498
499 return SIP_NULLPTR;
500 }
501
502
503 PyDoc_STRVAR(doc_wxConfig_Flush, "Flush(self, bCurrentOnly: bool = False) -> bool");
504
505 extern "C" {static PyObject *meth_wxConfig_Flush(PyObject *, PyObject *, PyObject *);}
meth_wxConfig_Flush(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)506 static PyObject *meth_wxConfig_Flush(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
507 {
508 PyObject *sipParseErr = SIP_NULLPTR;
509 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
510
511 {
512 bool bCurrentOnly = 0;
513 ::wxConfig *sipCpp;
514
515 static const char *sipKwdList[] = {
516 sipName_bCurrentOnly,
517 };
518
519 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|b", &sipSelf, sipType_wxConfig, &sipCpp, &bCurrentOnly))
520 {
521 bool sipRes;
522
523 PyErr_Clear();
524
525 Py_BEGIN_ALLOW_THREADS
526 sipRes = (sipSelfWasArg ? sipCpp-> ::wxConfig::Flush(bCurrentOnly) : sipCpp->Flush(bCurrentOnly));
527 Py_END_ALLOW_THREADS
528
529 if (PyErr_Occurred())
530 return 0;
531
532 return PyBool_FromLong(sipRes);
533 }
534 }
535
536 /* Raise an exception if the arguments couldn't be parsed. */
537 sipNoMethod(sipParseErr, sipName_Config, sipName_Flush, doc_wxConfig_Flush);
538
539 return SIP_NULLPTR;
540 }
541
542
543 PyDoc_STRVAR(doc_wxConfig_RenameEntry, "RenameEntry(self, oldName: object, newName: object) -> bool");
544
545 extern "C" {static PyObject *meth_wxConfig_RenameEntry(PyObject *, PyObject *, PyObject *);}
meth_wxConfig_RenameEntry(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)546 static PyObject *meth_wxConfig_RenameEntry(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
547 {
548 PyObject *sipParseErr = SIP_NULLPTR;
549 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
550
551 {
552 const ::wxString* oldName;
553 int oldNameState = 0;
554 const ::wxString* newName;
555 int newNameState = 0;
556 ::wxConfig *sipCpp;
557
558 static const char *sipKwdList[] = {
559 sipName_oldName,
560 sipName_newName,
561 };
562
563 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1J1", &sipSelf, sipType_wxConfig, &sipCpp, sipType_wxString,&oldName, &oldNameState, sipType_wxString,&newName, &newNameState))
564 {
565 bool sipRes;
566
567 PyErr_Clear();
568
569 Py_BEGIN_ALLOW_THREADS
570 sipRes = (sipSelfWasArg ? sipCpp-> ::wxConfig::RenameEntry(*oldName,*newName) : sipCpp->RenameEntry(*oldName,*newName));
571 Py_END_ALLOW_THREADS
572 sipReleaseType(const_cast< ::wxString *>(oldName),sipType_wxString,oldNameState);
573 sipReleaseType(const_cast< ::wxString *>(newName),sipType_wxString,newNameState);
574
575 if (PyErr_Occurred())
576 return 0;
577
578 return PyBool_FromLong(sipRes);
579 }
580 }
581
582 /* Raise an exception if the arguments couldn't be parsed. */
583 sipNoMethod(sipParseErr, sipName_Config, sipName_RenameEntry, doc_wxConfig_RenameEntry);
584
585 return SIP_NULLPTR;
586 }
587
588
589 PyDoc_STRVAR(doc_wxConfig_RenameGroup, "RenameGroup(self, oldName: object, newName: object) -> bool");
590
591 extern "C" {static PyObject *meth_wxConfig_RenameGroup(PyObject *, PyObject *, PyObject *);}
meth_wxConfig_RenameGroup(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)592 static PyObject *meth_wxConfig_RenameGroup(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
593 {
594 PyObject *sipParseErr = SIP_NULLPTR;
595 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
596
597 {
598 const ::wxString* oldName;
599 int oldNameState = 0;
600 const ::wxString* newName;
601 int newNameState = 0;
602 ::wxConfig *sipCpp;
603
604 static const char *sipKwdList[] = {
605 sipName_oldName,
606 sipName_newName,
607 };
608
609 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1J1", &sipSelf, sipType_wxConfig, &sipCpp, sipType_wxString,&oldName, &oldNameState, sipType_wxString,&newName, &newNameState))
610 {
611 bool sipRes;
612
613 PyErr_Clear();
614
615 Py_BEGIN_ALLOW_THREADS
616 sipRes = (sipSelfWasArg ? sipCpp-> ::wxConfig::RenameGroup(*oldName,*newName) : sipCpp->RenameGroup(*oldName,*newName));
617 Py_END_ALLOW_THREADS
618 sipReleaseType(const_cast< ::wxString *>(oldName),sipType_wxString,oldNameState);
619 sipReleaseType(const_cast< ::wxString *>(newName),sipType_wxString,newNameState);
620
621 if (PyErr_Occurred())
622 return 0;
623
624 return PyBool_FromLong(sipRes);
625 }
626 }
627
628 /* Raise an exception if the arguments couldn't be parsed. */
629 sipNoMethod(sipParseErr, sipName_Config, sipName_RenameGroup, doc_wxConfig_RenameGroup);
630
631 return SIP_NULLPTR;
632 }
633
634
635 PyDoc_STRVAR(doc_wxConfig_DeleteAll, "DeleteAll(self) -> bool");
636
637 extern "C" {static PyObject *meth_wxConfig_DeleteAll(PyObject *, PyObject *);}
meth_wxConfig_DeleteAll(PyObject * sipSelf,PyObject * sipArgs)638 static PyObject *meth_wxConfig_DeleteAll(PyObject *sipSelf, PyObject *sipArgs)
639 {
640 PyObject *sipParseErr = SIP_NULLPTR;
641 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
642
643 {
644 ::wxConfig *sipCpp;
645
646 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxConfig, &sipCpp))
647 {
648 bool sipRes;
649
650 PyErr_Clear();
651
652 Py_BEGIN_ALLOW_THREADS
653 sipRes = (sipSelfWasArg ? sipCpp-> ::wxConfig::DeleteAll() : sipCpp->DeleteAll());
654 Py_END_ALLOW_THREADS
655
656 if (PyErr_Occurred())
657 return 0;
658
659 return PyBool_FromLong(sipRes);
660 }
661 }
662
663 /* Raise an exception if the arguments couldn't be parsed. */
664 sipNoMethod(sipParseErr, sipName_Config, sipName_DeleteAll, doc_wxConfig_DeleteAll);
665
666 return SIP_NULLPTR;
667 }
668
669
670 PyDoc_STRVAR(doc_wxConfig_DeleteEntry, "DeleteEntry(self, key: object, bDeleteGroupIfEmpty: bool = True) -> bool");
671
672 extern "C" {static PyObject *meth_wxConfig_DeleteEntry(PyObject *, PyObject *, PyObject *);}
meth_wxConfig_DeleteEntry(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)673 static PyObject *meth_wxConfig_DeleteEntry(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
674 {
675 PyObject *sipParseErr = SIP_NULLPTR;
676 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
677
678 {
679 const ::wxString* key;
680 int keyState = 0;
681 bool bDeleteGroupIfEmpty = 1;
682 ::wxConfig *sipCpp;
683
684 static const char *sipKwdList[] = {
685 sipName_key,
686 sipName_bDeleteGroupIfEmpty,
687 };
688
689 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|b", &sipSelf, sipType_wxConfig, &sipCpp, sipType_wxString,&key, &keyState, &bDeleteGroupIfEmpty))
690 {
691 bool sipRes;
692
693 PyErr_Clear();
694
695 Py_BEGIN_ALLOW_THREADS
696 sipRes = (sipSelfWasArg ? sipCpp-> ::wxConfig::DeleteEntry(*key,bDeleteGroupIfEmpty) : sipCpp->DeleteEntry(*key,bDeleteGroupIfEmpty));
697 Py_END_ALLOW_THREADS
698 sipReleaseType(const_cast< ::wxString *>(key),sipType_wxString,keyState);
699
700 if (PyErr_Occurred())
701 return 0;
702
703 return PyBool_FromLong(sipRes);
704 }
705 }
706
707 /* Raise an exception if the arguments couldn't be parsed. */
708 sipNoMethod(sipParseErr, sipName_Config, sipName_DeleteEntry, doc_wxConfig_DeleteEntry);
709
710 return SIP_NULLPTR;
711 }
712
713
714 PyDoc_STRVAR(doc_wxConfig_DeleteGroup, "DeleteGroup(self, key: object) -> bool");
715
716 extern "C" {static PyObject *meth_wxConfig_DeleteGroup(PyObject *, PyObject *, PyObject *);}
meth_wxConfig_DeleteGroup(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)717 static PyObject *meth_wxConfig_DeleteGroup(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
718 {
719 PyObject *sipParseErr = SIP_NULLPTR;
720 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
721
722 {
723 const ::wxString* key;
724 int keyState = 0;
725 ::wxConfig *sipCpp;
726
727 static const char *sipKwdList[] = {
728 sipName_key,
729 };
730
731 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxConfig, &sipCpp, sipType_wxString,&key, &keyState))
732 {
733 bool sipRes;
734
735 PyErr_Clear();
736
737 Py_BEGIN_ALLOW_THREADS
738 sipRes = (sipSelfWasArg ? sipCpp-> ::wxConfig::DeleteGroup(*key) : sipCpp->DeleteGroup(*key));
739 Py_END_ALLOW_THREADS
740 sipReleaseType(const_cast< ::wxString *>(key),sipType_wxString,keyState);
741
742 if (PyErr_Occurred())
743 return 0;
744
745 return PyBool_FromLong(sipRes);
746 }
747 }
748
749 /* Raise an exception if the arguments couldn't be parsed. */
750 sipNoMethod(sipParseErr, sipName_Config, sipName_DeleteGroup, doc_wxConfig_DeleteGroup);
751
752 return SIP_NULLPTR;
753 }
754
755
756 /* Cast a pointer to a type somewhere in its inheritance hierarchy. */
757 extern "C" {static void *cast_wxConfig(void *, const sipTypeDef *);}
cast_wxConfig(void * sipCppV,const sipTypeDef * targetType)758 static void *cast_wxConfig(void *sipCppV, const sipTypeDef *targetType)
759 {
760 ::wxConfig *sipCpp = reinterpret_cast< ::wxConfig *>(sipCppV);
761
762 if (targetType == sipType_wxConfigBase)
763 return static_cast< ::wxConfigBase *>(sipCpp);
764
765 if (targetType == sipType_wxObject)
766 return static_cast< ::wxObject *>(sipCpp);
767
768 return sipCppV;
769 }
770
771
772 /* Call the instance's destructor. */
773 extern "C" {static void release_wxConfig(void *, int);}
release_wxConfig(void * sipCppV,int sipState)774 static void release_wxConfig(void *sipCppV, int sipState)
775 {
776 Py_BEGIN_ALLOW_THREADS
777
778 if (sipState & SIP_DERIVED_CLASS)
779 delete reinterpret_cast<sipwxConfig *>(sipCppV);
780 else
781 delete reinterpret_cast< ::wxConfig *>(sipCppV);
782
783 Py_END_ALLOW_THREADS
784 }
785
786
787 extern "C" {static void dealloc_wxConfig(sipSimpleWrapper *);}
dealloc_wxConfig(sipSimpleWrapper * sipSelf)788 static void dealloc_wxConfig(sipSimpleWrapper *sipSelf)
789 {
790 if (sipIsDerivedClass(sipSelf))
791 reinterpret_cast<sipwxConfig *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;
792
793 if (sipIsOwnedByPython(sipSelf))
794 {
795 release_wxConfig(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
796 }
797 }
798
799
800 extern "C" {static void *init_type_wxConfig(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxConfig(sipSimpleWrapper * sipSelf,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)801 static void *init_type_wxConfig(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
802 {
803 sipwxConfig *sipCpp = SIP_NULLPTR;
804
805 {
806 const ::wxString& appNamedef = wxEmptyString;
807 const ::wxString* appName = &appNamedef;
808 int appNameState = 0;
809 const ::wxString& vendorNamedef = wxEmptyString;
810 const ::wxString* vendorName = &vendorNamedef;
811 int vendorNameState = 0;
812 const ::wxString& localFilenamedef = wxEmptyString;
813 const ::wxString* localFilename = &localFilenamedef;
814 int localFilenameState = 0;
815 const ::wxString& globalFilenamedef = wxEmptyString;
816 const ::wxString* globalFilename = &globalFilenamedef;
817 int globalFilenameState = 0;
818 long style = wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_GLOBAL_FILE;
819
820 static const char *sipKwdList[] = {
821 sipName_appName,
822 sipName_vendorName,
823 sipName_localFilename,
824 sipName_globalFilename,
825 sipName_style,
826 };
827
828 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|J1J1J1J1l", sipType_wxString,&appName, &appNameState, sipType_wxString,&vendorName, &vendorNameState, sipType_wxString,&localFilename, &localFilenameState, sipType_wxString,&globalFilename, &globalFilenameState, &style))
829 {
830 PyErr_Clear();
831
832 Py_BEGIN_ALLOW_THREADS
833 sipCpp = new sipwxConfig(*appName,*vendorName,*localFilename,*globalFilename,style);
834 Py_END_ALLOW_THREADS
835 sipReleaseType(const_cast< ::wxString *>(appName),sipType_wxString,appNameState);
836 sipReleaseType(const_cast< ::wxString *>(vendorName),sipType_wxString,vendorNameState);
837 sipReleaseType(const_cast< ::wxString *>(localFilename),sipType_wxString,localFilenameState);
838 sipReleaseType(const_cast< ::wxString *>(globalFilename),sipType_wxString,globalFilenameState);
839
840 if (PyErr_Occurred())
841 {
842 delete sipCpp;
843 return SIP_NULLPTR;
844 }
845
846 sipCpp->sipPySelf = sipSelf;
847
848 return sipCpp;
849 }
850 }
851
852 return SIP_NULLPTR;
853 }
854
855
856 /* Define this type's super-types. */
857 static sipEncodedTypeDef supers_wxConfig[] = {{83, 255, 1}};
858
859
860 static PyMethodDef methods_wxConfig[] = {
861 {SIP_MLNAME_CAST(sipName_DeleteAll), meth_wxConfig_DeleteAll, METH_VARARGS, SIP_MLDOC_CAST(doc_wxConfig_DeleteAll)},
862 {SIP_MLNAME_CAST(sipName_DeleteEntry), SIP_MLMETH_CAST(meth_wxConfig_DeleteEntry), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxConfig_DeleteEntry)},
863 {SIP_MLNAME_CAST(sipName_DeleteGroup), SIP_MLMETH_CAST(meth_wxConfig_DeleteGroup), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxConfig_DeleteGroup)},
864 {SIP_MLNAME_CAST(sipName_Flush), SIP_MLMETH_CAST(meth_wxConfig_Flush), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxConfig_Flush)},
865 {SIP_MLNAME_CAST(sipName_GetNumberOfEntries), SIP_MLMETH_CAST(meth_wxConfig_GetNumberOfEntries), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxConfig_GetNumberOfEntries)},
866 {SIP_MLNAME_CAST(sipName_GetNumberOfGroups), SIP_MLMETH_CAST(meth_wxConfig_GetNumberOfGroups), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxConfig_GetNumberOfGroups)},
867 {SIP_MLNAME_CAST(sipName_GetPath), meth_wxConfig_GetPath, METH_VARARGS, SIP_MLDOC_CAST(doc_wxConfig_GetPath)},
868 {SIP_MLNAME_CAST(sipName_HasEntry), SIP_MLMETH_CAST(meth_wxConfig_HasEntry), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxConfig_HasEntry)},
869 {SIP_MLNAME_CAST(sipName_HasGroup), SIP_MLMETH_CAST(meth_wxConfig_HasGroup), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxConfig_HasGroup)},
870 {SIP_MLNAME_CAST(sipName_RenameEntry), SIP_MLMETH_CAST(meth_wxConfig_RenameEntry), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxConfig_RenameEntry)},
871 {SIP_MLNAME_CAST(sipName_RenameGroup), SIP_MLMETH_CAST(meth_wxConfig_RenameGroup), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxConfig_RenameGroup)},
872 {SIP_MLNAME_CAST(sipName_SetPath), SIP_MLMETH_CAST(meth_wxConfig_SetPath), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxConfig_SetPath)}
873 };
874
875 PyDoc_STRVAR(doc_wxConfig, "\1Config(appName: object = wxEmptyString, vendorName: object = wxEmptyString, localFilename: object = wxEmptyString, globalFilename: object = wxEmptyString, style: int = wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_GLOBAL_FILE)");
876
877
878 sipClassTypeDef sipTypeDef__core_wxConfig = {
879 {
880 -1,
881 SIP_NULLPTR,
882 SIP_NULLPTR,
883 SIP_TYPE_SCC|SIP_TYPE_CLASS,
884 sipNameNr_wxConfig,
885 {SIP_NULLPTR},
886 SIP_NULLPTR
887 },
888 {
889 sipNameNr_Config,
890 {0, 0, 1},
891 12, methods_wxConfig,
892 0, SIP_NULLPTR,
893 0, SIP_NULLPTR,
894 {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
895 },
896 doc_wxConfig,
897 -1,
898 -1,
899 supers_wxConfig,
900 SIP_NULLPTR,
901 init_type_wxConfig,
902 SIP_NULLPTR,
903 SIP_NULLPTR,
904 #if PY_MAJOR_VERSION >= 3
905 SIP_NULLPTR,
906 SIP_NULLPTR,
907 #else
908 SIP_NULLPTR,
909 SIP_NULLPTR,
910 SIP_NULLPTR,
911 SIP_NULLPTR,
912 #endif
913 dealloc_wxConfig,
914 SIP_NULLPTR,
915 SIP_NULLPTR,
916 SIP_NULLPTR,
917 release_wxConfig,
918 cast_wxConfig,
919 SIP_NULLPTR,
920 SIP_NULLPTR,
921 SIP_NULLPTR,
922 SIP_NULLPTR,
923 SIP_NULLPTR,
924 SIP_NULLPTR
925 };
926