ServerSummary Class Reference

Public Member Functions

 ServerSummary (const Server *server)
 
const QString & address () const
 
const QString & game () const
 
bool isValid () const
 
const QString & name () const
 
unsigned short port () const
 
QVariant serializeQVariant () const
 
void setAddress (const QString &v)
 
void setGame (const QString &v)
 
void setName (const QString &v)
 
void setPort (unsigned short v)
 
void setTime (const QDateTime &v)
 
float similarity (const ServerSummary &other) const
 Similarity to the 'other' server; between 0.0 and 1.0. More...
 
QDateTime time () const
 

Static Public Member Functions

static ServerSummary deserializeQVariant (const QVariant &var)
 

Detailed Description

Definition at line 32 of file serversummary.h.

Member Function Documentation

float ServerSummary::similarity ( const ServerSummary other) const

Similarity to the 'other' server; between 0.0 and 1.0.

Similarity is calculated basing on address, game, name and port. Some of these values have more importance than others, and some require other values to be equal.

Both servers must be valid.

Definition at line 58 of file serversummary.cpp.


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