gpg::ScorePage

#include <score_page.h>

A single data structure which allows you to access score data.

Summary

Data include Leaderboard id, start, timespan, collection, previous score-page token, next score-page token, and the vector of all score entries.

Constructors and Destructors

ScorePage()
ScorePage(std::shared_ptr< const ScorePageImpl > impl)
Explicit constructor.
ScorePage(const ScorePage & copy_from)
Copy constructor for copying an existing score page into a new one.
ScorePage(ScorePage && move_from)
Constructor for moving an existing score page into a new one.
~ScorePage()

Public functions

Collection() const
Returns whether the leaderboard is PUBLIC or SOCIAL.
Entries() const
const std::vector< ScorePage::Entry > &
Vector of all score entries.
HasNextScorePage() const
bool
Valid if the scoreboard has a subsequent score page.
HasPreviousScorePage() const
bool
Valid if the scoreboard has a previous score page.
LeaderboardId() const
const std::string &
Returns the unique string that the Google Play Developer Console generated beforehand.
NextScorePageToken() const
Returns the score-page token for the subsequent page.
PreviousScorePageToken() const
Returns the score-page token for the previous page.
Start() const
Returns whether the leaderboard was initially queried for top scores or scores near the current player.
TimeSpan() const
Returns the timespan of the leaderboard.
Valid() const
bool
Returns true if this ScorePage is populated with data.
operator=(const ScorePage & copy_from)
Assignment operator for assigning this score page's value from another score page.
operator=(ScorePage && move_from)
Assignment operator for assigning this score page's value from another score page.

Classes

gpg::ScorePage::Entry

A class that creates an entry on a score page.

gpg::ScorePage::ScorePageToken

A data structure that is a nearly-opaque type representing a query for a ScorePage (or is empty).

Public functions

Collection

LeaderboardCollection Collection() const 

Returns whether the leaderboard is PUBLIC or SOCIAL.

Entries

const std::vector< ScorePage::Entry > & Entries() const 

Vector of all score entries.

HasNextScorePage

bool HasNextScorePage() const 

Valid if the scoreboard has a subsequent score page.

HasPreviousScorePage

bool HasPreviousScorePage() const 

Valid if the scoreboard has a previous score page.

LeaderboardId

const std::string & LeaderboardId() const 

Returns the unique string that the Google Play Developer Console generated beforehand.

Use it to refer to a leaderboard in your game client. It can only be called when Leaderboard::Valid() returns true.

NextScorePageToken

ScorePage::ScorePageToken NextScorePageToken() const 

Returns the score-page token for the subsequent page.

PreviousScorePageToken

ScorePage::ScorePageToken PreviousScorePageToken() const 

Returns the score-page token for the previous page.

ScorePage

 ScorePage()

ScorePage

 ScorePage(
  std::shared_ptr< const ScorePageImpl > impl
)

Explicit constructor.

ScorePage

 ScorePage(
  const ScorePage & copy_from
)

Copy constructor for copying an existing score page into a new one.

ScorePage

 ScorePage(
  ScorePage && move_from
)

Constructor for moving an existing score page into a new one.

r-value-reference version.

Start

LeaderboardStart Start() const 

Returns whether the leaderboard was initially queried for top scores or scores near the current player.

Possible values are TOP_SCORES and PLAYER_CENTERED.

TimeSpan

LeaderboardTimeSpan TimeSpan() const 

Returns the timespan of the leaderboard.

Possible values are DAILY, WEEKLY, and ALL_TIME.

Valid

bool Valid() const 

Returns true if this ScorePage is populated with data.

Must return true for the getter functions on the ScorePage object (LeaderboardId, Start, etc...) to be usable.

operator=

ScorePage & operator=(
  const ScorePage & copy_from
)

Assignment operator for assigning this score page's value from another score page.

operator=

ScorePage & operator=(
  ScorePage && move_from
)

Assignment operator for assigning this score page's value from another score page.

r-value-reference version.

~ScorePage

 ~ScorePage()