gpg::PlayerLevel

#include <player_level.h>

A single data structure containing data about player's level.

Summary

Constructors and Destructors

PlayerLevel()
PlayerLevel(std::shared_ptr< const PlayerLevelImpl > impl)
Constructs a PlayerLevel from a shared_ptr to a PlayerLevelImpl.
PlayerLevel(const PlayerLevel & copy_from)
Copy constructor for copying an existing player level into a new one.
PlayerLevel(PlayerLevel && move_from)
Constructor for moving an existing player level into a new one.
~PlayerLevel()

Public functions

LevelNumber() const
uint32_t
Returns the number for this level, e.g.
MaximumXP() const
uint64_t
Returns the maximum XP value represented by this level, exclusive.
MinimumXP() const
uint64_t
Returns the minimum XP value needed to attain this level, inclusive.
Valid() const
bool
Returns true when the returned player level is populated with data and is accompanied by a successful response status; false for an unpopulated user-created player or for a populated one accompanied by an unsuccessful response status.
operator=(const PlayerLevel & copy_from)
Assignment operator for assigning this player level's value from another player level.
operator=(PlayerLevel && move_from)
Assignment operator for assigning this player level's value from another player level.

Public functions

LevelNumber

uint32_t LevelNumber() const 

Returns the number for this level, e.g.

"level 10".

MaximumXP

uint64_t MaximumXP() const 

Returns the maximum XP value represented by this level, exclusive.

MinimumXP

uint64_t MinimumXP() const 

Returns the minimum XP value needed to attain this level, inclusive.

PlayerLevel

 PlayerLevel()

PlayerLevel

 PlayerLevel(
  std::shared_ptr< const PlayerLevelImpl > impl
)

Constructs a PlayerLevel from a shared_ptr to a PlayerLevelImpl.

This is used internally, and is not intended for use by consumers of this API.

PlayerLevel

 PlayerLevel(
  const PlayerLevel & copy_from
)

Copy constructor for copying an existing player level into a new one.

PlayerLevel

 PlayerLevel(
  PlayerLevel && move_from
)

Constructor for moving an existing player level into a new one.

r-value-reference version.

Valid

bool Valid() const 

Returns true when the returned player level is populated with data and is accompanied by a successful response status; false for an unpopulated user-created player or for a populated one accompanied by an unsuccessful response status.

It must be true for the getter functions on this object to be usable.

operator=

PlayerLevel & operator=(
  const PlayerLevel & copy_from
)

Assignment operator for assigning this player level's value from another player level.

operator=

PlayerLevel & operator=(
  PlayerLevel && move_from
)

Assignment operator for assigning this player level's value from another player level.

r-value-reference version

~PlayerLevel

 ~PlayerLevel()