43 Top100(
const std::string& filename);
83 std::vector<Movie> movies;
Persistent container for up to 100 movies, with ranking.
Definition top100.h:41
std::vector< Movie > getMovies(SortOrder order=SortOrder::DEFAULT) const
Return a copy of movies in the requested sort order.
Definition top100.cpp:44
bool updateMovie(size_t index, const Movie &movie)
Update movie at index; returns false if index invalid.
Definition top100.cpp:126
int findIndexByTitleYear(const std::string &title, int year) const
Definition top100.cpp:113
void removeMovie(const std::string &title)
Remove by title (first match). No-op if not found.
Definition top100.cpp:30
void replaceMovie(size_t index, const Movie &movie)
Replace movie at index (bounds-checked internally).
Definition top100.cpp:120
void addMovie(const Movie &movie)
Add a movie; replaces existing title+year duplicates.
Definition top100.cpp:26
bool mergeFromOmdbByImdbId(const Movie &omdbMovie)
Merge updated metadata into an existing movie by IMDb ID. Copies all metadata fields from the provide...
Definition top100.cpp:149
int findIndexByImdbId(const std::string &imdbID) const
Definition top100.cpp:105
void recomputeRanks()
Recompute 1-based userRank from userScore descending.
Definition top100.cpp:132
bool removeByImdbId(const std::string &imdbID)
Remove by IMDb ID (preferred precise delete).
Definition top100.cpp:36
SortOrder
Sort orders for listing movies.
Definition top100.h:25
Movie domain model and metadata.
Definition Movie.h:27