diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:35 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:35 -0400 |
commit | df8f1d512c60a96f9041f9663b3fdc2db51cba33 (patch) | |
tree | 3d2bdbd4732d417aca73be022ae9044eac96b7d3 /src/backend/drivers/cswordbookmoduleinfo.h | |
parent | 4885bfcef4d89cf0cb391e00af617b9fd19c9cbb (diff) |
Imported Upstream version 2.8.1
Diffstat (limited to 'src/backend/drivers/cswordbookmoduleinfo.h')
-rw-r--r-- | src/backend/drivers/cswordbookmoduleinfo.h | 64 |
1 files changed, 31 insertions, 33 deletions
diff --git a/src/backend/drivers/cswordbookmoduleinfo.h b/src/backend/drivers/cswordbookmoduleinfo.h index 77adb29..12a3d01 100644 --- a/src/backend/drivers/cswordbookmoduleinfo.h +++ b/src/backend/drivers/cswordbookmoduleinfo.h @@ -2,7 +2,7 @@ * * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2008 by the BibleTime developers. +* Copyright 1999-2011 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ @@ -16,50 +16,48 @@ #include <treekeyidx.h> -/** Class for generic book support - * @author The BibleTime team - */ +/** + \brief Class for generic book support +*/ +class CSwordBookModuleInfo: public CSwordModuleInfo { + Q_OBJECT -class CSwordBookModuleInfo : public CSwordModuleInfo { - - public: - /** Constructor. - * @param module The module which belongs to this object - * @param backend The parent backend for this book module. - */ - CSwordBookModuleInfo( sword::SWModule* module, CSwordBackend* const backend ); - /** Copy constructor. - * Copy constructor to copy the passed parameter. - * @param module The module which should be copied. - */ - CSwordBookModuleInfo( const CSwordBookModuleInfo& module ); - /** Destructor. - */ - ~CSwordBookModuleInfo(); + public: /* Methods: */ /** - * Returns the type of the module. + \param module The module which belongs to this object + \param backend The parent backend for this book module. */ - virtual CSwordModuleInfo::ModuleType type() const; + CSwordBookModuleInfo(sword::SWModule *module, + CSwordBackend * const usedBackend); + + inline CSwordBookModuleInfo(const CSwordBookModuleInfo ©) + : CSwordModuleInfo(copy), m_depth(copy.m_depth) {} + + /* Reimplementation of CSwordModuleInfo::clone(). */ + virtual inline CSwordModuleInfo *clone() const { + return new CSwordBookModuleInfo(*this); + } + /** - * Returns the maximal depth of sections and subsections. + \returns the maximal depth of sections and subsections. */ - int depth(); + inline int depth() const { return m_depth; } + /** - * @return A treekey filled with the structure of this module. Don't delete the returned key because it's casted from the module object. + \returns A treekey filled with the structure of this module. Don't + delete the returned key because it's casted from the module + object. */ - sword::TreeKeyIdx* tree() const; + sword::TreeKeyIdx *tree() const; - private: + private: /* Methods: */ /** * A recursive helper function to help computng the module depth! */ - void computeDepth(sword::TreeKeyIdx* key, int level = 0 ); + void computeDepth(sword::TreeKeyIdx *key, int level = 0); + + private: /* Fields: */ int m_depth; }; -inline CSwordBookModuleInfo::ModuleType CSwordBookModuleInfo::type() const { - return CSwordModuleInfo::GenericBook; -} - - #endif |