def __init__(self, agent): collection.Collection.__init__(self, creator=self.__create, wrecker=self.__wreck, names='event', protocols='hidden-connection explicit') self.agent = agent self.__event = bundles.FastSender(2)
def __init__(self,agent,index): self.agent = agent self.__fastdata = bundles.FastSender() collection.Collection.__init__(self,domain=domain.Aniso(),policy=policy.FastReadOnlyPolicy(),creator=self.__create,wrecker=self.__wreck,ordinal=index,names='row',protocols='hidden-connection remove explicit') self.get_policy().set_source(self.__fastdata) self.get_policy().set_clock(self.agent.model.get_clock()) self.set_private(node.static(_1=node.Server(change=self.__changetarget))) self.target = self.get_private()[1] if index is not None: self.__changetarget(piw.makelong(index-1,0))
def __init__(self,agent,row=None): self.__agent = agent self.__fastdata = bundles.FastSender() atom.Atom.__init__(self,domain=domain.Aniso(),policy=policy.FastReadOnlyPolicy()) self.get_policy().set_source(self.__fastdata) self.get_policy().set_clock(self.__agent.model.get_clock()) self.set_private(node.static(_1=node.Server(change=self.__changetarget),_2=node.Server(value=piw.makelong(1,0),change=self.__changerefs))) self.target = self.get_private()[1] self.refs = self.get_private()[2] if row is not None: self.__changetarget(piw.makelong(row,0))
def __init__(self): atom.Atom.__init__(self, creator=self.__create, wrecker=self.__wreck) self.__event = bundles.FastSender(2)