- print method
-
- # check do methods return void
- for method in do_methods:
- if (method.split()[0] != 'void'):
- print "-- ERROR: _do method does not return void:", method
-
- get_methods = filter(lambda x: object_name+'_get_' in x, object_methods)
-
- set_methods = filter(lambda x: object_name+'_set_' in x, object_methods)
- for method in set_methods:
- if (method.split()[0] != 'uint_t'):
- print "-- ERROR: _set method does not return uint_t:", method
-
- other_methods = filter(lambda x: x not in new_methods, object_methods)
- other_methods = filter(lambda x: x not in del_methods, other_methods)
- other_methods = filter(lambda x: x not in do_methods, other_methods)
- other_methods = filter(lambda x: x not in get_methods, other_methods)
- other_methods = filter(lambda x: x not in set_methods, other_methods)
-
- if len(other_methods) > 0:
- print "-- WARNING: some methods for", object_name, "were unidentified"
- for method in other_methods:
- print method
-
- # generate object
- if not os.path.isdir('generated'): os.mkdir('generated')
- from gen_pyobject import *
- short_name = object_name[len('aubio_'):]
- if short_name in skip_objects:
- print "-- INFO: skipping object", short_name
- continue
- if 1: #try:
- s = gen_new_init(new_methods[0], short_name)
- s += gen_do(do_methods[0], short_name)
- s += gen_members(new_methods[0], short_name)
- s += gen_methods(get_methods, set_methods, short_name)
- s += gen_finish(short_name)
- fd = open('generated/gen-'+short_name+'.c', 'w')
- fd.write(s)
- #except Exception, e:
- # print "-- ERROR:", type(e), str(e), "in", short_name
- # continue
+ if (method.split()[0] != 'void'):
+ print "-- ERROR: _do method does not return void:", method
+
+ get_methods = filter(lambda x: object_name+'_get_' in x, object_methods)
+
+ set_methods = filter(lambda x: object_name+'_set_' in x, object_methods)
+ for method in set_methods:
+ if (method.split()[0] != 'uint_t'):
+ print "-- ERROR: _set method does not return uint_t:", method
+
+ other_methods = filter(lambda x: x not in new_methods, object_methods)
+ other_methods = filter(lambda x: x not in del_methods, other_methods)
+ other_methods = filter(lambda x: x not in do_methods, other_methods)
+ other_methods = filter(lambda x: x not in get_methods, other_methods)
+ other_methods = filter(lambda x: x not in set_methods, other_methods)
+
+ if len(other_methods) > 0:
+ print "-- WARNING: some methods for", object_name, "were unidentified"
+ for method in other_methods:
+ print method
+
+ # generate object
+ if not os.path.isdir('generated'): os.mkdir('generated')
+ from gen_pyobject import *
+ short_name = object_name[len('aubio_'):]
+ if short_name in skip_objects:
+ print "-- INFO: skipping object", short_name
+ continue
+ if 1: #try:
+ s = gen_new_init(new_methods[0], short_name)
+ s += gen_do(do_methods[0], short_name)
+ s += gen_members(new_methods[0], short_name)
+ s += gen_methods(get_methods, set_methods, short_name)
+ s += gen_finish(short_name)
+ fd = open('generated/gen-'+short_name+'.c', 'w')
+ fd.write(s)
+ #except Exception, e:
+ # print "-- ERROR:", type(e), str(e), "in", short_name
+ # continue