GameServer
PartyManager.h
[詳解]
1 #ifndef __PARTYMANAGER_H__
2 #define __PARTYMANAGER_H__
3 
4 #include "Party.h"
5 #include "WeakPtrDefine.h"
6 
10 class PartyManager : noncopyable
11 {
12 
13 private: // 別名定義.
14 
15  typedef shared_ptr<Party> PartySharedPtr;
16  typedef boost::unordered_map<u32, PartySharedPtr> PartyList;
17 
18 public:
19 
20  // デストラクタ
22 
23  // 毎フレームの処理.
24  void Poll();
25 
26  // 作成.
27  void Create(PlayerCharacterPtr pCreatePlayer);
28 
29  // 解散.
30  bool Dissolution(u32 Uuid);
31 
32  // 取得.
33  PartyPtr Get(u32 Uuid);
34 
35  // 既にどこかのパーティに参加済みか?
36  bool IsAlreadyJoined(u32 Uuid);
37 
38 private:
39 
40  // パーティリスト
41  PartyList Partys;
42 
43  // ============ Singleton =============
44 
45 public:
46 
47  static PartyManager &GetInstance() { return Instance; }
48 
49 private:
50 
51  PartyManager();
52  static PartyManager Instance;
53 
54 };
55 
56 #endif // #ifndef __PARTYMANAGER_H__
~PartyManager()
Definition: PartyManager.h:21
static PartyManager & GetInstance()
Definition: PartyManager.h:47
void Poll()
Definition: PartyManager.cpp:16
Definition: PartyManager.h:10
void Create(PlayerCharacterPtr pCreatePlayer)
Definition: PartyManager.cpp:37
unsigned int u32
Definition: TypeDefs.h:10
bool IsAlreadyJoined(u32 Uuid)
Definition: PartyManager.cpp:68
weak_ptr< Party > PartyPtr
Definition: WeakPtrDefine.h:19
PartyPtr Get(u32 Uuid)
Definition: PartyManager.cpp:61
weak_ptr< PlayerCharacter > PlayerCharacterPtr
Definition: WeakPtrDefine.h:13
bool Dissolution(u32 Uuid)
Definition: PartyManager.cpp:46