The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rawgenbook.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * rawgenbook.h - class RawGenBook- a module driver that support
4  * Generic Books uncompressed
5  *
6  * $Id: rawgenbook.h 3786 2020-08-30 11:35:14Z scribe $
7  *
8  * Copyright 2002-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 RAWGENBOOK_H
25 #define RAWGENBOOK_H
26 
27 #include <swgenbook.h>
28 
29 #include <defs.h>
30 
32 
33 class FileDesc;
34 
36 
37 private:
38  char *path;
40  bool verseKey;
41 
42 public:
43  RawGenBook(const char *ipath, const char *iname = 0, const char *idesc = 0,
44  SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
46  SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0, const char *keyType = "TreeKey");
47  virtual ~RawGenBook();
48  virtual SWBuf &getRawEntryBuf() const;
49  // write interface ----------------------------
50  virtual bool isWritable() const;
51  static char createModule(const char *ipath);
52  virtual void setEntry(const char *inbuf, long len = -1); // Modify current module entry
53  virtual void linkEntry(const SWKey * linkKey); // Link current module entry to other module entry
54  virtual void deleteEntry(); // Delete current module entry
55  virtual SWKey *createKey() const;
56  // end write interface ------------------------
57 
58  virtual bool hasEntry(const SWKey *k) const;
59 
60  // OPERATORS -----------------------------------------------------------------
61 
63 
64 };
65 
67 #endif
#define SWTextEncoding
Definition: swmodule.h:78
#define SWORD_NAMESPACE_START
Definition: defs.h:39
char * path
Definition: rawgenbook.h:38
Definition: swbuf.h:47
static signed char createModule(const char *path)
Definition: swmodule.cpp:1676
#define SWDLLEXPORT
Definition: defs.h:171
virtual void deleteEntry()
Definition: swmodule.h:525
virtual void setEntry(const char *inbuf, long len=-1)
Definition: swmodule.cpp:1680
virtual void linkEntry(const SWKey *sourceKey)
Definition: swmodule.cpp:1683
virtual bool isWritable() const
Definition: swmodule.h:506
virtual SWKey * createKey() const =0
virtual bool hasEntry(const SWKey *) const
Definition: swmodule.h:809
FileDesc * bdtfd
Definition: rawgenbook.h:39
virtual SWBuf & getRawEntryBuf() const =0
bool verseKey
Definition: rawgenbook.h:40
#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