gpg:: 分數

#include <score.h>

單一資料結構可讓您存取玩家分數相關資料。

摘要

建構函式和解構函式

Score()
Score(std::shared_ptr< const ScoreImpl > impl)
明確的建構函式。
Score(const Score & copy_from)
複製現有分數的建構函式,並複製到新分數。
Score(Score && move_from)
將現有分數移入新分數的建構函式。
~Score()

公用函式

Metadata() const
const std::string &
傳回與分數相關的開發人員指定中繼資料 (如有設定)。
Rank() const
uint64_t
傳回與其他玩家相比的玩家分數排名。
Valid() const
bool
如果傳回的分數已填入資料,並且伴隨成功的回應狀態,則傳回 true;如果是未填入的使用者建立的分數,或是已填入的分數搭配失敗的回應狀態,則為 false。
Value() const
uint64_t
傳回玩家的分數。
operator=(const Score & copy_from)
Score &
從其他分數指派這個分數值的指派運算子。
operator=(Score && move_from)
Score &
從其他分數指派這個分數值的指派運算子。

公用函式

Metadata

const std::string & Metadata() const 

傳回與分數相關的開發人員指定中繼資料 (如有設定)。

排名

uint64_t Rank() const 

傳回與其他玩家相比的玩家分數排名。

分數

 Score()

分數

 Score(
  std::shared_ptr< const ScoreImpl > impl
)

明確的建構函式。

分數

 Score(
  const Score & copy_from
)

複製現有分數的建構函式,並複製到新分數。

分數

 Score(
  Score && move_from
)

將現有分數移入新分數的建構函式。

r-value-reference 版本。

有效

bool Valid() const 

如果傳回的分數已填入資料,並且伴隨成功的回應狀態,則傳回 true;如果是未填入的使用者建立的分數,或是已填入的分數搭配失敗的回應狀態,則為 false。

此物件上的 getter 函式必須設為 true 才能使用。

uint64_t Value() const 

傳回玩家的分數。

運算子=

Score & operator=(
  const Score & copy_from
)

從其他分數指派這個分數值的指派運算子。

運算子=

Score & operator=(
  Score && move_from
)

從其他分數指派這個分數值的指派運算子。

r-value-reference 版本。

預估分數

 ~Score()