暂无描述

movie_8h.tex 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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_a2200ec80d18eede5241b99afcffb509a}{show\+Movies} (\hyperlink{classfilemanip}{filemanip} \&file, string keyword)
  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}\end{DoxyCompactItemize}
  32. \subsection{Function Documentation}
  33. \hypertarget{movie_8h_aa2ca3be9f1d904e9f177faa425745236}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+By\+Name@{get\+Movie\+By\+Name}}
  34. \index{get\+Movie\+By\+Name@{get\+Movie\+By\+Name}!movie.\+h@{movie.\+h}}
  35. \subsubsection[{get\+Movie\+By\+Name}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+By\+Name (
  36. \begin{DoxyParamCaption}
  37. \item[{string}]{moviename, }
  38. \item[{{\bf filemanip} \&}]{file}
  39. \end{DoxyParamCaption}
  40. )}\label{movie_8h_aa2ca3be9f1d904e9f177faa425745236}
  41. Finds the information of a movie given its name.
  42. \begin{DoxyParams}{Parameters}
  43. {\em moviename} & The name of the movie \\
  44. \hline
  45. {\em file} & A file pointer \\
  46. \hline
  47. \end{DoxyParams}
  48. \begin{DoxyReturn}{Returns}
  49. One line with the information of the movie separated by $\vert$ (pipes)
  50. \end{DoxyReturn}
  51. \hypertarget{movie_8h_aebd1da153f25f87661ac630b47737097}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+By\+Position@{get\+Movie\+By\+Position}}
  52. \index{get\+Movie\+By\+Position@{get\+Movie\+By\+Position}!movie.\+h@{movie.\+h}}
  53. \subsubsection[{get\+Movie\+By\+Position}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+By\+Position (
  54. \begin{DoxyParamCaption}
  55. \item[{int}]{position, }
  56. \item[{{\bf filemanip} \&}]{file}
  57. \end{DoxyParamCaption}
  58. )}\label{movie_8h_aebd1da153f25f87661ac630b47737097}
  59. Finds a movie in position position of a file and returns the name of the movie.
  60. \begin{DoxyParams}{Parameters}
  61. {\em position} & Position of the movie in the file \\
  62. \hline
  63. {\em file} & A file pointer \\
  64. \hline
  65. \end{DoxyParams}
  66. \begin{DoxyReturn}{Returns}
  67. The name of the movie
  68. \end{DoxyReturn}
  69. \hypertarget{movie_8h_aaa2e1332e82b931cf45663e755cc2302}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Genre@{get\+Movie\+Genre}}
  70. \index{get\+Movie\+Genre@{get\+Movie\+Genre}!movie.\+h@{movie.\+h}}
  71. \subsubsection[{get\+Movie\+Genre}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Genre (
  72. \begin{DoxyParamCaption}
  73. \item[{string}]{movieinfo}
  74. \end{DoxyParamCaption}
  75. )}\label{movie_8h_aaa2e1332e82b931cf45663e755cc2302}
  76. Given a movie line from the file returns the movie genre.
  77. \begin{DoxyParams}{Parameters}
  78. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  79. \hline
  80. \end{DoxyParams}
  81. \begin{DoxyReturn}{Returns}
  82. The movie genre.
  83. \end{DoxyReturn}
  84. \hypertarget{movie_8h_ac0080d980b2f73f9eaa089f8eddeba60}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Info@{get\+Movie\+Info}}
  85. \index{get\+Movie\+Info@{get\+Movie\+Info}!movie.\+h@{movie.\+h}}
  86. \subsubsection[{get\+Movie\+Info}]{\setlength{\rightskip}{0pt plus 5cm}void get\+Movie\+Info (
  87. \begin{DoxyParamCaption}
  88. \item[{string}]{, }
  89. \item[{string \&}]{, }
  90. \item[{string \&}]{, }
  91. \item[{string \&}]{, }
  92. \item[{string \&}]{}
  93. \end{DoxyParamCaption}
  94. )}\label{movie_8h_ac0080d980b2f73f9eaa089f8eddeba60}
  95. Given a movie line from the file returns by reference the movie name, rating, year, and genre.
  96. \begin{DoxyParams}{Parameters}
  97. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  98. \hline
  99. \end{DoxyParams}
  100. \hypertarget{movie_8h_a5b13bb4e2035100dcf27abad21a2e862}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Name@{get\+Movie\+Name}}
  101. \index{get\+Movie\+Name@{get\+Movie\+Name}!movie.\+h@{movie.\+h}}
  102. \subsubsection[{get\+Movie\+Name}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Name (
  103. \begin{DoxyParamCaption}
  104. \item[{string}]{movieinfo}
  105. \end{DoxyParamCaption}
  106. )}\label{movie_8h_a5b13bb4e2035100dcf27abad21a2e862}
  107. Given a movie line from the file returns the movie name.
  108. \begin{DoxyParams}{Parameters}
  109. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  110. \hline
  111. \end{DoxyParams}
  112. \begin{DoxyReturn}{Returns}
  113. Movie name
  114. \end{DoxyReturn}
  115. \hypertarget{movie_8h_af50291017de186a0a663e8418d65b7ef}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Rating@{get\+Movie\+Rating}}
  116. \index{get\+Movie\+Rating@{get\+Movie\+Rating}!movie.\+h@{movie.\+h}}
  117. \subsubsection[{get\+Movie\+Rating}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Rating (
  118. \begin{DoxyParamCaption}
  119. \item[{string}]{movieinfo}
  120. \end{DoxyParamCaption}
  121. )}\label{movie_8h_af50291017de186a0a663e8418d65b7ef}
  122. Given a movie line from the file returns the movie rating.
  123. \begin{DoxyParams}{Parameters}
  124. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  125. \hline
  126. \end{DoxyParams}
  127. \begin{DoxyReturn}{Returns}
  128. The movie rating
  129. \end{DoxyReturn}
  130. \hypertarget{movie_8h_ad378998f3ab769b47a1bbc4672496f45}{}\index{movie.\+h@{movie.\+h}!get\+Movie\+Year@{get\+Movie\+Year}}
  131. \index{get\+Movie\+Year@{get\+Movie\+Year}!movie.\+h@{movie.\+h}}
  132. \subsubsection[{get\+Movie\+Year}]{\setlength{\rightskip}{0pt plus 5cm}string get\+Movie\+Year (
  133. \begin{DoxyParamCaption}
  134. \item[{string}]{movieinfo}
  135. \end{DoxyParamCaption}
  136. )}\label{movie_8h_ad378998f3ab769b47a1bbc4672496f45}
  137. Given a movie line from the file returns the movie release year.
  138. \begin{DoxyParams}{Parameters}
  139. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  140. \hline
  141. \end{DoxyParams}
  142. \begin{DoxyReturn}{Returns}
  143. The movie release year.
  144. \end{DoxyReturn}
  145. \hypertarget{movie_8h_af71e2fccff041af5f808e210a9cbb06f}{}\index{movie.\+h@{movie.\+h}!show\+Movie@{show\+Movie}}
  146. \index{show\+Movie@{show\+Movie}!movie.\+h@{movie.\+h}}
  147. \subsubsection[{show\+Movie}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movie (
  148. \begin{DoxyParamCaption}
  149. \item[{string}]{movieinfo}
  150. \end{DoxyParamCaption}
  151. )}\label{movie_8h_af71e2fccff041af5f808e210a9cbb06f}
  152. 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$.
  153. \begin{DoxyParams}{Parameters}
  154. {\em movieinfo} & The information of the movie in one line separated by $\vert$ \\
  155. \hline
  156. \end{DoxyParams}
  157. \hypertarget{movie_8h_a39efa4469877528f52e365bba5d35c30}{}\index{movie.\+h@{movie.\+h}!show\+Movies@{show\+Movies}}
  158. \index{show\+Movies@{show\+Movies}!movie.\+h@{movie.\+h}}
  159. \subsubsection[{show\+Movies}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movies (
  160. \begin{DoxyParamCaption}
  161. \item[{{\bf filemanip} \&}]{file, }
  162. \item[{int}]{start, }
  163. \item[{int}]{end}
  164. \end{DoxyParamCaption}
  165. )}\label{movie_8h_a39efa4469877528f52e365bba5d35c30}
  166. Display the information of the movies in a file from line start to line end.
  167. \begin{DoxyParams}{Parameters}
  168. {\em file} & Pointer to a file. \\
  169. \hline
  170. {\em start} & Line in the file to start showing movie info. \\
  171. \hline
  172. {\em end} & Line in the file to stop showing movie information. \\
  173. \hline
  174. \end{DoxyParams}
  175. \hypertarget{movie_8h_a2200ec80d18eede5241b99afcffb509a}{}\index{movie.\+h@{movie.\+h}!show\+Movies@{show\+Movies}}
  176. \index{show\+Movies@{show\+Movies}!movie.\+h@{movie.\+h}}
  177. \subsubsection[{show\+Movies}]{\setlength{\rightskip}{0pt plus 5cm}void show\+Movies (
  178. \begin{DoxyParamCaption}
  179. \item[{{\bf filemanip} \&}]{file, }
  180. \item[{string}]{keyword}
  181. \end{DoxyParamCaption}
  182. )}\label{movie_8h_a2200ec80d18eede5241b99afcffb509a}
  183. Display the information of the movies whose name contains a given keyword.
  184. \begin{DoxyParams}{Parameters}
  185. {\em file} & Pointer to a file. \\
  186. \hline
  187. {\em keyword} & Keyword to search in the name of the movies. \\
  188. \hline
  189. \end{DoxyParams}