Açıklama Yok

movie_8h.tex 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. \hypertarget{movie_8h}{}\section{movie.\+h File Reference}
  2. \label{movie_8h}\index{movie.\+h@{movie.\+h}}
  3. {\ttfamily \#include $<$string$>$}\\*
  4. {\ttfamily \#include $<$Q\+Debug$>$}\\*
  5. {\ttfamily \#include \char`\"{}filemanip.\+h\char`\"{}}\\*
  6. {\ttfamily \#include $<$Q\+String$>$}\\*
  7. {\ttfamily \#include $<$Q\+String\+List$>$}\\*
  8. {\ttfamily \#include $<$iostream$>$}\\*
  9. \subsection*{Functions}
  10. \begin{DoxyCompactItemize}
  11. \item
  12. string \hyperlink{movie_8h_aa2ca3be9f1d904e9f177faa425745236}{get\+Movie\+By\+Name} (string, \hyperlink{classfilemanip}{filemanip} \&)
  13. \begin{DoxyCompactList}\small\item\em Finds the information of a movie given its name. \end{DoxyCompactList}\item
  14. string \hyperlink{movie_8h_aebd1da153f25f87661ac630b47737097}{get\+Movie\+By\+Position} (int, \hyperlink{classfilemanip}{filemanip} \&)
  15. \begin{DoxyCompactList}\small\item\em Finds a movie in position position of a file and returns the name of the movie. \end{DoxyCompactList}\item
  16. void \hyperlink{movie_8h_a39efa4469877528f52e365bba5d35c30}{show\+Movies} (\hyperlink{classfilemanip}{filemanip} \&, int=1, int=10)
  17. \begin{DoxyCompactList}\small\item\em Display the information of the movies in a file from line start to line end. \end{DoxyCompactList}\item
  18. void \hyperlink{movie_8h_a65da80af0fbc68d3cb7de763d2c944ea}{show\+Movies} (\hyperlink{classfilemanip}{filemanip} \&, string)
  19. \begin{DoxyCompactList}\small\item\em Display the information of the movies whose name contains a given keyword. \end{DoxyCompactList}\item
  20. void \hyperlink{movie_8h_af71e2fccff041af5f808e210a9cbb06f}{show\+Movie} (string)
  21. \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
  22. string \hyperlink{movie_8h_a5b13bb4e2035100dcf27abad21a2e862}{get\+Movie\+Name} (string)
  23. \begin{DoxyCompactList}\small\item\em Given a movie line from the file returns the movie name. \end{DoxyCompactList}\item
  24. string \hyperlink{movie_8h_af50291017de186a0a663e8418d65b7ef}{get\+Movie\+Rating} (string)
  25. \begin{DoxyCompactList}\small\item\em Given a movie line from the file returns the movie rating. \end{DoxyCompactList}\item
  26. string \hyperlink{movie_8h_ad378998f3ab769b47a1bbc4672496f45}{get\+Movie\+Year} (string)
  27. \begin{DoxyCompactList}\small\item\em Given a movie line from the file returns the movie release year. \end{DoxyCompactList}\item
  28. string \hyperlink{movie_8h_aaa2e1332e82b931cf45663e755cc2302}{get\+Movie\+Genre} (string)
  29. \begin{DoxyCompactList}\small\item\em Given a movie line from the file returns the movie genre. \end{DoxyCompactList}\item
  30. void \hyperlink{movie_8h_ac0080d980b2f73f9eaa089f8eddeba60}{get\+Movie\+Info} (string, string \&, string \&, string \&, string \&)
  31. \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
  32. string \hyperlink{movie_8h_af2c27f6eccc9bc99e5b3fb5a543e3d20}{get\+Movie\+Studio} (string)
  33. \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
  34. void \hyperlink{movie_8h_a41d3c7f88313d320640b5fbca273b757}{get\+Movie\+Info} (string, string \&, string \&, string \&, string \&, string \&)
  35. \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
  36. void \hyperlink{movie_8h_abee243a60adc5d86608a02572cc98e5e}{show\+Movie\+In\+Line} (string)
  37. \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
  38. void \hyperlink{movie_8h_a88d10eeb7ba4c05fde974ef8602af4fe}{show\+Movies\+In\+Line} (\hyperlink{classfilemanip}{filemanip} \&, int=1, int=10)
  39. \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}
  40. \subsection{Function Documentation}
  41. \hypertarget{movie_8h_aa2ca3be9f1d904e9f177faa425745236}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+By\+Name@{get\+Movie\+By\+Name}}
  42. \index{get\+Movie\+By\+Name@{get\+Movie\+By\+Name}!movie.\+h@{movie.\+h}}
  43. \subsubsection[{get\+Movie\+By\+Name}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+By\+Name (
  44. \begin{DoxyParamCaption}
  45. \item[{string}]{moviename, }
  46. \item[{{\bf filemanip} \&}]{file}
  47. \end{DoxyParamCaption}
  48. )}\label{movie_8h_aa2ca3be9f1d904e9f177faa425745236}
  49. Finds the information of a movie given its name.
  50. \begin{DoxyParams}{Parameters}
  51. {\em moviename} & The name of the movie \\
  52. \hline
  53. {\em file} & A file pointer \\
  54. \hline
  55. \end{DoxyParams}
  56. \begin{DoxyReturn}{Returns}
  57. One line with the information of the movie separated by $\vert$ (pipes)
  58. \end{DoxyReturn}
  59. \hypertarget{movie_8h_aebd1da153f25f87661ac630b47737097}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+By\+Position@{get\+Movie\+By\+Position}}
  60. \index{get\+Movie\+By\+Position@{get\+Movie\+By\+Position}!movie.\+h@{movie.\+h}}
  61. \subsubsection[{get\+Movie\+By\+Position}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+By\+Position (
  62. \begin{DoxyParamCaption}
  63. \item[{int}]{position, }
  64. \item[{{\bf filemanip} \&}]{file}
  65. \end{DoxyParamCaption}
  66. )}\label{movie_8h_aebd1da153f25f87661ac630b47737097}
  67. Finds a movie in position position of a file and returns the name of the movie.
  68. \begin{DoxyParams}{Parameters}
  69. {\em position} & Position of the movie in the file \\
  70. \hline
  71. {\em file} & A file pointer \\
  72. \hline
  73. \end{DoxyParams}
  74. \begin{DoxyReturn}{Returns}
  75. The name of the movie
  76. \end{DoxyReturn}
  77. \hypertarget{movie_8h_aaa2e1332e82b931cf45663e755cc2302}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Genre@{get\+Movie\+Genre}}
  78. \index{get\+Movie\+Genre@{get\+Movie\+Genre}!movie.\+h@{movie.\+h}}
  79. \subsubsection[{get\+Movie\+Genre}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Genre (
  80. \begin{DoxyParamCaption}
  81. \item[{string}]{movieinfo}
  82. \end{DoxyParamCaption}
  83. )}\label{movie_8h_aaa2e1332e82b931cf45663e755cc2302}
  84. Given a movie line from the file returns the movie genre.
  85. \begin{DoxyParams}{Parameters}
  86. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  87. \hline
  88. \end{DoxyParams}
  89. \begin{DoxyReturn}{Returns}
  90. The movie genre.
  91. \end{DoxyReturn}
  92. \hypertarget{movie_8h_ac0080d980b2f73f9eaa089f8eddeba60}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Info@{get\+Movie\+Info}}
  93. \index{get\+Movie\+Info@{get\+Movie\+Info}!movie.\+h@{movie.\+h}}
  94. \subsubsection[{get\+Movie\+Info}]{\setlength{\rightskip}{0pt plus 5cm}void get\+Movie\+Info (
  95. \begin{DoxyParamCaption}
  96. \item[{string}]{movieinfo, }
  97. \item[{string \&}]{name, }
  98. \item[{string \&}]{rating, }
  99. \item[{string \&}]{year, }
  100. \item[{string \&}]{genre}
  101. \end{DoxyParamCaption}
  102. )}\label{movie_8h_ac0080d980b2f73f9eaa089f8eddeba60}
  103. Given a movie line from the file returns by reference the movie name, rating, year, and genre.
  104. \begin{DoxyParams}{Parameters}
  105. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  106. \hline
  107. \end{DoxyParams}
  108. \hypertarget{movie_8h_a41d3c7f88313d320640b5fbca273b757}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Info@{get\+Movie\+Info}}
  109. \index{get\+Movie\+Info@{get\+Movie\+Info}!movie.\+h@{movie.\+h}}
  110. \subsubsection[{get\+Movie\+Info}]{\setlength{\rightskip}{0pt plus 5cm}void get\+Movie\+Info (
  111. \begin{DoxyParamCaption}
  112. \item[{string}]{movieinfo, }
  113. \item[{string \&}]{name, }
  114. \item[{string \&}]{rating, }
  115. \item[{string \&}]{year, }
  116. \item[{string \&}]{genre, }
  117. \item[{string \&}]{studio}
  118. \end{DoxyParamCaption}
  119. )}\label{movie_8h_a41d3c7f88313d320640b5fbca273b757}
  120. Given a movie line from the file returns by reference the movie name, rating, year, genre, and studio. Answer to (Exercise 3, question 2)
  121. \begin{DoxyParams}{Parameters}
  122. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  123. \hline
  124. \end{DoxyParams}
  125. \hypertarget{movie_8h_a5b13bb4e2035100dcf27abad21a2e862}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Name@{get\+Movie\+Name}}
  126. \index{get\+Movie\+Name@{get\+Movie\+Name}!movie.\+h@{movie.\+h}}
  127. \subsubsection[{get\+Movie\+Name}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Name (
  128. \begin{DoxyParamCaption}
  129. \item[{string}]{movieinfo}
  130. \end{DoxyParamCaption}
  131. )}\label{movie_8h_a5b13bb4e2035100dcf27abad21a2e862}
  132. Given a movie line from the file returns the movie name.
  133. \begin{DoxyParams}{Parameters}
  134. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  135. \hline
  136. \end{DoxyParams}
  137. \begin{DoxyReturn}{Returns}
  138. Movie name
  139. \end{DoxyReturn}
  140. \hypertarget{movie_8h_af50291017de186a0a663e8418d65b7ef}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Rating@{get\+Movie\+Rating}}
  141. \index{get\+Movie\+Rating@{get\+Movie\+Rating}!movie.\+h@{movie.\+h}}
  142. \subsubsection[{get\+Movie\+Rating}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Rating (
  143. \begin{DoxyParamCaption}
  144. \item[{string}]{movieinfo}
  145. \end{DoxyParamCaption}
  146. )}\label{movie_8h_af50291017de186a0a663e8418d65b7ef}
  147. Given a movie line from the file returns the movie rating.
  148. \begin{DoxyParams}{Parameters}
  149. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  150. \hline
  151. \end{DoxyParams}
  152. \begin{DoxyReturn}{Returns}
  153. The movie rating
  154. \end{DoxyReturn}
  155. \hypertarget{movie_8h_af2c27f6eccc9bc99e5b3fb5a543e3d20}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Studio@{get\+Movie\+Studio}}
  156. \index{get\+Movie\+Studio@{get\+Movie\+Studio}!movie.\+h@{movie.\+h}}
  157. \subsubsection[{get\+Movie\+Studio}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Studio (
  158. \begin{DoxyParamCaption}
  159. \item[{string}]{movieinfo}
  160. \end{DoxyParamCaption}
  161. )}\label{movie_8h_af2c27f6eccc9bc99e5b3fb5a543e3d20}
  162. Given a movie line from the file returns the movie studio. Answer to (Exercise 3, question 1)
  163. \begin{DoxyParams}{Parameters}
  164. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  165. \hline
  166. \end{DoxyParams}
  167. \begin{DoxyReturn}{Returns}
  168. The movie studio.
  169. \end{DoxyReturn}
  170. \hypertarget{movie_8h_ad378998f3ab769b47a1bbc4672496f45}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Year@{get\+Movie\+Year}}
  171. \index{get\+Movie\+Year@{get\+Movie\+Year}!movie.\+h@{movie.\+h}}
  172. \subsubsection[{get\+Movie\+Year}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Year (
  173. \begin{DoxyParamCaption}
  174. \item[{string}]{movieinfo}
  175. \end{DoxyParamCaption}
  176. )}\label{movie_8h_ad378998f3ab769b47a1bbc4672496f45}
  177. Given a movie line from the file returns the movie release year.
  178. \begin{DoxyParams}{Parameters}
  179. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  180. \hline
  181. \end{DoxyParams}
  182. \begin{DoxyReturn}{Returns}
  183. The movie release year.
  184. \end{DoxyReturn}
  185. \hypertarget{movie_8h_af71e2fccff041af5f808e210a9cbb06f}{}\index{movie.\+h@{movie.\+h}!show\+Movie@{show\+Movie}}
  186. \index{show\+Movie@{show\+Movie}!movie.\+h@{movie.\+h}}
  187. \subsubsection[{show\+Movie}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movie (
  188. \begin{DoxyParamCaption}
  189. \item[{string}]{movieinfo}
  190. \end{DoxyParamCaption}
  191. )}\label{movie_8h_af71e2fccff041af5f808e210a9cbb06f}
  192. 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$.
  193. \begin{DoxyParams}{Parameters}
  194. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  195. \hline
  196. \end{DoxyParams}
  197. \hypertarget{movie_8h_abee243a60adc5d86608a02572cc98e5e}{}\index{movie.\+h@{movie.\+h}!show\+Movie\+In\+Line@{show\+Movie\+In\+Line}}
  198. \index{show\+Movie\+In\+Line@{show\+Movie\+In\+Line}!movie.\+h@{movie.\+h}}
  199. \subsubsection[{show\+Movie\+In\+Line}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movie\+In\+Line (
  200. \begin{DoxyParamCaption}
  201. \item[{string}]{movieinfo}
  202. \end{DoxyParamCaption}
  203. )}\label{movie_8h_abee243a60adc5d86608a02572cc98e5e}
  204. 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)
  205. \begin{DoxyParams}{Parameters}
  206. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  207. \hline
  208. \end{DoxyParams}
  209. \hypertarget{movie_8h_a39efa4469877528f52e365bba5d35c30}{}\index{movie.\+h@{movie.\+h}!show\+Movies@{show\+Movies}}
  210. \index{show\+Movies@{show\+Movies}!movie.\+h@{movie.\+h}}
  211. \subsubsection[{show\+Movies}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movies (
  212. \begin{DoxyParamCaption}
  213. \item[{{\bf filemanip} \&}]{file, }
  214. \item[{int}]{start, }
  215. \item[{int}]{end}
  216. \end{DoxyParamCaption}
  217. )}\label{movie_8h_a39efa4469877528f52e365bba5d35c30}
  218. Display the information of the movies in a file from line start to line end.
  219. \begin{DoxyParams}{Parameters}
  220. {\em file} & Pointer to a file. \\
  221. \hline
  222. {\em start} & Line in the file to start showing movie info. \\
  223. \hline
  224. {\em end} & Line in the file to stop showing movie information. \\
  225. \hline
  226. \end{DoxyParams}
  227. \hypertarget{movie_8h_a65da80af0fbc68d3cb7de763d2c944ea}{}\index{movie.\+h@{movie.\+h}!show\+Movies@{show\+Movies}}
  228. \index{show\+Movies@{show\+Movies}!movie.\+h@{movie.\+h}}
  229. \subsubsection[{show\+Movies}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movies (
  230. \begin{DoxyParamCaption}
  231. \item[{{\bf filemanip} \&}]{file, }
  232. \item[{string}]{keyword}
  233. \end{DoxyParamCaption}
  234. )}\label{movie_8h_a65da80af0fbc68d3cb7de763d2c944ea}
  235. Display the information of the movies whose name contains a given keyword.
  236. \begin{DoxyParams}{Parameters}
  237. {\em file} & Pointer to a file. \\
  238. \hline
  239. {\em keyword} & Keyword to search in the name of the movies. \\
  240. \hline
  241. \end{DoxyParams}
  242. \hypertarget{movie_8h_a88d10eeb7ba4c05fde974ef8602af4fe}{}\index{movie.\+h@{movie.\+h}!show\+Movies\+In\+Line@{show\+Movies\+In\+Line}}
  243. \index{show\+Movies\+In\+Line@{show\+Movies\+In\+Line}!movie.\+h@{movie.\+h}}
  244. \subsubsection[{show\+Movies\+In\+Line}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movies\+In\+Line (
  245. \begin{DoxyParamCaption}
  246. \item[{{\bf filemanip} \&}]{file, }
  247. \item[{int}]{start, }
  248. \item[{int}]{end}
  249. \end{DoxyParamCaption}
  250. )}\label{movie_8h_a88d10eeb7ba4c05fde974ef8602af4fe}
  251. 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)
  252. \begin{DoxyParams}{Parameters}
  253. {\em file} & Pointer to a file. \\
  254. \hline
  255. {\em start} & Line in the file to start showing movie info. \\
  256. \hline
  257. {\em end} & Line in the file to stop showing movie information. \\
  258. \hline
  259. \end{DoxyParams}