gpg:: 플레이어
#include <player.h>
특정 플레이어에 대한 데이터에 액세스할 수 있는 데이터 구조입니다.
요약
생성자 및 소멸자 |
|
---|---|
Player()
|
|
Player(std::shared_ptr< const PlayerImpl > impl)
|
|
Player(const Player & copy_from)
기존 Player의 사본을 생성합니다.
|
|
Player(Player && move_from)
기존 Player를 새 플레이어로 이동합니다.
|
|
~Player()
|
공개 함수 |
|
---|---|
AvatarUrl(ImageResolution resolution) const
|
const std::string &
이 Player의 아바타 이미지가 있는 URL을 반환합니다.
|
CurrentLevel() const
|
const PlayerLevel &
이 플레이어의 현재 레벨 데이터를 검색합니다(알려진 경우).
|
CurrentXP() const
|
uint64_t
플레이어의 현재 XP 합계를 검색합니다.
|
HasLevelInfo() const
|
bool
이 플레이어에 레벨 정보가 있는지 여부를 반환합니다.
|
Id() const
|
const std::string &
현재 로그인된 플레이어의
Id 를 반환합니다. |
LastLevelUpTime() const
|
이 플레이어의 마지막 레벨업 타임스탬프를 검색합니다.
|
Name() const
|
const std::string &
현재 로그인된 플레이어의 Google+ 이름을 반환합니다.
|
NextLevel() const
|
const PlayerLevel &
이 플레이어의 다음 수준 데이터를 검색합니다(알려진 경우).
|
Title() const
|
const std::string &
플레이어의 제목을 검색합니다.
|
Valid() const
|
bool
반환된 플레이어가 데이터로 채워지고 성공적인 응답 상태가 있으면 true를 반환합니다. 채워지지 않은 사용자 생성 플레이어 또는 실패 응답 상태가 표시되며 채워진 플레이어의 경우 false입니다.
|
operator=(const Player & copy_from)
|
Player &
다른 플레이어에서 복사하여 이 Player를 할당합니다.
|
operator=(Player && move_from)
|
Player &
다른 값을 이동하여 이 Player 값을 할당합니다.
|
공개 함수
AvatarUrl
const std::string & AvatarUrl( ImageResolution resolution ) const
이 Player의 아바타 이미지가 있는 URL을 반환합니다.
ImageResolution
매개변수는 이미지의 해상도를 지정합니다. 이 함수를 사용하려면 Player::Valid()
에서 true를 반환해야 합니다.
CurrentLevel
const PlayerLevel & CurrentLevel() const
이 플레이어의 현재 레벨 데이터를 검색합니다(알려진 경우).
HasLevelInfo()에서 false를 반환하는 경우 PlayerLevel 객체를 반환하고 Valid()도 false를 반환합니다.
CurrentXP
uint64_t CurrentXP() const
플레이어의 현재 XP 합계를 검색합니다.
HasLevelInfo()에서 false를 반환하면 0이 반환됩니다. HasLevelInfo()가 true를 반환하면 플레이어의 현재 XP 합계는 CurrentLevel().MinimumXP~CurrentLevel().최대XP 범위에 속하게 됩니다.
HasLevelInfo
bool HasLevelInfo() const
이 플레이어에 레벨 정보가 있는지 여부를 반환합니다.
false를 반환하면 CurrentLevel()
및 NextLevel()
는 유효하지 않은 PlayerLevel
객체를 반환합니다.
ID
const std::string & Id() const
현재 로그인된 플레이어의 Id
를 반환합니다.
이 함수를 사용하려면 Player::Valid()
에서 true를 반환해야 합니다.
LastLevelUpTime
Timestamp LastLevelUpTime() const
이 플레이어의 마지막 레벨업 타임스탬프를 검색합니다.
HasLevelInfo()가 false를 반환하거나 플레이어의 레벨이 올라가지 않은 경우 0 (에포크)이 반환됩니다.
이름
const std::string & Name() const
현재 로그인된 플레이어의 Google+ 이름을 반환합니다.
이 함수를 사용하려면 Player::Valid()
에서 true를 반환해야 합니다.
NextLevel
const PlayerLevel & NextLevel() const
이 플레이어의 다음 수준 데이터를 검색합니다(알려진 경우).
HasLevelInfo()에서 false를 반환하는 경우 PlayerLevel 객체를 반환하고 Valid()도 false를 반환합니다. 플레이어가 현재 달성하려는 레벨입니다. 플레이어가 이미 도달할 수 있는 최대 레벨에 있는 경우 CurrentLevel() 및 NextLevel()은 동일한 값을 반환합니다.
플레이어
Player()
플레이어
Player( std::shared_ptr< const PlayerImpl > impl )
shared_ptr
에서 PlayerImpl
로 Player를 구성합니다.
API에서 내부적으로 사용하기 위한 용도입니다.
제목
const std::string & Title() const
플레이어의 제목을 검색합니다.
이는 플레이어가 Google Play 게임 생태계에서 취한 액션을 기반으로 합니다. 모든 플레이어에게 타이틀이 있는 것은 아니며 플레이어의 타이틀은 시간이 지남에 따라 변경될 수 있습니다. 플레이어에게 제목이 없는 경우 Title()은 빈 문자열을 반환합니다.
유효
bool Valid() const
반환된 플레이어가 데이터로 채워지고 성공적인 응답 상태가 있으면 true를 반환합니다. 채워지지 않은 사용자 생성 플레이어 또는 실패 응답 상태가 표시되며 채워진 플레이어의 경우 false입니다.
이 객체의 getter 함수를 사용하려면 true를 반환해야 합니다.
~플레이어
~Player()