-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMovieData.h
More file actions
44 lines (33 loc) · 1.21 KB
/
MovieData.h
File metadata and controls
44 lines (33 loc) · 1.21 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
37
38
39
40
41
42
43
44
#include <iostream>
#include <string>
#include <list>
#include <map>
#include <fstream>
#include <vector>
#include <cassert>
#include <set>
#ifndef MDATA_H
#define MDATA_H
//Title Year of Release Runtime in Minutes GenreCount GenreList ActorCount ActorList RoleCount RoleList
class MovieData {
public:
//CONSTRUCTOR
MovieData(std::ifstream &movie_file, std::set<std::string>& title_all,
std::set<std::string>& year_all, std::set<std::string>& runtime_all,
std::set<std::list<std::string> >& Genre_all, std::set<std::list<std::string> >& Actor_all,
std::set<std::list<std::string> >& Role_all);
//ACCESSORS
std::string gettitle() { return title; }
std::string getyear() { return year; }
std::string getruntime() { return runtime; }
std::list<std::string> getgenre() { return GenreList; }
std::list<std::string> getactor() { return ActorList; }
std::list<std::string> getrole() { return RoleList; }
//PRINT HELPER
void print(std::map<std::string, std::string> &actornamelist);
private:
//REPRESENTATION
std::string title, year, runtime;
std::list<std::string> GenreList, ActorList, RoleList;
};
#endif