20#include <NotesBaseEntry.h>
84 getNote(
const std::string &collection_name,
85 const std::filesystem::path &book_file_full_path,
86 const std::string &book_path);
126 const std::filesystem::path &reserve_directory,
127 const bool &make_reserve);
139 const std::filesystem::path &reserve_directory,
140 const bool &make_reserve);
153 const std::filesystem::path &reserve_directory,
154 const bool &make_reserve);
161 std::vector<NotesBaseEntry>
166 parseRawBase(
const std::string &raw_base);
169 parseEntry(
const std::string &entry);
174 std::shared_ptr<AuxFunc> af;
175 std::filesystem::path base_directory_path;
177 std::vector<NotesBaseEntry> base;
The NotesBaseEntry class.
Definition NotesBaseEntry.h:28
void loadBase()
Loads notes base to memory.
NotesBaseEntry getNote(const std::string &collection_name, const std::filesystem::path &book_file_full_path, const std::string &book_path)
Gets NotesBaseEntry object from base or creats it.
void refreshCollection(const std::string &collection_name, const std::filesystem::path &reserve_directory, const bool &make_reserve)
Compares notes base and collection base and removes notes for absent books.
std::string readNoteText(const NotesBaseEntry &nbe)
Returns note text (if any).
std::string readNote(const NotesBaseEntry &nbe)
Returns content of note file.
void editNote(const NotesBaseEntry &nbe, const std::string ¬e)
Edits note.
virtual ~NotesKeeper()
NotesKeeper destructor.
void removeCollection(const std::string &collection_name, const std::filesystem::path &reserve_directory, const bool &make_reserve)
Removes notes for all books in particular collection.
std::vector< NotesBaseEntry > getNotesForCollection(const std::string &collection_name)
Returns all notes for particular collection.
void removeNotes(const NotesBaseEntry &nbe, const std::filesystem::path &reserve_directory, const bool &make_reserve)
Removes notes.
NotesKeeper(const std::shared_ptr< AuxFunc > &af)
NotesKeeper constructor.