|
@@ -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
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|