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 )
從 shared_ptr
建構 RealTimeRoom
物件至 RealTimeRoomImpl
物件。
適用於 API 的內部使用。
RemainingAutomatchingSlots
uint32_t RemainingAutomatchingSlots() const
傳回會議室可用的自動配對運算單元數量。
這個數字等於建立會議室的自動配對運算單元數量,減去已透過自動配對功能加入的參與者人數。Valid 必須傳回 true,這個函式才能使用。
有效
bool Valid() const
如果這個 RealTimeRoom
物件已填入資料,則傳回 true。
針對 RealTimeRoom
物件 (Id
、CreationTime
等) 中的 getter 函式,必須傳回 true。
operator=
RealTimeRoom & operator=( const RealTimeRoom & copy_from )
透過複製另一個物件來指派這個 RealTimeRoom
物件。