MLBookProc
2.1
Toggle main menu visibility
Loading...
Searching...
No Matches
NotesKeeper.h
1
/*
2
* Copyright (C) 2026 Yury Bobylev <bobilev_yury@mail.ru>
3
*
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the Free
6
* Software Foundation, version 3.
7
*
8
* This program is distributed in the hope that it will be useful, but WITHOUT
9
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11
* more details.
12
*
13
* You should have received a copy of the GNU General Public License along with
14
* this program. If not, see <https://www.gnu.org/licenses/>.
15
*/
16
#ifndef NOTESKEEPER_H
17
#define NOTESKEEPER_H
18
19
#include <BaseID.h>
20
#include <MLBookProc.h>
21
#include <UDBase.h>
22
#include <shared_mutex>
23
29
class
NotesKeeper
:
public
UDBase
30
{
31
public
:
36
NotesKeeper
(
const
std::shared_ptr<MLBookProc> &mlbp);
37
43
void
44
loadNotesBase
(
const
std::filesystem::path &base_path);
45
52
UDBase
53
searchNotes
(
const
UDBElement &book_search_result);
54
62
void
63
addNote
(
const
UDBElement &book_search_result,
const
std::string ¬e_txt);
64
70
void
71
removeNote
(
const
UDBElement ¬e);
72
73
private
:
74
void
75
loadLegacyBase(
const
std::filesystem::path &base_path);
76
77
void
78
parseLegacyEntry(
const
std::string &entry);
79
80
std::shared_ptr<MLBookProc> mlbp;
81
82
std::filesystem::path base_path;
83
84
BaseID
bid;
85
86
std::shared_mutex base_mtx;
87
};
88
#endif
// NOTESKEEPER_H
BaseID
The BaseID class.
Definition
BaseID.h:28
NotesKeeper::searchNotes
UDBase searchNotes(const UDBElement &book_search_result)
NotesKeeper::loadNotesBase
void loadNotesBase(const std::filesystem::path &base_path)
NotesKeeper::removeNote
void removeNote(const UDBElement ¬e)
NotesKeeper::NotesKeeper
NotesKeeper(const std::shared_ptr< MLBookProc > &mlbp)
NotesKeeper constructor.
NotesKeeper::addNote
void addNote(const UDBElement &book_search_result, const std::string ¬e_txt)
NotesKeeper.h
Generated by
1.17.0