aboutsummaryrefslogtreecommitdiffstats
path: root/doc/api-documentation/html/zverse_8h-source.html
blob: 470d8537f356e2cc8c31c2d5ca21b8fc14cc2787 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>zverse.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.17 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </center>
<hr><h1>zverse.h</h1><div class="fragment"><pre>00001 <span class="comment">/******************************************************************************</span>
00002 <span class="comment"> *  rawverse.h   - code for class 'zVerse'- a module that reads raw text</span>
00003 <span class="comment"> *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss</span>
00004 <span class="comment"> *                      and provides lookup and parsing functions based on</span>
00005 <span class="comment"> *                      class VerseKey</span>
00006 <span class="comment"> */</span>
00007 
00008 <span class="preprocessor">#ifndef ZVERSE_H</span>
00009 <span class="preprocessor"></span><span class="preprocessor">#define ZVERSE_H</span>
00010 <span class="preprocessor"></span>
00011 <span class="preprocessor">#include &lt;filemgr.h&gt;</span>
00012 <span class="preprocessor">#include &lt;fcntl.h&gt;</span>
00013 <span class="preprocessor">#include &lt;rawverse.h&gt;</span>
00014 <span class="preprocessor">#include &lt;swcomprs.h&gt;</span>
00015 
00016 <span class="preprocessor">#include &lt;defs.h&gt;</span>
00017 
00018 SWORD_NAMESPACE_START
00019 
00020 <span class="keyword">class </span>SWDLLEXPORT zVerse {
00021         SWCompress *compressor;
00022 
00023 <span class="keyword">protected</span>:
00024         <span class="keyword">static</span> <span class="keywordtype">int</span> instance;            <span class="comment">// number of instantiated zVerse objects or derivitives</span>
00025 
00026         FileDesc *idxfp[2];
00027         FileDesc *textfp[2];
00028         FileDesc *compfp[2];
00029         <span class="keywordtype">char</span> *path;
00030         <span class="keywordtype">void</span> preptext(<span class="keywordtype">char</span> *buf);
00031         <span class="keywordtype">void</span> settext(<span class="keywordtype">char</span> testmt, <span class="keywordtype">long</span> idxoff, <span class="keyword">const</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">long</span> len = 0);
00032         <span class="keywordtype">void</span> linkentry(<span class="keywordtype">char</span> testmt, <span class="keywordtype">long</span> destidxoff, <span class="keywordtype">long</span> srcidxoff);
00033         <span class="keywordtype">void</span> flushCache();
00034         <span class="keywordtype">char</span> *cacheBuf;
00035         <span class="keywordtype">char</span> cacheTestament;
00036         <span class="keywordtype">long</span> cacheBufIdx;
00037         <span class="keywordtype">bool</span> dirtyCache;
00038 
00039 <span class="keyword">public</span>:
00040 
00041 <span class="preprocessor">#define VERSEBLOCKS 2</span>
00042 <span class="preprocessor"></span><span class="preprocessor">#define CHAPTERBLOCKS 3</span>
00043 <span class="preprocessor"></span><span class="preprocessor">#define BOOKBLOCKS 4</span>
00044 <span class="preprocessor"></span>
00045         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> uniqueIndexID[];
00046         <span class="keywordtype">char</span> nl;
00047 
00048 
00049         zVerse(<span class="keyword">const</span> <span class="keywordtype">char</span> *ipath, <span class="keywordtype">int</span> fileMode = O_RDONLY, <span class="keywordtype">int</span> blockType = CHAPTERBLOCKS, SWCompress * icomp = 0);
00050         <span class="keyword">virtual</span> ~zVerse();
00051         <span class="keywordtype">void</span> findoffset(<span class="keywordtype">char</span> testmt, <span class="keywordtype">long</span> idxoff, <span class="keywordtype">long</span> *start, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> *end);
00052         <span class="keywordtype">void</span> zreadtext(<span class="keywordtype">char</span> testmt, <span class="keywordtype">long</span> start, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> size, <span class="keywordtype">char</span> *buf);
00053         <span class="keyword">virtual</span> <span class="keywordtype">void</span> rawZFilter(<span class="keywordtype">char</span> *buf, <span class="keywordtype">long</span> size, <span class="keywordtype">char</span> direction = 0) {}
00054         <span class="keyword">static</span> <span class="keywordtype">char</span> createModule(<span class="keyword">const</span> <span class="keywordtype">char</span> *path, <span class="keywordtype">int</span> blockBound);
00055 };
00056 
00057 SWORD_NAMESPACE_END
00058 <span class="preprocessor">#endif</span>
</pre></div><hr><address style="align: right;"><small>Generated on Thu Oct 31 12:11:28 2002 for The Sword Project by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.17 </small></address>
</body>
</html>