DiscoverTenerife
Public Member Functions | Private Attributes | List of all members
RankingPlayerData Class Reference

Class that stores the information of each player that is shown on the ranking. More...

Public Member Functions

 RankingPlayerData (string name, int score, string uid, string range="", int top=0)
 The constructor of the class it sets each property as the correspondent given value. If the range param is the empty string this method calls the static method calculateRange of the gameRules class to set the correspondant range to the range_ property. More...
 
string getName ()
 Getter of the name_ property. More...
 
string getUid ()
 Getter of the uid_ property. More...
 
int getScore ()
 Getter of the score_ property. More...
 
int getTop ()
 Getter of the top_ property. More...
 
void setTop (int top)
 Setter of the top_ property. More...
 
string getRange ()
 Getter of the range_ property. More...
 

Private Attributes

string name_
 string that contains the display name of the represented user. More...
 
string uid_
 string that contains the user id of the represented user. More...
 
int score_
 string that contains the score of the represented user. More...
 
int top_
 string that contains the position of the represented user on the ranking. More...
 
string range_
 string that contains the range name of the represented user. More...
 

Detailed Description

Class that stores the information of each player that is shown on the ranking.

Constructor & Destructor Documentation

◆ RankingPlayerData()

RankingPlayerData.RankingPlayerData ( string  name,
int  score,
string  uid,
string  range = "",
int  top = 0 
)

The constructor of the class it sets each property as the correspondent given value. If the range param is the empty string this method calls the static method calculateRange of the gameRules class to set the correspondant range to the range_ property.

Parameters
stringwith the represented user's display name.
intwith the represented user's score.
stringwith the represented user's id.
string(optional) with the represented user's range.
int(optional) with the represented user's position on the player ranking.

Member Function Documentation

◆ getName()

string RankingPlayerData.getName ( )

Getter of the name_ property.

Returns
string with the represented player name.

◆ getRange()

string RankingPlayerData.getRange ( )

Getter of the range_ property.

Returns
string with the represented player range.

◆ getScore()

int RankingPlayerData.getScore ( )

Getter of the score_ property.

Returns
int with the represented player score.

◆ getTop()

int RankingPlayerData.getTop ( )

Getter of the top_ property.

Returns
int with the represented player ranking position.

◆ getUid()

string RankingPlayerData.getUid ( )

Getter of the uid_ property.

Returns
string with the represented player id.

◆ setTop()

void RankingPlayerData.setTop ( int  top)

Setter of the top_ property.

Parameters
intwith the new ranking position of the represented player.

Member Data Documentation

◆ name_

string RankingPlayerData.name_
private

string that contains the display name of the represented user.

◆ range_

string RankingPlayerData.range_
private

string that contains the range name of the represented user.

◆ score_

int RankingPlayerData.score_
private

string that contains the score of the represented user.

◆ top_

int RankingPlayerData.top_
private

string that contains the position of the represented user on the ranking.

◆ uid_

string RankingPlayerData.uid_
private

string that contains the user id of the represented user.


The documentation for this class was generated from the following file: