You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
287 B
Python
14 lines
287 B
Python
2 years ago
|
|
||
|
class SingletonManager:
|
||
|
|
||
|
__instance = None
|
||
|
|
||
|
@staticmethod
|
||
|
def set_instance(instance):
|
||
|
SingletonManager.__instance = instance
|
||
|
|
||
|
@staticmethod
|
||
|
def get_manager():
|
||
|
if SingletonManager.__instance is not None:
|
||
|
return SingletonManager.__instance
|