tr2023-robot/Container.py
2023-03-25 10:33:33 +01:00

16 lines
321 B
Python

class Container:
instances = {}
def set(self, name, instance):
self.instances[name] = instance
def get(self, name):
if name not in self.instances:
return None
return self.instances[name]
def count(self):
return len(self.instances)
def getInstances(self):
return self.instances