pimgen: Add new Mako templates
Add three new templates in preparation for another round of refactoring.
argument - For rendering array arguments.
method - For rendering method calls.
signature - For rendering dbus signature arguments.
Change-Id: I9f9806bcb5c1e048aa283e76f9c6f0f8a7bb53ac
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/pimgen.py b/pimgen.py
index 0b6cb6b..9c177c1 100755
--- a/pimgen.py
+++ b/pimgen.py
@@ -86,6 +86,16 @@
return m
+ def call(self, loader, indent):
+ return self.render(
+ loader,
+ 'method.mako.cpp',
+ method=self,
+ indent=indent)
+
+ def argument(self, loader, indent):
+ return self.call(loader, indent)
+
class Filter(MethodCall):
'''Provide common attributes for any filter.'''
@@ -111,6 +121,13 @@
kw.clear()
super(DbusSignature, self).__init__(**kw)
+ def argument(self, loader, indent):
+ return self.render(
+ loader,
+ 'signature.mako.cpp',
+ signature=self,
+ indent=indent)
+
class DestroyObject(Action):
'''Render a destroyObject action.'''