MLPlugin 1.0
Loading...
Searching...
No Matches
GenreBase.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 GENREBASE_H
17#define GENREBASE_H
18
19#include <QString>
20#include <UDBase.h>
21#include <shared_mutex>
22
29class GenreBase : public UDBase
30{
31public:
32 GenreBase();
33
34 virtual ~GenreBase();
35
43 QString
44 getTranslationByGenreCode(const std::string &genre_code);
45
46private:
47 std::string
48 loadFile(const QString &path);
49
50 void
51 createBase();
52
53 int
54 getCsvColumnNumber(const std::string &source);
55
56 void
57 loadGroups(const std::string &g_groups, const int &g_groups_column);
58
59 void
60 loadGenres(const std::string &genres, const int &genres_column);
61
62 std::shared_mutex base_mtx;
63};
64
65#endif // GENREBASE_H
QString getTranslationByGenreCode(const std::string &genre_code)