mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 19:36:21 +00:00
Prefix IfcUtil::ArgumentType in order to avoid collisions with Windows API defines
This commit is contained in:
@@ -132,18 +132,18 @@ class ArrayType:
|
|||||||
t = simple_types[self.type].type_enum()
|
t = simple_types[self.type].type_enum()
|
||||||
else:
|
else:
|
||||||
t = self.type
|
t = self.type
|
||||||
if t in entity_names or t == "ENTITY":
|
if t in entity_names or t == "Argument_ENTITY":
|
||||||
return "ENTITY_LIST"
|
return "Argument_ENTITY_LIST"
|
||||||
elif t in selections:
|
elif t in selections:
|
||||||
return "ENTITY_LIST"
|
return "Argument_ENTITY_LIST"
|
||||||
elif t == "int":
|
elif t == "int":
|
||||||
return "VECTOR_INT"
|
return "Argument_VECTOR_INT"
|
||||||
elif t == "double" or t == "DOUBLE":
|
elif t == "double" or t == "Argument_DOUBLE":
|
||||||
return "VECTOR_DOUBLE"
|
return "Argument_VECTOR_DOUBLE"
|
||||||
elif t == "std::string" or t == "STRING":
|
elif t == "std::string" or t == "Argument_STRING":
|
||||||
return "VECTOR_STRING"
|
return "Argument_VECTOR_STRING"
|
||||||
elif isinstance(t, BinaryType):
|
elif isinstance(t, BinaryType):
|
||||||
return "UNKNOWN"
|
return "Argument_UNKNOWN"
|
||||||
else:
|
else:
|
||||||
assert False, t
|
assert False, t
|
||||||
|
|
||||||
@@ -154,9 +154,9 @@ class ScalarType:
|
|||||||
if self.type in simple_types:
|
if self.type in simple_types:
|
||||||
return simple_types[self.type].type_enum()
|
return simple_types[self.type].type_enum()
|
||||||
elif self.type in entity_names:
|
elif self.type in entity_names:
|
||||||
return "ENTITY"
|
return "Argument_ENTITY"
|
||||||
else:
|
else:
|
||||||
return { "bool":"BOOL","int":"INT","double":"DOUBLE","std::string":"STRING"}[self.type]
|
return { "bool":"Argument_BOOL","int":"Argument_INT","double":"Argument_DOUBLE","std::string":"Argument_STRING"}[self.type]
|
||||||
class EnumType:
|
class EnumType:
|
||||||
def __init__(self,l):
|
def __init__(self,l):
|
||||||
self.v = [(x,'%s_%s'%('%(fancy_name)s',x)) for x in l]
|
self.v = [(x,'%s_%s'%('%(fancy_name)s',x)) for x in l]
|
||||||
@@ -170,13 +170,13 @@ class EnumType:
|
|||||||
return "".join([' if(s=="%s"%s) return %s::%s;\n'%(v1.upper()," "*(self.maxlen-len(v1)),"%(name)s",v2) for v1,v2 in self.v])
|
return "".join([' if(s=="%s"%s) return %s::%s;\n'%(v1.upper()," "*(self.maxlen-len(v1)),"%(name)s",v2) for v1,v2 in self.v])
|
||||||
def __len__(self): return len(self.v)
|
def __len__(self): return len(self.v)
|
||||||
def type_enum(self):
|
def type_enum(self):
|
||||||
return "ENUMERATION"
|
return "Argument_ENUMERATION"
|
||||||
class SelectType:
|
class SelectType:
|
||||||
def __init__(self,l):
|
def __init__(self,l):
|
||||||
for x in l:
|
for x in l:
|
||||||
if x in simple_types: selectable_simple_types.add(x)
|
if x in simple_types: selectable_simple_types.add(x)
|
||||||
def __str__(self): return "IfcSchemaEntity"
|
def __str__(self): return "IfcSchemaEntity"
|
||||||
def type_enum(self): return "ENTITY"
|
def type_enum(self): return "Argument_ENTITY"
|
||||||
class BinaryType:
|
class BinaryType:
|
||||||
def __init__(self,l): self.l = int(l)
|
def __init__(self,l): self.l = int(l)
|
||||||
def __str__(self): return "char[%s]"%self.l
|
def __str__(self): return "char[%s]"%self.l
|
||||||
@@ -184,7 +184,7 @@ class BinaryType:
|
|||||||
class InverseType:
|
class InverseType:
|
||||||
def __init__(self,l):
|
def __init__(self,l):
|
||||||
self.name, self.type, self.reference = l
|
self.name, self.type, self.reference = l
|
||||||
def type_enum(self): return "ENTITY"
|
def type_enum(self): return "Argument_ENTITY"
|
||||||
class Typedef:
|
class Typedef:
|
||||||
def __init__(self,l):
|
def __init__(self,l):
|
||||||
self.name,self.type=l[1:3]
|
self.name,self.type=l[1:3]
|
||||||
|
|||||||
+498
-498
File diff suppressed because it is too large
Load Diff
@@ -47,7 +47,7 @@ inline T* reinterpret_pointer_cast(F* from) {
|
|||||||
|
|
||||||
namespace IfcUtil {
|
namespace IfcUtil {
|
||||||
enum ArgumentType {
|
enum ArgumentType {
|
||||||
INT, BOOL, DOUBLE, STRING, VECTOR_INT, VECTOR_DOUBLE, VECTOR_STRING, ENTITY, ENTITY_LIST, ENUMERATION, UNKNOWN
|
Argument_INT, Argument_BOOL, Argument_DOUBLE, Argument_STRING, Argument_VECTOR_INT, Argument_VECTOR_DOUBLE, Argument_VECTOR_STRING, Argument_ENTITY, Argument_ENTITY_LIST, Argument_ENUMERATION, Argument_UNKNOWN
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user