コード例 #1
0
ファイル: BetaMemory.py プロジェクト: julianpistorius/myclips
 def delete(self, notifierRemoval=None, notifierUnlinking=None):
     """
     Remove the beta-memory from the network
     """
     # first delete all tokens
     Memory.delete(self)
         
     # then i can call parent destructor
     Node.delete(self, notifierRemoval, notifierUnlinking)
コード例 #2
0
ファイル: PNode.py プロジェクト: stefano-bragaglia/myclips
 def delete(self, notifierRemoval=None, notifierUnlinking=None):
     if self.isMain:
         for linkedNode in self._linkedPNodes:
             linkedNode.delete(notifierRemoval, notifierUnlinking)
             
         self._linkedPNodes = []
         
     Memory.delete(self)
     Node.delete(self, notifierRemoval, notifierUnlinking)
コード例 #3
0
    def delete(self, notifierRemoval=None, notifierUnlinking=None):
        """
        Remove the beta-memory from the network
        """
        # first delete all tokens
        Memory.delete(self)

        # then i can call parent destructor
        Node.delete(self, notifierRemoval, notifierUnlinking)
コード例 #4
0
 def delete(self, notifierRemoval=None, notifierUnlinking=None):
     """
     Remove the negative join node from the network
     and delete all tokens created by this node
     """
     # destroy tokens in memory
     Memory.delete(self)
         
     # then i can call parent destructor
     JoinNode.delete(self, notifierRemoval, notifierUnlinking)
コード例 #5
0
ファイル: NccNode.py プロジェクト: julianpistorius/myclips
 def delete(self, notifierRemoval=None, notifierUnlinking=None):
     """
     Remove this node and the partner from the network
     """
     # notify unlink between ncc and partner
     #EventManager.trigger(EventManager.E_NODE_UNLINKED, self.get_partner(), self)
     # then destroy the partner
     self.partner.delete(notifierRemoval, notifierUnlinking)
     # and last destroy this node itself
     Memory.delete(self)
     Node.delete(self, notifierRemoval, notifierUnlinking)
コード例 #6
0
 def delete(self, notifierRemoval=None, notifierUnlinking=None):
     """
     Remove this node and the partner from the network
     """
     # notify unlink between ncc and partner
     #EventManager.trigger(EventManager.E_NODE_UNLINKED, self.get_partner(), self)
     # then destroy the partner
     self.partner.delete(notifierRemoval, notifierUnlinking)
     # and last destroy this node itself
     Memory.delete(self)
     Node.delete(self, notifierRemoval, notifierUnlinking)
コード例 #7
0
 def delete(self, notifierRemoval=None, notifierUnlinking=None):
     """
     Remove the negative join node from the network
     and delete all tokens created by this node
     """
     
     for wme in self.rightParent.items:
         wme.unlinkExistsNode(self)
     
     # destroy tokens in memory
     Memory.delete(self)
         
     # then i can call parent destructor
     JoinNode.delete(self, notifierRemoval, notifierUnlinking)
コード例 #8
0
ファイル: ExistsNode.py プロジェクト: julianpistorius/myclips
    def delete(self, notifierRemoval=None, notifierUnlinking=None):
        """
        Remove the negative join node from the network
        and delete all tokens created by this node
        """

        for wme in self.rightParent.items:
            wme.unlinkExistsNode(self)

        # destroy tokens in memory
        Memory.delete(self)

        # then i can call parent destructor
        JoinNode.delete(self, notifierRemoval, notifierUnlinking)
コード例 #9
0
 def reduceCount(self):
     self._existsCount -= 1
     if self._existsCount == 0:
         Memory.delete(self)
コード例 #10
0
ファイル: ExistsNode.py プロジェクト: julianpistorius/myclips
 def reduceCount(self):
     self._existsCount -= 1
     if self._existsCount == 0:
         Memory.delete(self)