This commit is contained in:
32
single_ursim_control/plugins/abstract_plugin.py
Normal file
32
single_ursim_control/plugins/abstract_plugin.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from typing import Dict
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
|
||||
class AbstractCommand(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def execute(self):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def describe(self) -> dict:
|
||||
pass
|
||||
|
||||
|
||||
class AbstractCommandCompiler(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def compile(self, *args, **kwargs) -> AbstractCommand:
|
||||
pass
|
||||
|
||||
|
||||
class AbstractPlugin(ABC):
|
||||
plugin_name = ""
|
||||
|
||||
@abstractmethod
|
||||
def load_compilers(self) -> Dict[str, AbstractCommandCompiler]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def close(self):
|
||||
pass
|
||||
Reference in New Issue
Block a user