mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
Generate optional stubs for the wxFileSystemWatcher* classes
This commit is contained in:
@@ -1270,7 +1270,8 @@ def guessTypeStr(v):
|
||||
# generating stubs then we can still provide the wrapper classes but simply
|
||||
# have them raise NotImplemented errors or whatnot.
|
||||
|
||||
def generateStubs(cppFlag, module, excludes=[], typeValMap={}):
|
||||
def generateStubs(cppFlag, module, excludes=[], typeValMap={},
|
||||
extraHdrCode=None, extraCppCode=None):
|
||||
"""
|
||||
Generate C++ stubs for all items in the module, except those that are
|
||||
in the optional excludes list.
|
||||
@@ -1306,6 +1307,12 @@ def generateStubs(cppFlag, module, excludes=[], typeValMap={}):
|
||||
if isinstance(item, extractors.ClassDef):
|
||||
code.hdr.append('class {};'.format(item.name))
|
||||
|
||||
if extraHdrCode:
|
||||
code.hdr.append(extraHdrCode)
|
||||
|
||||
if extraCppCode:
|
||||
code.cpp.append(extraCppCode)
|
||||
|
||||
# Now write code for all the items in the module.
|
||||
for item in module:
|
||||
if item.name in excludes:
|
||||
|
||||
Reference in New Issue
Block a user