Initial support for event callbacks

Add parser support for template rendering of events.
Also defines the EventBase and Event classes.
EventBase is parent of Event.

Change-Id: I6b07b415acf510a8437529095bd489c0af73ddf5
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/src/pdmgen.py b/src/pdmgen.py
index efff03d..fe3f826 100755
--- a/src/pdmgen.py
+++ b/src/pdmgen.py
@@ -700,6 +700,20 @@
             c=self,
             indent=indent)
 
+class Event(Callback, Renderer):
+    '''Handle the event callback config file directive.'''
+
+    def __init__(self, *a, **kw):
+        self.eventName = kw.pop('eventName')
+        self.eventMessage = kw.pop('eventMessage')
+        super(Event, self).__init__(**kw)
+
+    def construct(self, loader, indent):
+        return self.render(
+            loader,
+            'event.mako.cpp',
+            c=self,
+            indent=indent)
 
 class ResolveCallout(Callback, Renderer):
     '''Handle the 'resolve callout' callback config file directive.'''
@@ -884,6 +898,7 @@
             'callback': {
                 'journal': Journal,
                 'elog': Elog,
+                'event': Event,
                 'group': GroupOfCallbacks,
                 'method': Method,
                 'resolve callout': ResolveCallout,