-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilm.cpp
39 lines (27 loc) · 773 Bytes
/
film.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <iostream>
#include "film.h"
#include "memtrace.h"
/// title getter
/// \return string a film cimevel
std::string Film::getTitle() {
return title;
}
/// ostreamre listazza az adatokat
/// \param os kiirasi cel
void Film::listAttributes(std::ostream &os) {
os << title << "\t" << runtime << "\t" << release << "\t";
}
void Film::serialize(std::iostream & fs) {
listAttributes(fs);
}
void Film::deserialize(std::iostream& fs) {
(fs >> title).ignore(1);
(fs >> runtime).ignore(1);
(fs >> release).ignore(1);
}
bool Film::operator==(const Film &other) const {
return title == other.title && runtime == other.runtime && release == other.release;
}
bool Film::operator!=(const Film &other) const {
return !(*this == other);
}