The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rawfiles.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * rawfiles.h - class RawFiles: a module driver that reads and writes
4  * entries each to separate files on the filesystem
5  *
6  * $Id: rawfiles.h 3805 2020-09-19 12:19:28Z scribe $
7  *
8  * Copyright 1998-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 RAWFILES_H
25 #define RAWFILES_H
26 
27 #include <rawverse.h>
28 #include <swcom.h>
29 
30 #include <defs.h>
31 
33 
34 class SWDLLEXPORT RawFiles : public RawVerse, public SWCom {
35 
36 private:
37  const char *getNextFilename();
38 
39 public:
40  RawFiles(const char *ipath, const char *iname = 0, const char *idesc = 0,
41  SWDisplay *idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
43  const char *ilang = 0);
44  virtual ~RawFiles();
45  virtual SWBuf &getRawEntryBuf() const;
46 
47  // write interface ----------------------------
51  virtual bool isWritable() const;
52 
57  static char createModule(const char *path);
58 
64  virtual void setEntry(const char *inbuf, long len = -1); // Modify current module entry
65 
70  virtual void linkEntry(const SWKey *linkKey); // Link current module entry to other module entry
71 
75  virtual void deleteEntry();
76  // end write interface ------------------------
77 
78 
79  // OPERATORS -----------------------------------------------------------------
80 
82 
83 };
84 
86 #endif
#define SWTextEncoding
Definition: swmodule.h:78
#define SWORD_NAMESPACE_START
Definition: defs.h:39
Definition: swbuf.h:47
#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
Definition: swcom.h:49
virtual SWBuf & getRawEntryBuf() const =0
static char createModule(const char *path, const char *v11n="KJV")
Definition: rawverse.cpp:248
#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