\hypertarget{movie_8cpp}{}\section{movie.\+cpp File Reference}
\label{movie_8cpp}\index{movie.\+cpp@{movie.\+cpp}}
{\ttfamily \#include \char`\"{}movie.\+h\char`\"{}}\\*
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
string \hyperlink{movie_8cpp_a5cd9879ec2e8c19fb7bea1b7eff92306}{get\+Movie\+By\+Position} (int position, \hyperlink{classfilemanip}{filemanip} \&file)
\begin{DoxyCompactList}\small\item\em Finds a movie in position position of a file and returns the name of the movie. \end{DoxyCompactList}\item 
string \hyperlink{movie_8cpp_a14872b961b612dd2ed0e848e205432ab}{get\+Movie\+By\+Name} (string moviename, \hyperlink{classfilemanip}{filemanip} \&file)
\begin{DoxyCompactList}\small\item\em Finds the information of a movie given its name. \end{DoxyCompactList}\item 
void \hyperlink{movie_8cpp_ad7046e791da7846c172e7277aaf94d14}{show\+Movie} (string movieinfo)
\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 
void \hyperlink{movie_8cpp_a1ac8811db306ce6205ddc638ce02963e}{show\+Movies} (\hyperlink{classfilemanip}{filemanip} \&file, int start, int end)
\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_8cpp_a2200ec80d18eede5241b99afcffb509a}{show\+Movies} (\hyperlink{classfilemanip}{filemanip} \&file, string keyword)
\begin{DoxyCompactList}\small\item\em Display the information of the movies whose name contains a given keyword. \end{DoxyCompactList}\item 
string \hyperlink{movie_8cpp_aa89f412c80723cef362fdb6ac54c3a46}{get\+Movie\+Name} (string movieinfo)
\begin{DoxyCompactList}\small\item\em Given a movie line from the file returns the movie name. \end{DoxyCompactList}\item 
string \hyperlink{movie_8cpp_a4d7282011b6c01bf329c55be741e491b}{get\+Movie\+Rating} (string movieinfo)
\begin{DoxyCompactList}\small\item\em Given a movie line from the file returns the movie rating. \end{DoxyCompactList}\item 
string \hyperlink{movie_8cpp_a658aabb68db11d7b29c54c777bd68207}{get\+Movie\+Year} (string movieinfo)
\begin{DoxyCompactList}\small\item\em Given a movie line from the file returns the movie release year. \end{DoxyCompactList}\item 
string \hyperlink{movie_8cpp_a587b63fb2f1c6ff6aa0bbfd12ebbdb46}{get\+Movie\+Genre} (string movieinfo)
\begin{DoxyCompactList}\small\item\em Given a movie line from the file returns the movie genre. \end{DoxyCompactList}\item 
void \hyperlink{movie_8cpp_a9057c8190a50e3b94cb358ee7f9f7efb}{get\+Movie\+Info} (string movieinfo, string \&name, string \&rating, string \&year, string \&genre)
\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_8cpp_a2c66ce60f7a568afd7a8c2394700e3b1}{get\+Movie\+Studio} (string movieinfo)
\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_8cpp_a724308b84548b6b3f247022f07720dc5}{get\+Movie\+Info} (string movieinfo, string \&name, string \&rating, string \&year, string \&genre, string \&studio)
\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_8cpp_ae2bfae6f7267aa64eaa2b9a1900879e3}{show\+Movie\+In\+Line} (string movieinfo)
\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_8cpp_ac3694a5a7bee33f0085a41fd784a366b}{show\+Movies\+In\+Line} (\hyperlink{classfilemanip}{filemanip} \&file, int start, int end)
\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_8cpp_a14872b961b612dd2ed0e848e205432ab}{}\index{movie.\+cpp@{movie.\+cpp}!get\+Movie\+By\+Name@{get\+Movie\+By\+Name}}
\index{get\+Movie\+By\+Name@{get\+Movie\+By\+Name}!movie.\+cpp@{movie.\+cpp}}
\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_8cpp_a14872b961b612dd2ed0e848e205432ab}


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_8cpp_a5cd9879ec2e8c19fb7bea1b7eff92306}{}\index{movie.\+cpp@{movie.\+cpp}!get\+Movie\+By\+Position@{get\+Movie\+By\+Position}}
\index{get\+Movie\+By\+Position@{get\+Movie\+By\+Position}!movie.\+cpp@{movie.\+cpp}}
\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_8cpp_a5cd9879ec2e8c19fb7bea1b7eff92306}


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_8cpp_a587b63fb2f1c6ff6aa0bbfd12ebbdb46}{}\index{movie.\+cpp@{movie.\+cpp}!get\+Movie\+Genre@{get\+Movie\+Genre}}
\index{get\+Movie\+Genre@{get\+Movie\+Genre}!movie.\+cpp@{movie.\+cpp}}
\subsubsection[{get\+Movie\+Genre}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Genre (
\begin{DoxyParamCaption}
\item[{string}]{movieinfo}
\end{DoxyParamCaption}
)}\label{movie_8cpp_a587b63fb2f1c6ff6aa0bbfd12ebbdb46}


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_8cpp_a9057c8190a50e3b94cb358ee7f9f7efb}{}\index{movie.\+cpp@{movie.\+cpp}!get\+Movie\+Info@{get\+Movie\+Info}}
\index{get\+Movie\+Info@{get\+Movie\+Info}!movie.\+cpp@{movie.\+cpp}}
\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_8cpp_a9057c8190a50e3b94cb358ee7f9f7efb}


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_8cpp_a724308b84548b6b3f247022f07720dc5}{}\index{movie.\+cpp@{movie.\+cpp}!get\+Movie\+Info@{get\+Movie\+Info}}
\index{get\+Movie\+Info@{get\+Movie\+Info}!movie.\+cpp@{movie.\+cpp}}
\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_8cpp_a724308b84548b6b3f247022f07720dc5}


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_8cpp_aa89f412c80723cef362fdb6ac54c3a46}{}\index{movie.\+cpp@{movie.\+cpp}!get\+Movie\+Name@{get\+Movie\+Name}}
\index{get\+Movie\+Name@{get\+Movie\+Name}!movie.\+cpp@{movie.\+cpp}}
\subsubsection[{get\+Movie\+Name}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Name (
\begin{DoxyParamCaption}
\item[{string}]{movieinfo}
\end{DoxyParamCaption}
)}\label{movie_8cpp_aa89f412c80723cef362fdb6ac54c3a46}


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_8cpp_a4d7282011b6c01bf329c55be741e491b}{}\index{movie.\+cpp@{movie.\+cpp}!get\+Movie\+Rating@{get\+Movie\+Rating}}
\index{get\+Movie\+Rating@{get\+Movie\+Rating}!movie.\+cpp@{movie.\+cpp}}
\subsubsection[{get\+Movie\+Rating}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Rating (
\begin{DoxyParamCaption}
\item[{string}]{movieinfo}
\end{DoxyParamCaption}
)}\label{movie_8cpp_a4d7282011b6c01bf329c55be741e491b}


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_8cpp_a2c66ce60f7a568afd7a8c2394700e3b1}{}\index{movie.\+cpp@{movie.\+cpp}!get\+Movie\+Studio@{get\+Movie\+Studio}}
\index{get\+Movie\+Studio@{get\+Movie\+Studio}!movie.\+cpp@{movie.\+cpp}}
\subsubsection[{get\+Movie\+Studio}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Studio (
\begin{DoxyParamCaption}
\item[{string}]{movieinfo}
\end{DoxyParamCaption}
)}\label{movie_8cpp_a2c66ce60f7a568afd7a8c2394700e3b1}


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_8cpp_a658aabb68db11d7b29c54c777bd68207}{}\index{movie.\+cpp@{movie.\+cpp}!get\+Movie\+Year@{get\+Movie\+Year}}
\index{get\+Movie\+Year@{get\+Movie\+Year}!movie.\+cpp@{movie.\+cpp}}
\subsubsection[{get\+Movie\+Year}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Year (
\begin{DoxyParamCaption}
\item[{string}]{movieinfo}
\end{DoxyParamCaption}
)}\label{movie_8cpp_a658aabb68db11d7b29c54c777bd68207}


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_8cpp_ad7046e791da7846c172e7277aaf94d14}{}\index{movie.\+cpp@{movie.\+cpp}!show\+Movie@{show\+Movie}}
\index{show\+Movie@{show\+Movie}!movie.\+cpp@{movie.\+cpp}}
\subsubsection[{show\+Movie}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movie (
\begin{DoxyParamCaption}
\item[{string}]{movieinfo}
\end{DoxyParamCaption}
)}\label{movie_8cpp_ad7046e791da7846c172e7277aaf94d14}


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_8cpp_ae2bfae6f7267aa64eaa2b9a1900879e3}{}\index{movie.\+cpp@{movie.\+cpp}!show\+Movie\+In\+Line@{show\+Movie\+In\+Line}}
\index{show\+Movie\+In\+Line@{show\+Movie\+In\+Line}!movie.\+cpp@{movie.\+cpp}}
\subsubsection[{show\+Movie\+In\+Line}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movie\+In\+Line (
\begin{DoxyParamCaption}
\item[{string}]{movieinfo}
\end{DoxyParamCaption}
)}\label{movie_8cpp_ae2bfae6f7267aa64eaa2b9a1900879e3}


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_8cpp_a1ac8811db306ce6205ddc638ce02963e}{}\index{movie.\+cpp@{movie.\+cpp}!show\+Movies@{show\+Movies}}
\index{show\+Movies@{show\+Movies}!movie.\+cpp@{movie.\+cpp}}
\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_8cpp_a1ac8811db306ce6205ddc638ce02963e}


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_8cpp_a2200ec80d18eede5241b99afcffb509a}{}\index{movie.\+cpp@{movie.\+cpp}!show\+Movies@{show\+Movies}}
\index{show\+Movies@{show\+Movies}!movie.\+cpp@{movie.\+cpp}}
\subsubsection[{show\+Movies}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movies (
\begin{DoxyParamCaption}
\item[{{\bf filemanip} \&}]{file, }
\item[{string}]{keyword}
\end{DoxyParamCaption}
)}\label{movie_8cpp_a2200ec80d18eede5241b99afcffb509a}


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_8cpp_ac3694a5a7bee33f0085a41fd784a366b}{}\index{movie.\+cpp@{movie.\+cpp}!show\+Movies\+In\+Line@{show\+Movies\+In\+Line}}
\index{show\+Movies\+In\+Line@{show\+Movies\+In\+Line}!movie.\+cpp@{movie.\+cpp}}
\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_8cpp_ac3694a5a7bee33f0085a41fd784a366b}


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}
