21 lines
419 B
Python
21 lines
419 B
Python
|
from abc import abstractmethod
|
||
|
|
||
|
from ..singleton import Singleton
|
||
|
|
||
|
|
||
|
class Server(metaclass=Singleton):
|
||
|
def __init__(self):
|
||
|
super().__init__()
|
||
|
self._components = []
|
||
|
|
||
|
def register_component(self, component):
|
||
|
self._components.append(component)
|
||
|
|
||
|
def unregister_component(self, component):
|
||
|
self._components.remove(component)
|
||
|
|
||
|
|
||
|
@abstractmethod
|
||
|
def step(self):
|
||
|
pass
|