-
Notifications
You must be signed in to change notification settings - Fork 0
/
InstanceManager.py
41 lines (34 loc) · 1.17 KB
/
InstanceManager.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# -*- coding :utf-8 -*-
"""
<Japanese>
各Processorクラスのインスタンスを所持するクラス
"""
import ClientProcessor,UserManager,MessageProcessor,Server,GUIProcessor
__auther__="Daisuke Kuwahara<mail : abcexe1@gmail.com>"
__status__="Student"
__version__="1.0"
__date__="2019/01/01"
class InstanceManager():
"""
<Japanese>
各Processorクラスのインスタンスを所持するクラス
"""
gp=None
sv=None
mp=None
um=None
fp=None
cp=None
make_first_instance=False
def __init__(self):
if not(InstanceManager.make_first_instance):
#自身のstaticメンバを1度だけ初期化
InstanceManager.gp=GUIProcessor.GUIProcessor(self)
InstanceManager.mp=MessageProcessor.MessageProcessor(self)
InstanceManager.um=UserManager.UserManager(self)
InstanceManager.cp=ClientProcessor.ClientProcessor(self)
InstanceManager.sv=Server.Server(self)
#static menberを再度生成しないようにする
InstanceManager.make_first_instance=True
if __name__=="__main__":
print("this is class file. Can not use system entry-point.")