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