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
rawtext.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* rawtext.h - class RawText: a module driver for Bible modules stored
4
* uncompressed with entry sizes specified with 2 bytes
5
*
6
* $Id: rawtext.h 3786 2020-08-30 11:35:14Z scribe $
7
*
8
* Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
9
* CrossWire Bible Society
10
* P. O. Box 2528
11
* Tempe, AZ 85280-2528
12
*
13
* This program is free software; you can redistribute it and/or modify it
14
* under the terms of the GNU General Public License as published by the
15
* Free Software Foundation version 2.
16
*
17
* This program is distributed in the hope that it will be useful, but
18
* WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
* General Public License for more details.
21
*
22
*/
23
24
#ifndef RAWTEXT_H
25
#define RAWTEXT_H
26
27
#include <
rawverse.h
>
28
#include <
swtext.h
>
29
30
#include <
defs.h
>
31
32
SWORD_NAMESPACE_START
33
34
class
RawStr
;
35
36
class
SWDLLEXPORT
RawText
:
public
SWText
,
public
RawVerse
{
37
38
public
:
39
RawText
(
const
char
*ipath,
const
char
*iname = 0,
const
char
*idesc = 0,
SWDisplay
*idisp = 0,
SWTextEncoding
encoding =
ENC_UNKNOWN
,
SWTextDirection
dir =
DIRECTION_LTR
,
SWTextMarkup
markup =
FMT_UNKNOWN
,
const
char
*ilang = 0,
const
char
*versification =
"KJV"
);
40
virtual
~
RawText
();
41
virtual
SWBuf
&
getRawEntryBuf
()
const
;
42
virtual
void
increment
(
int
steps = 1);
43
virtual
void
decrement
(
int
steps = 1) {
increment
(-steps); }
44
// write interface ----------------------------
45
virtual
bool
isWritable
()
const
;
46
static
char
createModule
(
const
char
*path,
const
char
*
v11n
=
"KJV"
) {
return
RawVerse::createModule
(path,
v11n
); }
47
virtual
void
setEntry
(
const
char
*inbuf,
long
len = -1);
// Modify current module entry
48
virtual
void
linkEntry
(
const
SWKey
*linkKey);
// Link current module entry to other module entry
49
virtual
void
deleteEntry
();
// Delete current module entry
50
// end write interface ------------------------
51
52
virtual
bool
isLinked
(
const
SWKey
*k1,
const
SWKey
*k2)
const
;
53
virtual
bool
hasEntry
(
const
SWKey
*k)
const
;
54
55
56
SWMODULE_OPERATORS
57
58
};
59
60
SWORD_NAMESPACE_END
61
#endif
SWTextEncoding
#define SWTextEncoding
Definition:
swmodule.h:78
SWORD_NAMESPACE_START
#define SWORD_NAMESPACE_START
Definition:
defs.h:39
SWBuf
Definition:
swbuf.h:47
SWText
Definition:
swtext.h:36
SWDLLEXPORT
#define SWDLLEXPORT
Definition:
defs.h:171
RawText::createModule
static char createModule(const char *path, const char *v11n="KJV")
Definition:
rawtext.h:46
SWModule::deleteEntry
virtual void deleteEntry()
Definition:
swmodule.h:525
SWModule::setEntry
virtual void setEntry(const char *inbuf, long len=-1)
Definition:
swmodule.cpp:1680
defs.h
v11n
SWBuf v11n
Definition:
osis2mod.cpp:107
SWModule::isLinked
virtual bool isLinked(const SWKey *, const SWKey *) const
Definition:
swmodule.h:808
swtext.h
ENC_UNKNOWN
Definition:
swmodule.h:46
SWModule::linkEntry
virtual void linkEntry(const SWKey *sourceKey)
Definition:
swmodule.cpp:1683
FMT_UNKNOWN
Definition:
swmodule.h:45
SWModule::isWritable
virtual bool isWritable() const
Definition:
swmodule.h:506
RawText::decrement
virtual void decrement(int steps=1)
Definition:
rawtext.h:43
SWModule::hasEntry
virtual bool hasEntry(const SWKey *) const
Definition:
swmodule.h:809
SWModule::increment
virtual void increment(int steps=1)
Definition:
swmodule.cpp:355
RawStr
Definition:
rawstr.h:35
RawText
Definition:
rawtext.h:36
SWModule::getRawEntryBuf
virtual SWBuf & getRawEntryBuf() const =0
RawVerse::createModule
static char createModule(const char *path, const char *v11n="KJV")
Definition:
rawverse.cpp:248
SWDisplay
Definition:
swdisp.h:37
rawverse.h
SWMODULE_OPERATORS
#define SWMODULE_OPERATORS
Definition:
swmodule.h:54
RawVerse
Definition:
rawverse.h:36
DIRECTION_LTR
Definition:
swmodule.h:44
SWTextDirection
#define SWTextDirection
Definition:
swmodule.h:77
SWORD_NAMESPACE_END
#define SWORD_NAMESPACE_END
Definition:
defs.h:40
SWKey
Definition:
swkey.h:77
SWTextMarkup
#define SWTextMarkup
Definition:
swmodule.h:79
include
rawtext.h
Generated by
1.8.5