~ubuntu-branches/debian/squeeze/sword/squeeze

« back to all changes in this revision

Viewing changes to include/rawverse.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Glassey
  • Date: 2004-01-15 15:50:07 UTC
  • Revision ID: james.westby@ubuntu.com-20040115155007-n9mz4x0zxrs1isd3
Tags: upstream-1.5.7
ImportĀ upstreamĀ versionĀ 1.5.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************************************
 
2
 *  rawverse.h   - code for class 'RawVerse'- a module that reads raw text
 
3
 *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
 
4
 *                      and provides lookup and parsing functions based on
 
5
 *                      class VerseKey
 
6
 */
 
7
 
 
8
#ifndef RAWVERSE_H
 
9
#define RAWVERSE_H
 
10
 
 
11
#include <filemgr.h>
 
12
#include <fcntl.h>
 
13
 
 
14
#include <defs.h>
 
15
#include <swbuf.h>
 
16
 
 
17
SWORD_NAMESPACE_START
 
18
 
 
19
class SWDLLEXPORT RawVerse {
 
20
        static int instance;            // number of instantiated RawVerse objects or derivitives
 
21
protected:
 
22
        FileDesc *idxfp[2];
 
23
        FileDesc *textfp[2];
 
24
 
 
25
        char *path;
 
26
        void prepText(SWBuf &buf);
 
27
        void doSetText(char testmt, long idxoff, const char *buf, long len = -1);
 
28
        void doLinkEntry(char testmt, long destidxoff, long srcidxoff);
 
29
 
 
30
public:
 
31
        static const char *nl;
 
32
        RawVerse(const char *ipath, int fileMode = -1);
 
33
        virtual ~RawVerse();
 
34
        void findOffset(char testmt, long idxoff, long *start,  unsigned short *end);
 
35
        void readText(char testmt, long start, unsigned short size, SWBuf &buf);
 
36
        static char createModule(const char *path);
 
37
};
 
38
 
 
39
SWORD_NAMESPACE_END
 
40
#endif