15#if __cplusplus >= 202002L
23#include "../../util/btassert.h"
24#include "../bookshelfmodel/btbookshelfmodel.h"
25#include "../btglobal.h"
26#include "../drivers/cswordmoduleinfo.h"
27#include "../drivers/btconstmoduleset.h"
28#include "../filters/gbftohtml.h"
29#include "../filters/osistohtml.h"
30#include "../filters/plaintohtml.h"
31#include "../filters/teitohtml.h"
32#include "../filters/thmltohtml.h"
33#include "../language.h"
36#pragma GCC diagnostic push
37#pragma GCC diagnostic ignored "-Wextra-semi"
38#pragma GCC diagnostic ignored "-Wunused-parameter"
39#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
41#pragma GCC diagnostic pop
78 std::set<std::shared_ptr<Language const>>;
96 CSwordBackend(
const QString & path,
const bool augmentHome =
true);
118 std::shared_ptr<AvailableLanguagesCacheContainer const>
188 QList<CSwordModuleInfo*>
getPointerList(
const QStringList & names)
const;
211 {
return QString::fromLatin1(
m_manager.prefixPath); }
225 using sword::SWMgr::SWMgr;
230 sword::ConfigEntMap & section)
override;
243#if __cplusplus >= 202002L
244 std::atomic<std::shared_ptr<AvailableLanguagesCacheContainer const>>
246 std::shared_ptr<AvailableLanguagesCacheContainer const>
QList< CSwordModuleInfo const * > BtConstModuleList
The backend layer main class, a backend implementation of Sword.
void shutdownModules()
Deinitializes and frees the modules.
void setOption(CSwordModuleInfo::FilterOption const &type, const int state)
Sets the state of the given filter option.
CSwordBackend::LoadError initModules()
Initializes the Sword modules.
QStringList swordDirList() const
Sword prefix list.
std::set< std::shared_ptr< Language const > > AvailableLanguagesCacheContainer
static CSwordBackend * m_instance
std::shared_ptr< AvailableLanguagesCacheContainer const > availableLanguages() noexcept
void reloadModules()
Reloads all Sword modules.
std::shared_ptr< BtBookshelfModel > const m_dataModel
QList< CSwordModuleInfo * > getPointerList(const QStringList &names) const
std::shared_ptr< BtBookshelfModel > model()
CSwordModuleInfo * findFirstAvailableModule(CSwordModuleInfo::ModuleType type)
CSwordBackend::Private m_manager
void deleteOrphanedIndices()
CSwordModuleInfo * findModuleByName(const QString &name) const
Searches for a module with the given name.
QString prefixPath() const
void uninstallModules(BtConstModuleSet const &modules)
Uninstalls the given modules.
void sigSwordSetupChanged()
CSwordBackend()
Creates the regular CSwordBackend instance.
BtConstModuleList getConstPointerList(const QStringList &names) const
LoadError
The error codes which may be returned by the Load() call.
static CSwordBackend & instance() noexcept
QList< CSwordModuleInfo * > const & moduleList() const
void setFilterOptions(const FilterOptions &options)
CSwordModuleInfo * findSwordModuleByPointer(const sword::SWModule *const swmodule) const
Searches for a module with the given sword module as module().
~CSwordBackend() override
void setBooknameLanguage(QString const &langName)
Sets the language for the international booknames of Sword.
std::shared_ptr< AvailableLanguagesCacheContainer const > m_availableLanguagesCache
sword::SWConfig * getConfig() const
QString booknameLanguage() const
GBF to HTML conversion filter.
OSIS to HTMl conversion filter.
Plain text to HTML conversion filter.
TEI to HTML conversion filter.
ThML to HTML conversion filter.
Filters::TeiToHtml m_teiFilter
Filters::ThmlToHtml m_thmlFilter
Filters::OsisToHtml m_osisFilter
Filters::GbfToHtml m_gbfFilter
void addRenderFilters(sword::SWModule *module, sword::ConfigEntMap §ion) override
Filters::PlainToHtml m_plainFilter