gpg:: RealTimeRoom
#include <real_time_room.h>
包含即時多人遊戲會議室目前狀態的資料結構。
摘要
建構函式和解構函式 |
|
---|---|
RealTimeRoom()
|
|
RealTimeRoom(std::shared_ptr< const RealTimeRoomImpl > impl)
|
|
RealTimeRoom(const RealTimeRoom & copy_from)
建立現有
RealTimeRoom 物件的副本。 |
|
RealTimeRoom(RealTimeRoom && move_from)
移動現有的
RealTimeRoom 物件。 |
公用函式 |
|
---|---|
AutomatchWaitEstimate() const
|
伺服器產生的預估,達到這個會議室自動配對時段所需的時間。
|
CreatingParticipant() const
|
傳回建立這個聊天室的參與者。
|
CreationTime() const
|
std::chrono::milliseconds
傳回這個
RealTimeRoom 物件的建立時間 (以從 Unix 紀元開始算起,以毫秒為單位)。 |
Description() const
|
std::string
傳回伺服器產生的會議室狀態摘要。
|
Id() const
|
const std::string &
傳回專門用來識別此
RealTimeRoom 物件的 ID。 |
Participants() const
|
std::vector< MultiplayerParticipant >
此聊天室所有參與者的向量。
|
RemainingAutomatchingSlots() const
|
uint32_t
傳回會議室的可用自動比對運算單元數量。
|
Status() const
|
傳回會議室的狀態。
|
Valid() const
|
bool
如果這個
RealTimeRoom 物件已填入資料,則傳回 true。 |
Variant() const
|
uint32_t
傳回遊戲專屬的變化版本 ID,方便遊戲用於識別不同的遊戲模式。
|
operator=(const RealTimeRoom & copy_from)
|
藉由複製其他物件來指派這個
RealTimeRoom 物件。 |
operator=(RealTimeRoom && move_from)
|
將其他物件移至該
RealTimeRoom 物件,即可指派這個物件。 |
公用函式
CreatingParticipant
MultiplayerParticipant CreatingParticipant() const
傳回建立這個聊天室的參與者。
Valid 必須傳回 true,這個函式才會使用。
CreationTime
std::chrono::milliseconds CreationTime() const
傳回這個 RealTimeRoom
物件的建立時間 (以從 Unix 紀元開始算起,以毫秒為單位)。
Valid 必須傳回 true,這個函式才會使用。
ID
const std::string & Id() const
傳回專門用來識別此 RealTimeRoom
物件的 ID。
如要稍後擷取這間會議室,請將這個 ID 與「RealTimeRoom::FetchRoom
」搭配使用。
Valid 必須傳回 true,這個函式才會使用。
參與者
std::vector< MultiplayerParticipant > Participants() const
此聊天室所有參與者的向量。
Valid 必須傳回 true,這個函式才會使用。
RealTimeRoom
RealTimeRoom()
RealTimeRoom
RealTimeRoom( std::shared_ptr< const RealTimeRoomImpl > impl )
建構 RealTimeRoom
物件從 shared_ptr
至 RealTimeRoomImpl
物件。
主要供 API 內部使用。
RemainingAutomatchingSlots
uint32_t RemainingAutomatchingSlots() const
傳回會議室的可用自動比對運算單元數量。
這個數字等於建立會議室時使用的自動比對運算單元數量,減去已透過自動比對新增的參與者人數。Valid 必須傳回 true,這個函式才會使用。
有效
bool Valid() const
如果這個 RealTimeRoom
物件已填入資料,則傳回 true。
必須為 RealTimeRoom
物件 (Id
、CreationTime
等...) 上的 getter 函式傳回 true,才能使用。