BibleTime
cswordbookmoduleinfo.h
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 
13 #pragma once
14 
15 #include "cswordmoduleinfo.h"
16 
17 #include <QObject>
18 #include <QString>
19 
20 
21 class CSwordBackend;
22 namespace sword {
23 class SWModule;
24 class TreeKeyIdx;
25 }
26 
27 /** \brief Class for generic book support. */
29 
30  Q_OBJECT
31 
32 public: // Methods:
33 
34  /**
35  \param module The module which belongs to this object.
36  \param backend The parent backend for this book module.
37  */
38  CSwordBookModuleInfo(sword::SWModule & module, CSwordBackend & usedBackend);
39 
40  /** \returns the maximal depth of sections and subsections. */
41  int depth() const noexcept { return m_depth; }
42 
43  /**
44  \returns A treekey filled with the structure of this module. Don't delete
45  the returned key because it's casted from the module object.
46  */
47  sword::TreeKeyIdx * tree() const;
48 
49  CSwordKey * createKey() const final override;
50 
51 private: // Fields:
52 
53  int const m_depth;
54 
55 };
The backend layer main class, a backend implementation of Sword.
Definition: cswordbackend.h:56
Class for generic book support.
sword::TreeKeyIdx * tree() const
int depth() const noexcept
CSwordBookModuleInfo(sword::SWModule &module, CSwordBackend &usedBackend)
CSwordKey * createKey() const final override