Skip to content

Commit adfee98

Browse files
committed
Add DBBitArray to generator script
1 parent 9e9b76f commit adfee98

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

generator/generate.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
'Int32': 'int32_t',
3636
'String': 'std::string',
3737
'DBString': 'DBString',
38+
'DBBitArray': 'DBBitArray',
3839
}
3940

4041
# Additional Jinja 2 functions
@@ -104,7 +105,7 @@ def pod_default(field):
104105
ftype = field.type
105106

106107
# Not a POD, no default
107-
if dfl == '' or dfl == '\'\'' or ftype.startswith('Vector') or ftype.startswith('Array') or ftype.startswith('DBArray'):
108+
if dfl == '' or dfl == '\'\'' or ftype.startswith('Vector') or ftype.startswith('Array') or ftype.startswith('DBArray') or ftype.startswith('DBBitArray'):
108109
return ""
109110

110111
if ftype == 'Boolean':
@@ -171,6 +172,9 @@ def struct_headers(ty, header_map):
171172
if ty == 'DBString':
172173
return ['"lcf/dbstring.h"']
173174

175+
if ty == 'DBBitArray':
176+
return ['"lcf/dbbitarray.h"']
177+
174178
if ty in int_types or ty == "DatabaseVersion":
175179
return ['<stdint.h>']
176180

@@ -347,7 +351,7 @@ def needs_ctor(struct_name):
347351
for method, hdrs in setup[struct_name])
348352

349353
def type_is_array(ty):
350-
return re.match(r'(Vector|Array|DBArray)<(.*)>', ty)
354+
return re.match(r'(Vector|Array|DBArray)<(.*)>', ty) or ty == "DBBitArray"
351355

352356
def is_monotonic_from_0(enum):
353357
expected = 0

0 commit comments

Comments
 (0)