- def getUniqueID (self):
- # Generate a unique id. This implementation is pretty simple,
- # just generating an increasing set of integers.
-
- # This function also sets up the dictionary which will hold the messages.
- self.__uniq_num += 1
- self.__msg_dict[self.__uniq_num] = []
-
- return self.__uniq_num
-
- def isValidID (self, id):
- # Check if the id given is a valid one. This is done by checking if
- # the id is in the dictionary.
- return id in self.__msg_dict.keys()
-
- def addMessage (self, id, msg, printquiet=True):