Browse Source

add event(eid)

Shendan JIN 8 years ago
parent
commit
9f143fb457
1 changed files with 19 additions and 1 deletions
  1. 19 1
      event.py

+ 19 - 1
event.py

@@ -1,11 +1,24 @@
 import heapq
 
 class Event():
-    def __init__(self, date, location, description):
+    def __init__(self, date, location, description, eid = "c"):
         self.date = date
         self.location = location
         self.description = description
+        self.eid = eid
 
+    def affiche(self):
+        print('<Date>: %s' % self.date)
+        print('<Location>: %s' % self.location)
+
+        if (self.eid == "m"):
+            print('<Description>: %s' % self.description.decode())
+        elif (self.eid == "c"):
+            print('<Body>: %s' % self.description)       
+              
+    def problem(self):
+        #TODO: Call the function of RATP
+        return "TODO"
 
 class HeapEvent():
     """Heap for event : sort event according to their dates"""
@@ -23,3 +36,8 @@ class HeapEvent():
 
     def empty(self):
         return not self.data
+
+        
+ 
+    
+