Browse Source

divided up printInterests() to separate the history and current state

Josh Wilson 19 years ago
parent
commit
d0db2325af
1 changed files with 8 additions and 1 deletions
  1. 8 1
      direct/src/distributed/DoInterestManager.py

+ 8 - 1
direct/src/distributed/DoInterestManager.py

@@ -14,6 +14,7 @@ from direct.showbase import DirectObject
 from PyDatagram import PyDatagram
 from PyDatagram import PyDatagram
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.directnotify.DirectNotifyGlobal import directNotify
 import types
 import types
+from direct.showbase.PythonUtil import report
 
 
 class InterestState:
 class InterestState:
     StateActive = 'Active'
     StateActive = 'Active'
@@ -366,7 +367,7 @@ class DoInterestManager(DirectObject.DirectObject):
             DoInterestManager._debug_maxDescriptionLen = max(
             DoInterestManager._debug_maxDescriptionLen = max(
                 DoInterestManager._debug_maxDescriptionLen, len(description))
                 DoInterestManager._debug_maxDescriptionLen, len(description))
 
 
-        def printInterests(self):
+        def printInterestHistory(self):
             print "***************** Interest History *************"
             print "***************** Interest History *************"
             format = '%9s %' + str(DoInterestManager._debug_maxDescriptionLen) + 's %6s %6s %9s %s'
             format = '%9s %' + str(DoInterestManager._debug_maxDescriptionLen) + 's %6s %6s %9s %s'
             print format % (
             print format % (
@@ -376,6 +377,8 @@ class DoInterestManager(DirectObject.DirectObject):
                 print format % tuple(i)
                 print format % tuple(i)
             print "Note: interests with a Scope of 0 do not get" \
             print "Note: interests with a Scope of 0 do not get" \
                 " done/finished notices."
                 " done/finished notices."
+            
+        def printInterestSets(self):
             print "******************* Interest Sets **************"
             print "******************* Interest Sets **************"
             format = '%6s %' + str(DoInterestManager._debug_maxDescriptionLen) + 's %10s %5s %9s %9s %10s'
             format = '%6s %' + str(DoInterestManager._debug_maxDescriptionLen) + 's %10s %5s %9s %9s %10s'
             print format % (
             print format % (
@@ -392,6 +395,10 @@ class DoInterestManager(DirectObject.DirectObject):
                                 state.parentId, state.zoneIdList, event)
                                 state.parentId, state.zoneIdList, event)
             print "************************************************"
             print "************************************************"
 
 
+        def printInterests(self):
+            self.printInterestHistory()
+            self.printInterestSets()
+            
     def _sendAddInterest(self, handle, scopeId, parentId, zoneIdList, description,
     def _sendAddInterest(self, handle, scopeId, parentId, zoneIdList, description,
                          action=None):
                          action=None):
         """
         """