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

« back to all changes in this revision

Viewing changes to include/rawcom.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
 *  rawcom.h   - code for class 'RawCom'- a module that reads raw commentary
 
3
 *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
 
4
 *
 
5
 * $Id: rawcom.h,v 1.18 2003/02/20 07:25:19 scribe Exp $
 
6
 *
 
7
 * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
 
8
 *      CrossWire Bible Society
 
9
 *      P. O. Box 2528
 
10
 *      Tempe, AZ  85280-2528
 
11
 *
 
12
 * This program is free software; you can redistribute it and/or modify it
 
13
 * under the terms of the GNU General Public License as published by the
 
14
 * Free Software Foundation version 2.
 
15
 *
 
16
 * This program is distributed in the hope that it will be useful, but
 
17
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
19
 * General Public License for more details.
 
20
 *
 
21
 */
 
22
 
 
23
#ifndef RAWCOM_H
 
24
#define RAWCOM_H
 
25
 
 
26
#include <rawverse.h>
 
27
#include <swcom.h>
 
28
 
 
29
#include <defs.h>
 
30
 
 
31
SWORD_NAMESPACE_START
 
32
 
 
33
class SWDLLEXPORT RawCom:public RawVerse, public SWCom {
 
34
 
 
35
        VerseKey &getVerseKey();
 
36
 
 
37
 
 
38
public:
 
39
    
 
40
        RawCom(const char *ipath, const char *iname = 0, const char *idesc = 0,
 
41
                        SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
 
42
                        SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
 
43
                        const char* ilang = 0);
 
44
        virtual ~RawCom();
 
45
 
 
46
        virtual SWBuf &getRawEntryBuf();
 
47
 
 
48
        virtual void increment(int steps);
 
49
        virtual void decrement(int steps) { increment(-steps); }
 
50
 
 
51
        // write interface ----------------------------
 
52
        virtual bool isWritable() {
 
53
                return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & O_RDWR) == O_RDWR));
 
54
        }
 
55
        static char createModule(const char *path) { return RawVerse::createModule(path); }
 
56
        virtual void setEntry(const char *inbuf, long len = -1);        // Modify current module entry
 
57
        virtual void linkEntry(const SWKey *linkKey);   // Link current module entry to other module entry
 
58
        virtual void deleteEntry();     // Delete current module entry
 
59
        // end write interface ------------------------
 
60
 
 
61
        SWMODULE_OPERATORS
 
62
 
 
63
};
 
64
 
 
65
SWORD_NAMESPACE_END
 
66
 
 
67
#endif