add registerfunction
This commit is contained in:
parent
8500b9155c
commit
8078b4ab7c
15
appPublic/registerfunction.py
Normal file
15
appPublic/registerfunction.py
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
from functools import partial
|
||||
from appPublic.Singleton import SingletonDecorator
|
||||
|
||||
@SingletonDecorator
|
||||
class RegisterFunction:
|
||||
def __init__(self):
|
||||
self.registKW = {}
|
||||
|
||||
def register(self,name,func):
|
||||
self.registKW[name] = func
|
||||
|
||||
def get(self,name):
|
||||
return self.registKW.get(name,None)
|
||||
|
Loading…
Reference in New Issue
Block a user