diff options
Diffstat (limited to 'codegen.py')
-rw-r--r-- | codegen.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -291,6 +291,9 @@ def genErl(spec): print 'amqp_exception(?%s) -> %s;' % \ (n, n.lower()) + def genClassPropsFieldnames(cls): + print "class_properties_fieldnames('P_%s') -> %s;" % (erlangize(cls.name), fieldNameList(cls.fields)) + methods = spec.allMethods() printFileHeader() @@ -310,6 +313,7 @@ def genErl(spec): -export([encode_properties/1]). -export([lookup_amqp_exception/1]). -export([amqp_exception/1]). +-export([class_properties_fieldnames/1]). bitvalue(true) -> 1; bitvalue(false) -> 0; @@ -354,6 +358,9 @@ bitvalue(undefined) -> 0. for(c,v,cls) in spec.constants: genAmqpException(c,v,cls) print "amqp_exception(_Code) -> undefined." + for c in spec.allClasses(): genClassPropsFieldnames(c) + print "class_properties_fieldnames(PropName) -> exit({unknown_class_properties_name, PropName})." + def genHrl(spec): def erlType(domain): return erlangTypeMap[spec.resolveDomain(domain)] |