getAllOfType

This commit is contained in:
David Rose 2002-12-16 20:36:00 +00:00
parent cb2fd7957a
commit d5feca8fe3

View File

@ -644,3 +644,12 @@ class ClientRepository(DirectObject.DirectObject):
self.notify.info('*** RESTORING SIMULATED PULLED-NETWORK-PLUG ***')
self.tcpConn = self.hijackedTcpConn
del self.hijackedTcpConn
def getAllOfType(self, type):
# Returns a list of all DistributedObjects in the repository
# of a particular type.
result = []
for obj in self.doId2do.values():
if isinstance(obj, type):
result.append(obj)
return result