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
对象。
Valid
bool Valid() const
如果此 RealTimeRoomConfig
对象已填充数据,则返回 true。
对于 RealTimeRoomConfig
对象上的 getter 函数(PlayerIdsToInvite
、MinimumAutoroomingPlayers
等)而言,必须返回 true 才能使用。
operator=
RealTimeRoomConfig & operator=( const RealTimeRoomConfig & copy_from )
通过复制另一个 RealTimeRoomConfig
对象来赋值此对象。
operator=
RealTimeRoomConfig & operator=( RealTimeRoomConfig && move_from )
通过将另一个 RealTimeRoomConfig
对象移动到此对象中来赋值。