20
20
21
21
class BindingGenerator :
22
22
23
- def __init__ (self , prefix , namespace , prefix_include_root , output_dir = "" , addl_includes = "" ,
23
+ def __init__ (self , prefix , namespace , prefix_include_root , output_dir = "" , define_symbols = None , addl_includes = None ,
24
24
match_include_structure = False , catch_exceptions = True , write_json_output = False , status_output = None ,
25
25
flag_automatic = False , flag_pygccxml = False ):
26
26
"""Initialize BindingGenerator
@@ -31,13 +31,15 @@ def __init__(self, prefix, namespace, prefix_include_root, output_dir="", addl_i
31
31
32
32
Keyword arguments:
33
33
output_dir -- path where bindings will be placed
34
+ define_symbols -- comma separated tuple of defines
34
35
addl_includes -- comma separated list of additional include directories (default "")
35
36
match_include_structure --
36
37
If set to False, a bindings/ dir will be placed directly under the specified output_dir
37
38
If set to True, the directory structure under include/ will be mirrored
38
39
"""
39
40
40
41
self .header_extensions = ['.h' , '.hh' , '.hpp' ]
42
+ self .define_symbols = define_symbols
41
43
self .addl_include = addl_includes
42
44
self .prefix = prefix
43
45
self .namespace = namespace
@@ -151,7 +153,7 @@ def gen_file_binding(self, file_to_process):
151
153
include_paths = ',' .join ((include_paths , self .addl_include ))
152
154
153
155
parser = GenericHeaderParser (
154
- include_paths = include_paths , file_path = file_to_process )
156
+ define_symbols = self . define_symbols , include_paths = include_paths , file_path = file_to_process )
155
157
try :
156
158
header_info = parser .get_header_info (self .namespace )
157
159
0 commit comments