-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMovieCollection.h
More file actions
36 lines (32 loc) · 1.1 KB
/
Copy pathMovieCollection.h
File metadata and controls
36 lines (32 loc) · 1.1 KB
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
#ifndef _MOVIECOLLECTION_H_
#define _MOVIECOLLECTION_H_
#include <string>
#include <vector>
#include "Movie.h"
#include "MediaCollection.h"
class MovieCollection: public MediaCollection{
private:
std::vector<Movie> *movies;
public:
// Constructor
MovieCollection(const std::string &name);
// Deep Copy Constructor
MovieCollection(const MovieCollection &source);
// Copy Assignment Operator
MovieCollection &operator=(const MovieCollection &source);
// Move Constructor
MovieCollection(MovieCollection &&source) noexcept;
// Move Assignment Operator
MovieCollection &operator=(MovieCollection &&source) noexcept;
// Destructor
~MovieCollection();
// Getters and Setters
const std::vector<Movie> &get_movies() const;
// Check if movie exist in collection, if it doesn't add it
bool add_movie(const std::string &title, const std::string &mpa_rating, int times_watched, int rating);
// If movie exists, increment times watched
bool increment_watched(const std::string &movie);
// Display's Movie collection
virtual void display() const override;
};
#endif // _MOVIECOLLECTION_H_