BibleTime
cswordcommentarymoduleinfo.cpp
Go to the documentation of this file.
1 /*********
2 *
3 * In the name of the Father, and of the Son, and of the Holy Spirit.
4 *
5 * This file is part of BibleTime's source code, https://bibletime.info/
6 *
7 * Copyright 1999-2021 by the BibleTime developers.
8 * The BibleTime source code is licensed under the GNU General Public License
9 * version 2.0.
10 *
11 **********/
12 
14 
15 #include <string_view>
16 
17 // Sword includes:
18 #pragma GCC diagnostic push
19 #pragma GCC diagnostic ignored "-Wextra-semi"
20 #pragma GCC diagnostic ignored "-Wsuggest-override"
21 #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
22 #ifdef __clang__
23 #pragma clang diagnostic push
24 #pragma clang diagnostic ignored "-Wsuggest-destructor-override"
25 #endif
26 #include <swmodule.h>
27 #ifdef __clang__
28 #pragma clang diagnostic pop
29 #endif
30 #pragma GCC diagnostic pop
31 
32 
34  /*
35  A module is only writable if it's a RawFiles module with writable
36  returning true.
37  */
38  using namespace std::literals;
39  return swordModule().getConfigEntry("ModDrv") == "RawFiles"sv
40  && swordModule().isWritable();
41 }
bool isWritable() const final override
sword::SWModule & swordModule() const