From f255fd32910bcefadab7ed84d04e7f944cf5f241 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 27 Jun 2003 19:30:31 +0000 Subject: [PATCH] define more accessors --- direct/src/distributed/DistributedObject.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/direct/src/distributed/DistributedObject.py b/direct/src/distributed/DistributedObject.py index 5c4c83dcbf..c540edfbc3 100644 --- a/direct/src/distributed/DistributedObject.py +++ b/direct/src/distributed/DistributedObject.py @@ -244,6 +244,21 @@ class DistributedObject(PandaObject): return context + def getCurrentContexts(self): + # Returns a list of the currently outstanding contexts created + # by getCallbackContext(). + return self.__callbacks.keys() + + def getCallback(self, context): + # Returns the callback that was passed in to the previous + # call to getCallbackContext. + return self.__callbacks[context][0] + + def getCallbackArgs(self, context): + # Returns the extraArgs that were passed in to the previous + # call to getCallbackContext. + return self.__callbacks[context][1] + def doCallbackContext(self, context, args): # This is called after the AI has responded to the message # sent via getCallbackContext(), above. The context number is