gpg:: RealTimeRoomConfig
#include <real_time_room_config.h>
一种数据结构,包含创建 RealTimeRoom
对象所需的数据。
摘要
构造函数和析构函数 |
|
---|---|
RealTimeRoomConfig(std::shared_ptr< const RealTimeRoomConfigImpl > impl)
|
|
RealTimeRoomConfig()
|
|
RealTimeRoomConfig(const RealTimeRoomConfig & copy_from)
创建现有
RealTimeRoomConfig 对象的副本。 |
|
RealTimeRoomConfig(RealTimeRoomConfig && move_from)
移动现有的
RealTimeRoomConfig 对象。 |
公共函数 |
|
---|---|
ExclusiveBitMask() const
|
int64_t
一个位掩码,指示玩家在游戏中专属的角色,例如“攻击者”或“防御者”。
|
MaximumAutomatchingPlayers() const
|
uint32_t
可添加到房间的自动匹配玩家数量上限。
|
MinimumAutomatchingPlayers() const
|
uint32_t
要添加到房间的自动匹配玩家的最少数目。
|
PlayerIdsToInvite() const
|
const std::vector< std::string > &
要邀请加入新建聊天室的玩家 ID。
|
Valid() const
|
bool
如果此
RealTimeRoomConfig 对象中填充了数据,则返回 true。 |
Variant() const
|
uint32_t
开发者专用的值,用于表示客房类型或模式。
|
operator=(const RealTimeRoomConfig & copy_from)
|
通过从另一个对象复制来分配此
RealTimeRoomConfig 对象。 |
operator=(RealTimeRoomConfig && move_from)
|
将另一个对象移到此
RealTimeRoomConfig 对象中,以分配该对象。 |
类 |
|
---|---|
gpg:: |
构建一个或多个 RealTimeRoomConfig 对象。 |
公共函数
ExclusiveBitMask
int64_t ExclusiveBitMask() const
一个位掩码,指示玩家在游戏中专属的角色,例如“攻击者”或“防御者”。
对于自动匹配,任何配对玩家的逻辑积 (AND) 都必须为零。只有在 Valid 返回 true 时才能调用。
MaximumAutomatchingPlayers
uint32_t MaximumAutomatchingPlayers() const
可添加到房间的自动匹配玩家数量上限。
只有在 Valid 返回 true 时才能调用。
MinimumAutomatchingPlayers
uint32_t MinimumAutomatchingPlayers() const
要添加到房间的自动匹配玩家的最少数目。
只有在 Valid 返回 true 时才能调用。
PlayerIdsToInvite
const std::vector< std::string > & PlayerIdsToInvite() const
要邀请加入新建聊天室的玩家 ID。
只有在 Valid 返回 true 时才能调用。
RealTimeRoomConfig
RealTimeRoomConfig( std::shared_ptr< const RealTimeRoomConfigImpl > impl )
从对象、shared_ptr
到 RealTimeRoomConfigImpl
对象,构造 RealTimeRoomConfig
。
供 API 内部使用。
RealTimeRoomConfig
RealTimeRoomConfig()
RealTimeRoomConfig
RealTimeRoomConfig( const RealTimeRoomConfig & copy_from )
创建现有 RealTimeRoomConfig
对象的副本。
RealTimeRoomConfig
RealTimeRoomConfig( RealTimeRoomConfig && move_from )
移动现有的 RealTimeRoomConfig
对象。
有效
bool Valid() const
如果此 RealTimeRoomConfig
对象中填充了数据,则返回 true。
必须返回 true 才能使 RealTimeRoomConfig
对象的 getter 函数(PlayerIdsToInvite
、MinimumAutoroomingPlayers
等)可用。
operator=
RealTimeRoomConfig & operator=( const RealTimeRoomConfig & copy_from )
通过从另一个对象复制来分配此 RealTimeRoomConfig
对象。
operator=
RealTimeRoomConfig & operator=( RealTimeRoomConfig && move_from )
将另一个对象移到此 RealTimeRoomConfig
对象中,以分配该对象。