pyloxi: move OFType interface functions to module level
This removes the need to replace the LOXI IR OFType object in members with our
own version. If/when the core OFType is upgraded to an inheritance hierachy we
won't need to duplicate it in pyloxi.
diff --git a/py_gen/templates/_ofclass.py b/py_gen/templates/_ofclass.py
index 4c5358e..ec6b04e 100644
--- a/py_gen/templates/_ofclass.py
+++ b/py_gen/templates/_ofclass.py
@@ -1,4 +1,5 @@
:: from loxi_ir import *
+:: import py_gen.oftype
:: normal_members = [m for m in ofclass.members if type(m) == OFDataMember]
class ${ofclass.pyname}(${superclass}):
:: for m in ofclass.type_members:
@@ -10,7 +11,7 @@
if ${m.name} != None:
self.${m.name} = ${m.name}
else:
- self.${m.name} = ${m.oftype.gen_init_expr()}
+ self.${m.name} = ${py_gen.oftype.gen_init_expr(m.oftype)}
:: #endfor
return