GameServer
InstanceAreaTicketManager.h
[詳解]
1 
6 #ifndef __INSTANCEAREATICKETMANAGER_H__
7 #define __INSTANCEAREATICKETMANAGER_H__
8 
9 #include <boost/unordered_map.hpp>
10 
11 class InstanceAreaTicket;
12 class Vector3D;
13 
19 class InstanceAreaTicketManager : public noncopyable
20 {
21 
22 private: // 別名定義.
23 
24  typedef boost::unordered_map<u32, InstanceAreaTicket *> TicketMap;
25 
26 public:
27 
32 
40  InstanceAreaTicket *Publish(u32 AreaId, const Vector3D &StartPosition);
41 
48  InstanceAreaTicket *Get(u32 Uuid);
49 
55  void Remove(u32 Uuid);
56 
57 private:
58 
59  // チケットリスト
60  TicketMap TicketList;
61 
62  // 次に発行するUUID
63  u32 NextUuid;
64 
65  // =========== Singleton ============
66 
67 public:
68 
69  static InstanceAreaTicketManager &GetInstance() { return Instance; }
70 
71 private:
72 
74  static InstanceAreaTicketManager Instance;
75 
76 };
77 
78 #endif // #ifndef __INSTANCEAREATICKETMANAGER_H__
インスタンスエリアチケット管理
Definition: InstanceAreaTicketManager.h:19
インスタンスマップチケット
Definition: InstanceAreaTicket.h:50
InstanceAreaTicket * Get(u32 Uuid)
取得
Definition: InstanceAreaTicketManager.cpp:41
InstanceAreaTicket * Publish(u32 AreaId, const Vector3D &StartPosition)
発行
Definition: InstanceAreaTicketManager.cpp:29
Definition: Vector3D.h:8
unsigned int u32
Definition: TypeDefs.h:10
void Remove(u32 Uuid)
消去
Definition: InstanceAreaTicketManager.cpp:48
virtual ~InstanceAreaTicketManager()
デストラクタ
Definition: InstanceAreaTicketManager.cpp:20
static InstanceAreaTicketManager & GetInstance()
Definition: InstanceAreaTicketManager.h:69