The SWORD Project
1.9.0.svnversion
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
swtext.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* swtext.h - class SWText: the basis for all Bible modules
4
*
5
* $Id: swtext.h 3821 2020-11-02 18:33:02Z scribe $
6
*
7
* Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
8
* CrossWire Bible Society
9
* P. O. Box 2528
10
* Tempe, AZ 85280-2528
11
*
12
* This program is free software; you can redistribute it and/or modify it
13
* under the terms of the GNU General Public License as published by the
14
* Free Software Foundation version 2.
15
*
16
* This program is distributed in the hope that it will be useful, but
17
* WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
* General Public License for more details.
20
*
21
*/
22
23
#ifndef SWTEXT_H
24
#define SWTEXT_H
25
26
#include <
swmodule.h
>
27
28
#include <
defs.h
>
29
30
SWORD_NAMESPACE_START
31
32
class
VerseKey
;
33
36
class
SWDLLEXPORT
SWText
:
public
SWModule
{
37
38
private
:
39
// for conversion if we have been set with a different internal key type
40
mutable
VerseKey
*
tmpVK1
;
41
mutable
VerseKey
*
tmpVK2
;
42
mutable
bool
tmpSecond
;
43
char
*
versification
;
44
45
protected
:
46
const
VerseKey
&
getVerseKey
(
const
SWKey
*key=0)
const
{
return
getVerseKeyConst(key); }
47
const
VerseKey
&getVerseKeyConst(
const
SWKey
*key=0)
const
;
48
VerseKey
&getVerseKey(
SWKey
*key=0);
49
50
public
:
53
SWText
(
const
char
*imodname = 0,
const
char
*imoddesc = 0,
54
SWDisplay
*idisp = 0,
55
SWTextEncoding
encoding =
ENC_UNKNOWN
,
56
SWTextDirection
dir =
DIRECTION_LTR
,
57
SWTextMarkup
markup =
FMT_UNKNOWN
,
const
char
*ilang = 0,
58
const
char
*versification =
"KJV"
);
59
60
virtual
~
SWText
();
63
virtual
SWKey
*
createKey
()
const
;
64
65
virtual
long
getIndex
()
const
;
66
virtual
void
setIndex
(
long
iindex);
67
68
// OPERATORS -----------------------------------------------------------------
69
70
SWMODULE_OPERATORS
71
72
};
73
74
SWORD_NAMESPACE_END
75
76
#endif
SWTextEncoding
#define SWTextEncoding
Definition:
swmodule.h:78
SWORD_NAMESPACE_START
#define SWORD_NAMESPACE_START
Definition:
defs.h:39
SWModule::setIndex
virtual void setIndex(long iindex)
Definition:
swmodule.h:310
SWText
Definition:
swtext.h:36
SWDLLEXPORT
#define SWDLLEXPORT
Definition:
defs.h:171
VerseKey
Definition:
versekey.h:53
swmodule.h
defs.h
ENC_UNKNOWN
Definition:
swmodule.h:46
SWText::versification
char * versification
Definition:
swtext.h:43
FMT_UNKNOWN
Definition:
swmodule.h:45
SWModule::getIndex
virtual long getIndex() const
Definition:
swmodule.h:309
SWText::tmpVK1
VerseKey * tmpVK1
Definition:
swtext.h:40
SWText::tmpVK2
VerseKey * tmpVK2
Definition:
swtext.h:41
SWModule
Definition:
swmodule.h:101
SWDisplay
Definition:
swdisp.h:37
SWText::getVerseKey
const VerseKey & getVerseKey(const SWKey *key=0) const
Definition:
swtext.h:46
SWMODULE_OPERATORS
#define SWMODULE_OPERATORS
Definition:
swmodule.h:54
DIRECTION_LTR
Definition:
swmodule.h:44
SWTextDirection
#define SWTextDirection
Definition:
swmodule.h:77
SWORD_NAMESPACE_END
#define SWORD_NAMESPACE_END
Definition:
defs.h:40
SWModule::createKey
virtual SWKey * createKey() const
Definition:
swmodule.cpp:173
SWKey
Definition:
swkey.h:77
SWTextMarkup
#define SWTextMarkup
Definition:
swmodule.h:79
SWText::tmpSecond
bool tmpSecond
Definition:
swtext.h:42
include
swtext.h
Generated by
1.8.5