gpg::ScoreSummary

#include <score_summary.h>

A single data structure which allows you to access a summary of score information.

Summary

Constructors and Destructors

ScoreSummary()
ScoreSummary(std::shared_ptr< const ScoreSummaryImpl > impl)
Constructs a ScoreSummary from a shared_ptr to a ScoreSummaryImpl.
ScoreSummary(const ScoreSummary & copy_from)
Creates a copy of an existing ScoreSummary.
ScoreSummary(ScoreSummary && move_from)
Moves an existing ScoreSummary.
~ScoreSummary()

Public functions

ApproximateNumberOfScores() const
uint64_t
Returns the approximate number of scores on the score page.
Collection() const
Returns the collection to which the leaderboard belongs.
CurrentPlayerScore() const
const Score &
Returns the score for the currently signed-in player.
LeaderboardId() const
const std::string &
Returns the unique string that the Google Play Developer Console generated beforehand.
TimeSpan() const
Returns the leaderboard timespan.
Valid() const
bool
Returns true if this ScoreSummary is populated with data.
operator=(const ScoreSummary & copy_from)
Assigns this ScoreSummary by copying from another one.
operator=(ScoreSummary && move_from)
Assigns this ScoreSummary by moving another one into it.

Public functions

ApproximateNumberOfScores

uint64_t ApproximateNumberOfScores() const 

Returns the approximate number of scores on the score page.

Returns an error if no scores have been requested (max_results = 0), and clamps the number at 25 if there are an excessive number of them.

Collection

LeaderboardCollection Collection() const 

Returns the collection to which the leaderboard belongs.

Possible values are PUBLIC and SOCIAL.

CurrentPlayerScore

const Score & CurrentPlayerScore() const 

Returns the score for the currently signed-in player.

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.

ScoreSummary

 ScoreSummary()

ScoreSummary

 ScoreSummary(
  std::shared_ptr< const ScoreSummaryImpl > impl
)

Constructs a ScoreSummary from a shared_ptr to a ScoreSummaryImpl.

Intended for internal use by the API.

ScoreSummary

 ScoreSummary(
  const ScoreSummary & copy_from
)

Creates a copy of an existing ScoreSummary.

ScoreSummary

 ScoreSummary(
  ScoreSummary && move_from
)

Moves an existing ScoreSummary.

TimeSpan

LeaderboardTimeSpan TimeSpan() const 

Returns the leaderboard timespan.

Possible values are DAILY, WEEKLY, or ALL_TIME.

Valid

bool Valid() const 

Returns true if this ScoreSummary is populated with data.

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

operator=

ScoreSummary & operator=(
  const ScoreSummary & copy_from
)

Assigns this ScoreSummary by copying from another one.

operator=

ScoreSummary & operator=(
  ScoreSummary && move_from
)

Assigns this ScoreSummary by moving another one into it.

~ScoreSummary

 ~ScoreSummary()