84 lines
1.2 KiB
C++
84 lines
1.2 KiB
C++
#include "accesspoint.hh"
|
|
|
|
|
|
using namespace std ;
|
|
|
|
|
|
|
|
/*** Accesseurs lecture ***/
|
|
|
|
|
|
Point3D AccessPoint::get_coordinates() const
|
|
{
|
|
return coordinates ;
|
|
}
|
|
|
|
|
|
unsigned int AccessPoint::get_frequency() const
|
|
{
|
|
return frequency ;
|
|
}
|
|
|
|
|
|
|
|
/*** Accesseurs écriture ***/
|
|
|
|
|
|
void AccessPoint::set_coordinates(Point3D &_coordinates)
|
|
{
|
|
coordinates = _coordinates ;
|
|
}
|
|
|
|
|
|
void AccessPoint::set_frequency(unsigned int &_frequency)
|
|
{
|
|
frequency = _frequency ;
|
|
}
|
|
|
|
|
|
|
|
/*** Opérateurs ***/
|
|
|
|
|
|
AccessPoint AccessPoint::operator=(const AccessPoint &ap)
|
|
{
|
|
if (this == &ap)
|
|
return *this ;
|
|
|
|
this->WifiDevice::operator=(ap) ;
|
|
coordinates = ap.coordinates ;
|
|
frequency = ap.frequency ;
|
|
|
|
return *this ;
|
|
}
|
|
|
|
|
|
bool AccessPoint::operator==(const AccessPoint &ap) const
|
|
{
|
|
if (this == &ap)
|
|
return true ;
|
|
|
|
return
|
|
this->WifiDevice::operator==(ap) &&
|
|
coordinates == ap.coordinates &&
|
|
frequency == ap.frequency ;
|
|
}
|
|
|
|
|
|
bool AccessPoint::operator!=(const AccessPoint &ap) const
|
|
{
|
|
return !(*this == ap) ;
|
|
}
|
|
|
|
|
|
|
|
ostream &operator<<(ostream &os, const AccessPoint &ap)
|
|
{
|
|
os
|
|
<< "Coordinates: " << ap.coordinates << endl
|
|
<< "Frequency: " << ap.frequency << " Hz" << endl
|
|
<< (WifiDevice) ap ;
|
|
|
|
return os ;
|
|
}
|