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

Class that stores the information of a visited place. More...

Public Member Functions

 VisitedPlace (string type, int id, int timesVisited, long lastVisitTimestamp)
 Constructor that simply set the given params as attributes of this object. More...
 
string ToJson ()
 Converts this object in a string JSON formatted.
More...
 
void newVisitAt (long timeOfTheVisit)
 this method register a new visit for the represented place. It adds one new visit and change the lastVisitTimestamp_ to the given timestamp. More...
 

Public Attributes

string type_
 string that contains the type of the represented place. More...
 
int id_
 int that contains the id of the represented place. More...
 
int timesVisited_
 int that contains the times that the current user has visited the represented place. More...
 
long lastVisitTimestamp_
 long that contains the timestamp that the current user last visit to the represented place. More...
 

Detailed Description

Class that stores the information of a visited place.

Constructor & Destructor Documentation

◆ VisitedPlace()

VisitedPlace.VisitedPlace ( string  type,
int  id,
int  timesVisited,
long  lastVisitTimestamp 
)

Constructor that simply set the given params as attributes of this object.

Parameters
stringtype of the represented place.
intid of the represented place.
inttimes that the current user has visited the represented place.
longtimestamp of the last visit of the current user to the represented place.

Member Function Documentation

◆ newVisitAt()

void VisitedPlace.newVisitAt ( long  timeOfTheVisit)

this method register a new visit for the represented place. It adds one new visit and change the lastVisitTimestamp_ to the given timestamp.

Parameters
longtimestamp of the visit

◆ ToJson()

string VisitedPlace.ToJson ( )

Converts this object in a string JSON formatted.

Returns
string that contains a JSON conversion of the current object.

Member Data Documentation

◆ id_

int VisitedPlace.id_

int that contains the id of the represented place.

◆ lastVisitTimestamp_

long VisitedPlace.lastVisitTimestamp_

long that contains the timestamp that the current user last visit to the represented place.

◆ timesVisited_

int VisitedPlace.timesVisited_

int that contains the times that the current user has visited the represented place.

◆ type_

string VisitedPlace.type_

string that contains the type of the represented place.


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