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

class that stores all the information of a place. It also has to download the image of the place. More...

Public Member Functions

 Place (Dictionary< string, string > data)
 
string getName ()
 getter of the name_ attribute More...
 
string getAddress ()
 getter of the address attribute More...
 
double getLatitude ()
 getter of the latitude_ attribute More...
 
double getLongitude ()
 getter of the longitude_ attribute More...
 
string getZone ()
 getter of the zone_ attribute More...
 
Sprite getImage ()
 getter of the image_ attribute More...
 
bool isReady ()
 getter of the ready_ attribute More...
 
void oneMoreVisit ()
 add one to the timesItHasBeenVisited_ property. More...
 
string ToJson ()
 
int getTimesItHasBeenVisited ()
 getter of the timesItHasBeenVisited_ attribute More...
 
int getNewVisits ()
 getter of the newVisits_ property More...
 
void resetNewVisits ()
 this method sets the newVisits_ property to 0 More...
 
void startDownload ()
 if the image_ property is null, this start the donwload method of the WebClient_ property and initialize the image_ porperty to the real image. More...
 

Static Public Attributes

static WebClient webClient_ = null
 web client that download the image. More...
 

Private Attributes

string name_
 name of the represented place. More...
 
string address_
 address of the represented place. More...
 
double latitude_
 latitude of the geographical coordenades of the represented place. More...
 
double longitude_
 longitude of the geographical coordenades of the represented place. More...
 
string imageLink_
 imageLink of the image of the represented place. More...
 
int timesItHasBeenVisited_
 times that this place has been visited for any user. More...
 
string zone_
 zone of the map that the represented place belongs. More...
 
Sprite image_
 Image of the reprecented place. More...
 
bool ready_ = false
 bool that control if this place is ready to use. More...
 
int newVisits_ = 0
 int that store the number of visits that wasnt uploaded already More...
 

Detailed Description

class that stores all the information of a place. It also has to download the image of the place.

Constructor & Destructor Documentation

◆ Place()

Place.Place ( Dictionary< string, string >  data)
Parameters
Dictionary<string,string>data on string version of this place. It expects a dictionary that has entries for addres_, imageLink_, latitude_, longitude_, name_, timesItHasBeenVisited_ and zone_. It also initializes the image_ property to null.

Member Function Documentation

◆ getAddress()

string Place.getAddress ( )

getter of the address attribute

Returns
string with the address's property value

◆ getImage()

Sprite Place.getImage ( )

getter of the image_ attribute

Returns
string with the image_'s property value

◆ getLatitude()

double Place.getLatitude ( )

getter of the latitude_ attribute

Returns
string with the latitude_'s property value

◆ getLongitude()

double Place.getLongitude ( )

getter of the longitude_ attribute

Returns
string with the longitude_'s property value

◆ getName()

string Place.getName ( )

getter of the name_ attribute

Returns
string with the name_'s property value

◆ getNewVisits()

int Place.getNewVisits ( )

getter of the newVisits_ property

Returns
int with the newVisits_ property value

◆ getTimesItHasBeenVisited()

int Place.getTimesItHasBeenVisited ( )

getter of the timesItHasBeenVisited_ attribute

Returns
string with the timesItHasBeenVisited_'s property value

◆ getZone()

string Place.getZone ( )

getter of the zone_ attribute

Returns
string with the zone_'s property value

◆ isReady()

bool Place.isReady ( )

getter of the ready_ attribute

Returns
string with the ready_'s property value, true if this place is ready, false in other case.

◆ oneMoreVisit()

void Place.oneMoreVisit ( )

add one to the timesItHasBeenVisited_ property.

◆ resetNewVisits()

void Place.resetNewVisits ( )

this method sets the newVisits_ property to 0

◆ startDownload()

void Place.startDownload ( )

if the image_ property is null, this start the donwload method of the WebClient_ property and initialize the image_ porperty to the real image.

◆ ToJson()

string Place.ToJson ( )
Returns
string that contains a string conversion of this object. The conversion follows the JSON format.

Member Data Documentation

◆ address_

string Place.address_
private

address of the represented place.

◆ image_

Sprite Place.image_
private

Image of the reprecented place.

◆ imageLink_

string Place.imageLink_
private

imageLink of the image of the represented place.

◆ latitude_

double Place.latitude_
private

latitude of the geographical coordenades of the represented place.

◆ longitude_

double Place.longitude_
private

longitude of the geographical coordenades of the represented place.

◆ name_

string Place.name_
private

name of the represented place.

◆ newVisits_

int Place.newVisits_ = 0
private

int that store the number of visits that wasnt uploaded already

◆ ready_

bool Place.ready_ = false
private

bool that control if this place is ready to use.

◆ timesItHasBeenVisited_

int Place.timesItHasBeenVisited_
private

times that this place has been visited for any user.

◆ webClient_

WebClient Place.webClient_ = null
static

web client that download the image.

◆ zone_

string Place.zone_
private

zone of the map that the represented place belongs.


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