Compatibility for older versions of cmake, python, open cascade, boost

This commit is contained in:
aothms
2016-02-18 13:17:15 +01:00
parent a6094f50b9
commit da0af77570
13 changed files with 133 additions and 41 deletions
+6 -5
View File
@@ -18,8 +18,9 @@
###############################################################################
import templates
import codegen
class EnumHeader:
class EnumHeader(codegen.Base):
def __init__(self, mapping):
enumerable_types = sorted(set([name for name, type in mapping.schema.types.items()] + [name for name, type in mapping.schema.entities.items()]))
@@ -30,9 +31,9 @@ class EnumHeader:
}
self.schema_name = mapping.schema.name.capitalize()
self.file_name = '%senum.h'%self.schema_name
def __repr__(self):
return self.str
def emit(self):
f = open('%senum.h'%self.schema_name, 'w', encoding='utf-8')
f.write(str(self))
f.close()