21#include <BookBaseEntry.h>
22#include <FileParseEntry.h>
23#include <NotesBaseEntry.h>
85 std::vector<BookBaseEntry>
87 const double &coef_coincedence =
double(0.7));
93 std::vector<std::string>
101 std::vector<BookBaseEntry>
120 std::vector<FileParseEntry>
134 static std::filesystem::path
136 const std::shared_ptr<AuxFunc> &af);
161 readFileEntry(
const std::string &base,
size_t &rb);
163 std::vector<BookParseEntry>
164 readBookEntry(
const std::string &entry,
size_t &rb);
167 parseBookEntry(
const std::string &e, std::string &read_val,
size_t &rb);
170 searchLineFunc(
const std::string &to_search,
const std::string &source,
171 const double &coef_coincidence);
175 std::vector<BookBaseEntry> &result,
176 const double &coef_coincidence);
179 std::vector<BookBaseEntry> &result,
180 const double &coef_coincidence);
184 std::vector<BookBaseEntry> &result,
185 const double &coef_coincidence);
189 const double &coef_coincidence);
192 searchSeries(
const BookBaseEntry &search, std::vector<BookBaseEntry> &result,
193 const double &coef_coincidence);
196 searchGenre(
const BookBaseEntry &search, std::vector<BookBaseEntry> &result,
197 const double &coef_coincidence);
202 std::shared_ptr<AuxFunc> af;
204 std::vector<FileParseEntry> base;
205 std::string collection_name;
206 std::filesystem::path collection_path;
207 size_t books_in_base = 0;
213 std::atomic<bool> cancel_search;
std::vector< FileParseEntry > get_base_vector()
Returns copy of inner database vector.
std::vector< BookBaseEntry > booksWithNotes(const std::vector< NotesBaseEntry > ¬es)
Lists all books of current collection, which have notes.
void clearBase()
Unloads collection base from memory.
std::vector< BookBaseEntry > searchBook(const BookBaseEntry &search, const double &coef_coincedence=double(0.7))
Searches book in collection.
BaseKeeper(const std::shared_ptr< AuxFunc > &af)
BaseKeeper constructor.
size_t getBooksQuantity()
Returns total quantity of books in loaded collection.
virtual ~BaseKeeper()
BaseKeeper destructor.
void stopSearch()
Stops all search operations.
std::function< void(const double &progr, const double &sz)> auth_show_progr
collectionAuthors() progress callback
Definition BaseKeeper.h:157
void loadCollection(const std::string &col_name)
Loads collection database to memory.
std::vector< std::string > collectionAuthors()
Lists all authors, found in collection.
static std::filesystem::path get_books_path(const std::string &collection_name, const std::shared_ptr< AuxFunc > &af)
Returns absolute path to directory containing collection books.
The BookBaseEntry class.
Definition BookBaseEntry.h:30
The FileParseEntry class.
Definition FileParseEntry.h:31