def __init__(self, *args, **argd): """You want to overide this method locally. You MUST remember to call the superconstructor for things to work however. The way you do this is: super(YourClass,self).__init__() """ super(component, self).__init__() self.__dict__.update(argd) self.inboxes = dict() self.outboxes = dict() # Create boxes for inboxes/outboxes for boxname in self.Inboxes: if boxname != "control": self.inboxes[boxname] = makeInbox(notify=self.unpause) else: self.inboxes[boxname] = makeEventInbox( notify=self.__receiveEvent) for boxname in self.Outboxes: self.outboxes[boxname] = makeOutbox(notify=self.unpause) self.children = [] self._callOnCloseDown = [] self.postoffice = postoffice("component :" + self.name)
def addInbox(self,*args): """ Allocates a new inbox with name *based on* the name provided. If a box with the suggested name already exists then a variant is used instead. Returns the name of the inbox added. """ name = self._newInboxName(*args) self.inboxes[name]=makeInbox(self.unpause) return name
def addInbox(self, *args): """ Allocates a new inbox with name *based on* the name provided. If a box with the suggested name already exists then a variant is used instead. Returns the name of the inbox added. """ name = self._newInboxName(*args) self.inboxes[name] = makeInbox(self.unpause) return name
def __init__(self, *args, **argd): """You want to overide this method locally. You MUST remember to call the superconstructor for things to work however. The way you do this is: super(YourClass,self).__init__() """ super(component, self).__init__() self.__dict__.update(argd) self.inboxes = dict() self.outboxes = dict() # Create boxes for inboxes/outboxes for boxname in self.Inboxes: self.inboxes[boxname] = makeInbox(notify=self.unpause) for boxname in self.Outboxes: self.outboxes[boxname] = makeOutbox(notify=self.unpause) self.children = [] self._callOnCloseDown = [] self.postoffice = postoffice("component :" + self.name)