- removed reference to postprocessors and replaced it with preprocessors

This commit is contained in:
Marius Stanciu
2020-05-18 16:11:02 +03:00
committed by Marius
parent ba3f10d355
commit a0a805217d
61 changed files with 212 additions and 211 deletions

View File

@@ -19,10 +19,10 @@ log = logging.getLogger('base')
preprocessors = {}
class ABCPostProcRegister(ABCMeta):
class ABCPreProcRegister(ABCMeta):
# handles preprocessors registration on instantiation
def __new__(cls, clsname, bases, attrs):
newclass = super(ABCPostProcRegister, cls).__new__(cls, clsname, bases, attrs)
newclass = super(ABCPreProcRegister, cls).__new__(cls, clsname, bases, attrs)
if object not in bases:
if newclass.__name__ in preprocessors:
log.warning('Preprocessor %s has been overriden' % newclass.__name__)
@@ -30,7 +30,7 @@ class ABCPostProcRegister(ABCMeta):
return newclass
class FlatCAMPostProc(object, metaclass=ABCPostProcRegister):
class PreProc(object, metaclass=ABCPreProcRegister):
@abstractmethod
def start_code(self, p):
pass
@@ -76,7 +76,7 @@ class FlatCAMPostProc(object, metaclass=ABCPostProcRegister):
pass
class FlatCAMPostProc_Tools(object, metaclass=ABCPostProcRegister):
class AppPreProcTools(object, metaclass=ABCPreProcRegister):
@abstractmethod
def start_code(self, p):
pass