mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 19:27:10 +00:00
express/mapping: fix breaking generation after f23db9440f
It was failing to map `int64_t` to `Argument_INT` enum.
This commit is contained in:
@@ -41,6 +41,15 @@ class Mapping:
|
|||||||
"binary": "boost::dynamic_bitset<>",
|
"binary": "boost::dynamic_bitset<>",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cpp_to_argument_types = {
|
||||||
|
"boolean": "BOOL",
|
||||||
|
"logical": "LOGICAL",
|
||||||
|
"integer": "INT",
|
||||||
|
"real": "DOUBLE",
|
||||||
|
"number": "DOUBLE",
|
||||||
|
"string": "STRING",
|
||||||
|
}
|
||||||
|
|
||||||
supported_argument_types = set(
|
supported_argument_types = set(
|
||||||
[
|
[
|
||||||
"INT",
|
"INT",
|
||||||
@@ -139,8 +148,8 @@ class Mapping:
|
|||||||
if ty == "UNKNOWN":
|
if ty == "UNKNOWN":
|
||||||
return "UNKNOWN"
|
return "UNKNOWN"
|
||||||
return "AGGREGATE_OF_" + ty
|
return "AGGREGATE_OF_" + ty
|
||||||
elif str(type) in self.express_to_cpp_typemapping:
|
elif (ty := self.cpp_to_argument_types.get(str(type))) is not None:
|
||||||
return self.express_to_cpp_typemapping.get(str(type), type).split("::")[-1].upper()
|
return ty
|
||||||
elif self.schema.is_type(type):
|
elif self.schema.is_type(type):
|
||||||
return _make_argument_type(self.schema.types[type].type)
|
return _make_argument_type(self.schema.types[type].type)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user