Без опису

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