Commit dbe55e3c authored by Emmanuele Bassi's avatar Emmanuele Bassi
Browse files

generate: Expose interface methods to the class template

Limit the list of methods for interfaces, like we do for ancestor
parent 96c995a7
......@@ -844,6 +844,12 @@ class TemplateClass:
for iface_type in cls.implements:
iface = namespace.find_interface('.')[1])
if iface is not None:
# Set a hard-limit on the number of methods; base types can
# add *a lot* of them; two dozens feel like a good compromise
if len(iface.methods) < 24:
methods = [TemplateMethod(namespace, iface, m) for m in iface.methods]
methods = []
......@@ -853,6 +859,8 @@ class TemplateClass:
"n_properties": len(,
"signals": [TemplateSignal(namespace, iface, s) for s in iface.signals],
"n_signals": len(iface.signals),
"methods": methods,
"n_methods": len(iface.methods),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment