My Project

- Main Page
- Classes
- Files

- File List
- File Members

Functions
movie.h File Reference
`#include <string>`
`#include <QDebug>`
`#include "filemanip.h"`
`#include <QString>`
`#include <QStringList>`
`#include <iostream>`

Go to the source code of this file.

## Functions
string | getMovieByName (string, filemanip &)
| Finds the information of a movie given its name. More...
string | getMovieByPosition (int, filemanip &)
| Finds a movie in position position of a file and returns the name of the movie. More...
void | showMovies (filemanip &, int=1, int=10)
| Display the information of the movies in a file from line start to line end. More...
void | showMovies (filemanip &file, string keyword)
| Display the information of the movies whose name contains a given keyword. More...
void | showMovie (string)
| Display the movie information of a | separated line with movie info. Example line: Ninja Turtles: The Next Mutation, Vol. 1|Shout! Factory||Out|2.0|4:3|19.93|NR|1997|. More...
string | getMovieName (string)
| Given a movie line from the file returns the movie name. More...
string | getMovieRating (string)
| Given a movie line from the file returns the movie rating. More...
string | getMovieYear (string)
| Given a movie line from the file returns the movie release year. More...
string | getMovieGenre (string)
| Given a movie line from the file returns the movie genre. More...
void | getMovieInfo (string, string &, string &, string &, string &)
| Given a movie line from the file returns by reference the movie name, rating, year, and genre. More...

## Function Documentation

string getMovieByName | ( | string | moviename,
|  | filemanip & | file
| ) |  |

Finds the information of a movie given its name.

Parameters

  moviename | The name of the movie
  file | A file pointer

Returns
  One line with the information of the movie separated by | (pipes)

string getMovieByPosition | ( | int | position,
|  | filemanip & | file
| ) |  |

Finds a movie in position position of a file and returns the name of the movie.

Parameters

  position | Position of the movie in the file
  file | A file pointer

Returns
  The name of the movie

string getMovieGenre | ( | string | movieinfo | ) |

Given a movie line from the file returns the movie genre.

Parameters

  movieinfo | The information of the movie in one line separated by |

Returns
  The movie genre.

void getMovieInfo | ( | string | ,
|  | string & | ,
|  | string & | ,
|  | string & | ,
|  | string & |
| ) |  |

Given a movie line from the file returns by reference the movie name, rating, year, and genre.

Parameters

  movieinfo | The information of the movie in one line separated by |

string getMovieName | ( | string | movieinfo | ) |

Given a movie line from the file returns the movie name.

Parameters

  movieinfo | The information of the movie in one line separated by |

Returns
  Movie name

string getMovieRating | ( | string | movieinfo | ) |

Given a movie line from the file returns the movie rating.

Parameters

  movieinfo | The information of the movie in one line separated by |

Returns
  The movie rating

string getMovieYear | ( | string | movieinfo | ) |

Given a movie line from the file returns the movie release year.

Parameters

  movieinfo | The information of the movie in one line separated by |

Returns
  The movie release year.

void showMovie | ( | string | movieinfo | ) |

Display the movie information of a | separated line with movie info. Example line: Ninja Turtles: The Next Mutation, Vol. 1|Shout! Factory||Out|2.0|4:3|19.93|NR|1997|.

Parameters

  movieinfo | The information of the movie in one line separated by |

void showMovies | ( | filemanip & | file,
|  | int | start,
|  | int | end
| ) |  |

Display the information of the movies in a file from line start to line end.

Parameters

  file | Pointer to a file.
  start | Line in the file to start showing movie info.
  end | Line in the file to stop showing movie information.

void showMovies | ( | filemanip & | file,
|  | string | keyword
| ) |  |

Display the information of the movies whose name contains a given keyword.

Parameters

  file | Pointer to a file.
  keyword | Keyword to search in the name of the movies.