\hypertarget{movie_8h}{}\section{movie.\+h File Reference} \label{movie_8h}\index{movie.\+h@{movie.\+h}} {\ttfamily \#include $<$string$>$}\\* {\ttfamily \#include $<$Q\+Debug$>$}\\* {\ttfamily \#include \char`\"{}filemanip.\+h\char`\"{}}\\* {\ttfamily \#include $<$Q\+String$>$}\\* {\ttfamily \#include $<$Q\+String\+List$>$}\\* {\ttfamily \#include $<$iostream$>$}\\* \subsection*{Functions} \begin{DoxyCompactItemize} \item string \hyperlink{movie_8h_aa2ca3be9f1d904e9f177faa425745236}{get\+Movie\+By\+Name} (string, \hyperlink{classfilemanip}{filemanip} \&) \begin{DoxyCompactList}\small\item\em Finds the information of a movie given its name. \end{DoxyCompactList}\item string \hyperlink{movie_8h_aebd1da153f25f87661ac630b47737097}{get\+Movie\+By\+Position} (int, \hyperlink{classfilemanip}{filemanip} \&) \begin{DoxyCompactList}\small\item\em Finds a movie in position position of a file and returns the name of the movie. \end{DoxyCompactList}\item void \hyperlink{movie_8h_a39efa4469877528f52e365bba5d35c30}{show\+Movies} (\hyperlink{classfilemanip}{filemanip} \&, int=1, int=10) \begin{DoxyCompactList}\small\item\em Display the information of the movies in a file from line start to line end. \end{DoxyCompactList}\item void \hyperlink{movie_8h_a65da80af0fbc68d3cb7de763d2c944ea}{show\+Movies} (\hyperlink{classfilemanip}{filemanip} \&, string) \begin{DoxyCompactList}\small\item\em Display the information of the movies whose name contains a given keyword. \end{DoxyCompactList}\item void \hyperlink{movie_8h_af71e2fccff041af5f808e210a9cbb06f}{show\+Movie} (string) \begin{DoxyCompactList}\small\item\em Display the movie information of a $\vert$ separated line with movie info. Example line\+: Ninja Turtles\+: The Next Mutation, Vol. 1$\vert$\+Shout! Factory$\vert$$\vert$\+Out$\vert$2.0$\vert$4\+:3$\vert$19.93$\vert$\+N\+R$\vert$1997$\vert$. \end{DoxyCompactList}\item string \hyperlink{movie_8h_a5b13bb4e2035100dcf27abad21a2e862}{get\+Movie\+Name} (string) \begin{DoxyCompactList}\small\item\em Given a movie line from the file returns the movie name. \end{DoxyCompactList}\item string \hyperlink{movie_8h_af50291017de186a0a663e8418d65b7ef}{get\+Movie\+Rating} (string) \begin{DoxyCompactList}\small\item\em Given a movie line from the file returns the movie rating. \end{DoxyCompactList}\item string \hyperlink{movie_8h_ad378998f3ab769b47a1bbc4672496f45}{get\+Movie\+Year} (string) \begin{DoxyCompactList}\small\item\em Given a movie line from the file returns the movie release year. \end{DoxyCompactList}\item string \hyperlink{movie_8h_aaa2e1332e82b931cf45663e755cc2302}{get\+Movie\+Genre} (string) \begin{DoxyCompactList}\small\item\em Given a movie line from the file returns the movie genre. \end{DoxyCompactList}\item void \hyperlink{movie_8h_ac0080d980b2f73f9eaa089f8eddeba60}{get\+Movie\+Info} (string, string \&, string \&, string \&, string \&) \begin{DoxyCompactList}\small\item\em Given a movie line from the file returns by reference the movie name, rating, year, and genre. \end{DoxyCompactList}\item string \hyperlink{movie_8h_af2c27f6eccc9bc99e5b3fb5a543e3d20}{get\+Movie\+Studio} (string) \begin{DoxyCompactList}\small\item\em Given a movie line from the file returns the movie studio. Answer to (Exercise 3, question 1) \end{DoxyCompactList}\item void \hyperlink{movie_8h_a41d3c7f88313d320640b5fbca273b757}{get\+Movie\+Info} (string, string \&, string \&, string \&, string \&, string \&) \begin{DoxyCompactList}\small\item\em Given a movie line from the file returns by reference the movie name, rating, year, genre, and studio. Answer to (Exercise 3, question 2) \end{DoxyCompactList}\item void \hyperlink{movie_8h_abee243a60adc5d86608a02572cc98e5e}{show\+Movie\+In\+Line} (string) \begin{DoxyCompactList}\small\item\em Display the movie information of a $\vert$ separated line with movie info. The info is displayed in one line identified by its fields. Answer to (Exercise 3, question 3) \end{DoxyCompactList}\item void \hyperlink{movie_8h_a88d10eeb7ba4c05fde974ef8602af4fe}{show\+Movies\+In\+Line} (\hyperlink{classfilemanip}{filemanip} \&, int=1, int=10) \begin{DoxyCompactList}\small\item\em Display the information of the movies in a file from line start to line end. The information is displayed in one line. Answer to (Exercise 3, question 4) \end{DoxyCompactList}\end{DoxyCompactItemize} \subsection{Function Documentation} \hypertarget{movie_8h_aa2ca3be9f1d904e9f177faa425745236}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+By\+Name@{get\+Movie\+By\+Name}} \index{get\+Movie\+By\+Name@{get\+Movie\+By\+Name}!movie.\+h@{movie.\+h}} \subsubsection[{get\+Movie\+By\+Name}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+By\+Name ( \begin{DoxyParamCaption} \item[{string}]{moviename, } \item[{{\bf filemanip} \&}]{file} \end{DoxyParamCaption} )}\label{movie_8h_aa2ca3be9f1d904e9f177faa425745236} Finds the information of a movie given its name. \begin{DoxyParams}{Parameters} {\em moviename} & The name of the movie \\ \hline {\em file} & A file pointer \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} One line with the information of the movie separated by $\vert$ (pipes) \end{DoxyReturn} \hypertarget{movie_8h_aebd1da153f25f87661ac630b47737097}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+By\+Position@{get\+Movie\+By\+Position}} \index{get\+Movie\+By\+Position@{get\+Movie\+By\+Position}!movie.\+h@{movie.\+h}} \subsubsection[{get\+Movie\+By\+Position}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+By\+Position ( \begin{DoxyParamCaption} \item[{int}]{position, } \item[{{\bf filemanip} \&}]{file} \end{DoxyParamCaption} )}\label{movie_8h_aebd1da153f25f87661ac630b47737097} Finds a movie in position position of a file and returns the name of the movie. \begin{DoxyParams}{Parameters} {\em position} & Position of the movie in the file \\ \hline {\em file} & A file pointer \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} The name of the movie \end{DoxyReturn} \hypertarget{movie_8h_aaa2e1332e82b931cf45663e755cc2302}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Genre@{get\+Movie\+Genre}} \index{get\+Movie\+Genre@{get\+Movie\+Genre}!movie.\+h@{movie.\+h}} \subsubsection[{get\+Movie\+Genre}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Genre ( \begin{DoxyParamCaption} \item[{string}]{movieinfo} \end{DoxyParamCaption} )}\label{movie_8h_aaa2e1332e82b931cf45663e755cc2302} Given a movie line from the file returns the movie genre. \begin{DoxyParams}{Parameters} {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} The movie genre. \end{DoxyReturn} \hypertarget{movie_8h_ac0080d980b2f73f9eaa089f8eddeba60}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Info@{get\+Movie\+Info}} \index{get\+Movie\+Info@{get\+Movie\+Info}!movie.\+h@{movie.\+h}} \subsubsection[{get\+Movie\+Info}]{\setlength{\rightskip}{0pt plus 5cm}void get\+Movie\+Info ( \begin{DoxyParamCaption} \item[{string}]{movieinfo, } \item[{string \&}]{name, } \item[{string \&}]{rating, } \item[{string \&}]{year, } \item[{string \&}]{genre} \end{DoxyParamCaption} )}\label{movie_8h_ac0080d980b2f73f9eaa089f8eddeba60} Given a movie line from the file returns by reference the movie name, rating, year, and genre. \begin{DoxyParams}{Parameters} {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\ \hline \end{DoxyParams} \hypertarget{movie_8h_a41d3c7f88313d320640b5fbca273b757}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Info@{get\+Movie\+Info}} \index{get\+Movie\+Info@{get\+Movie\+Info}!movie.\+h@{movie.\+h}} \subsubsection[{get\+Movie\+Info}]{\setlength{\rightskip}{0pt plus 5cm}void get\+Movie\+Info ( \begin{DoxyParamCaption} \item[{string}]{movieinfo, } \item[{string \&}]{name, } \item[{string \&}]{rating, } \item[{string \&}]{year, } \item[{string \&}]{genre, } \item[{string \&}]{studio} \end{DoxyParamCaption} )}\label{movie_8h_a41d3c7f88313d320640b5fbca273b757} Given a movie line from the file returns by reference the movie name, rating, year, genre, and studio. Answer to (Exercise 3, question 2) \begin{DoxyParams}{Parameters} {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\ \hline \end{DoxyParams} \hypertarget{movie_8h_a5b13bb4e2035100dcf27abad21a2e862}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Name@{get\+Movie\+Name}} \index{get\+Movie\+Name@{get\+Movie\+Name}!movie.\+h@{movie.\+h}} \subsubsection[{get\+Movie\+Name}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Name ( \begin{DoxyParamCaption} \item[{string}]{movieinfo} \end{DoxyParamCaption} )}\label{movie_8h_a5b13bb4e2035100dcf27abad21a2e862} Given a movie line from the file returns the movie name. \begin{DoxyParams}{Parameters} {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} Movie name \end{DoxyReturn} \hypertarget{movie_8h_af50291017de186a0a663e8418d65b7ef}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Rating@{get\+Movie\+Rating}} \index{get\+Movie\+Rating@{get\+Movie\+Rating}!movie.\+h@{movie.\+h}} \subsubsection[{get\+Movie\+Rating}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Rating ( \begin{DoxyParamCaption} \item[{string}]{movieinfo} \end{DoxyParamCaption} )}\label{movie_8h_af50291017de186a0a663e8418d65b7ef} Given a movie line from the file returns the movie rating. \begin{DoxyParams}{Parameters} {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} The movie rating \end{DoxyReturn} \hypertarget{movie_8h_af2c27f6eccc9bc99e5b3fb5a543e3d20}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Studio@{get\+Movie\+Studio}} \index{get\+Movie\+Studio@{get\+Movie\+Studio}!movie.\+h@{movie.\+h}} \subsubsection[{get\+Movie\+Studio}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Studio ( \begin{DoxyParamCaption} \item[{string}]{movieinfo} \end{DoxyParamCaption} )}\label{movie_8h_af2c27f6eccc9bc99e5b3fb5a543e3d20} Given a movie line from the file returns the movie studio. Answer to (Exercise 3, question 1) \begin{DoxyParams}{Parameters} {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} The movie studio. \end{DoxyReturn} \hypertarget{movie_8h_ad378998f3ab769b47a1bbc4672496f45}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Year@{get\+Movie\+Year}} \index{get\+Movie\+Year@{get\+Movie\+Year}!movie.\+h@{movie.\+h}} \subsubsection[{get\+Movie\+Year}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Year ( \begin{DoxyParamCaption} \item[{string}]{movieinfo} \end{DoxyParamCaption} )}\label{movie_8h_ad378998f3ab769b47a1bbc4672496f45} Given a movie line from the file returns the movie release year. \begin{DoxyParams}{Parameters} {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} The movie release year. \end{DoxyReturn} \hypertarget{movie_8h_af71e2fccff041af5f808e210a9cbb06f}{}\index{movie.\+h@{movie.\+h}!show\+Movie@{show\+Movie}} \index{show\+Movie@{show\+Movie}!movie.\+h@{movie.\+h}} \subsubsection[{show\+Movie}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movie ( \begin{DoxyParamCaption} \item[{string}]{movieinfo} \end{DoxyParamCaption} )}\label{movie_8h_af71e2fccff041af5f808e210a9cbb06f} Display the movie information of a $\vert$ separated line with movie info. Example line\+: Ninja Turtles\+: The Next Mutation, Vol. 1$\vert$\+Shout! Factory$\vert$$\vert$\+Out$\vert$2.0$\vert$4\+:3$\vert$19.93$\vert$\+N\+R$\vert$1997$\vert$. \begin{DoxyParams}{Parameters} {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\ \hline \end{DoxyParams} \hypertarget{movie_8h_abee243a60adc5d86608a02572cc98e5e}{}\index{movie.\+h@{movie.\+h}!show\+Movie\+In\+Line@{show\+Movie\+In\+Line}} \index{show\+Movie\+In\+Line@{show\+Movie\+In\+Line}!movie.\+h@{movie.\+h}} \subsubsection[{show\+Movie\+In\+Line}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movie\+In\+Line ( \begin{DoxyParamCaption} \item[{string}]{movieinfo} \end{DoxyParamCaption} )}\label{movie_8h_abee243a60adc5d86608a02572cc98e5e} Display the movie information of a $\vert$ separated line with movie info. The info is displayed in one line identified by its fields. Answer to (Exercise 3, question 3) \begin{DoxyParams}{Parameters} {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\ \hline \end{DoxyParams} \hypertarget{movie_8h_a39efa4469877528f52e365bba5d35c30}{}\index{movie.\+h@{movie.\+h}!show\+Movies@{show\+Movies}} \index{show\+Movies@{show\+Movies}!movie.\+h@{movie.\+h}} \subsubsection[{show\+Movies}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movies ( \begin{DoxyParamCaption} \item[{{\bf filemanip} \&}]{file, } \item[{int}]{start, } \item[{int}]{end} \end{DoxyParamCaption} )}\label{movie_8h_a39efa4469877528f52e365bba5d35c30} Display the information of the movies in a file from line start to line end. \begin{DoxyParams}{Parameters} {\em file} & Pointer to a file. \\ \hline {\em start} & Line in the file to start showing movie info. \\ \hline {\em end} & Line in the file to stop showing movie information. \\ \hline \end{DoxyParams} \hypertarget{movie_8h_a65da80af0fbc68d3cb7de763d2c944ea}{}\index{movie.\+h@{movie.\+h}!show\+Movies@{show\+Movies}} \index{show\+Movies@{show\+Movies}!movie.\+h@{movie.\+h}} \subsubsection[{show\+Movies}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movies ( \begin{DoxyParamCaption} \item[{{\bf filemanip} \&}]{file, } \item[{string}]{keyword} \end{DoxyParamCaption} )}\label{movie_8h_a65da80af0fbc68d3cb7de763d2c944ea} Display the information of the movies whose name contains a given keyword. \begin{DoxyParams}{Parameters} {\em file} & Pointer to a file. \\ \hline {\em keyword} & Keyword to search in the name of the movies. \\ \hline \end{DoxyParams} \hypertarget{movie_8h_a88d10eeb7ba4c05fde974ef8602af4fe}{}\index{movie.\+h@{movie.\+h}!show\+Movies\+In\+Line@{show\+Movies\+In\+Line}} \index{show\+Movies\+In\+Line@{show\+Movies\+In\+Line}!movie.\+h@{movie.\+h}} \subsubsection[{show\+Movies\+In\+Line}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movies\+In\+Line ( \begin{DoxyParamCaption} \item[{{\bf filemanip} \&}]{file, } \item[{int}]{start, } \item[{int}]{end} \end{DoxyParamCaption} )}\label{movie_8h_a88d10eeb7ba4c05fde974ef8602af4fe} Display the information of the movies in a file from line start to line end. The information is displayed in one line. Answer to (Exercise 3, question 4) \begin{DoxyParams}{Parameters} {\em file} & Pointer to a file. \\ \hline {\em start} & Line in the file to start showing movie info. \\ \hline {\em end} & Line in the file to stop showing movie information. \\ \hline \end{DoxyParams}