You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
853 B

1 year ago
#include "Photo.h"
#include "Base.h"
#include <iostream>
#include <string>
using namespace std;
Photo::Photo(std::string name, std::string pathname, unsigned int latitude, unsigned int longitude) : Base(name, pathname), latitude(latitude), longitude(longitude) {}
Photo::~Photo() {}
void Photo::setLatitude(unsigned int _latitude) {
latitude = _latitude;
}
void Photo::setLongitude(unsigned int _longitude) {
longitude = _longitude;
}
unsigned int Photo::getLatitude() const {
return latitude;
}
unsigned int Photo::getLongitude() const {
return longitude;
}
void Photo::affichage(ostream& flux) const {
Base::affichage(flux);
flux << "La photo a pour latitude : " << latitude << " et pour longitude : " << longitude << endl;
}
void Photo::play() const {
string command = "display " + pathname + " &";
system(command.c_str());
}