Exemplo n.º 1
0
Arquivo: M3.py Projeto: Kodextor/dream
 def canAcceptAndIsRequested(self, callerObject=None):
     nextObject=self.next[0]
     if len(nextObject.getActiveObjectQueue())>0:
         if nextObject.getActiveObjectQueue()[0].type=='Batch' or\
             len(nextObject.getActiveObjectQueue())==nextObject.numberOfSubBatches:
             return False
     return BatchScrapMachine.canAcceptAndIsRequested(self, callerObject)
Exemplo n.º 2
0
 def canAcceptAndIsRequested(self, callerObject=None):
     nextObject = self.next[0]
     if len(nextObject.getActiveObjectQueue()) > 0:
         if nextObject.getActiveObjectQueue()[0].type=='Batch' or\
             len(nextObject.getActiveObjectQueue())==nextObject.numberOfSubBatches:
             return False
     return BatchScrapMachine.canAcceptAndIsRequested(self, callerObject)
Exemplo n.º 3
0
 def removeEntity(self, entity=None):
     activeEntity = BatchScrapMachine.removeEntity(self, entity)
     from BatchDecompositionBlocking import BatchDecompositionBlocking
     decomposition = self.previous[0]
     if decomposition.__class__ is BatchDecompositionBlocking:
         buffer = decomposition.previous[0]
         if buffer.expectedSignals['canDispose']:
             self.sendSignal(receiver=buffer,
                             signal=buffer.canDispose,
                             sender=decomposition)
     return activeEntity
 def removeEntity(self, entity=None):
     activeEntity=BatchScrapMachine.removeEntity(self, entity)
     from BatchDecompositionBlocking import BatchDecompositionBlocking
     decomposition = self.previous[0]
     if decomposition.__class__ is BatchDecompositionBlocking:
         buffer=decomposition.previous[0]
         if buffer.expectedSignals['canDispose']:
             self.sendSignal(receiver=buffer, signal=buffer.canDispose, sender=decomposition)
     return activeEntity