aboutsummaryrefslogblamecommitdiffstats
path: root/doc/api-documentation/html/treekeyidx_8h-source.html
blob: 75584ecbb2de09eb6df27ffbc20eea4d5e48ba6d (plain) (tree)
1
2
3
4
5
6
7




                                                                                   
                                    
        




















                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

      





                                                                                              
      


































                                                                                                                                                                                                                                                                                                                    
      






                                                                                                                                                                                                                                        
      







                                                                                                                                                                              
      














                                                                                                                                                                                                                                                                                 
      






















                                                                                                                                                                                                                                                                                                                                                                                                               

                                                             
                                                 

       
<!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>treekeyidx.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>treekeyidx.h</h1><div class="fragment"><pre>00001 <span class="comment">/******************************************************************************</span>
00002 <span class="comment"> *  versekey.h - code for class 'versekey'- a standard Biblical verse key</span>
00003 <span class="comment"> *</span>
00004 <span class="comment"> * $Id: treekeyidx_8h-source.html,v 1.5 2002/10/31 11:30:16 joachim Exp $</span>
00005 <span class="comment"> *</span>
00006 <span class="comment"> * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)</span>
00007 <span class="comment"> *      CrossWire Bible Society</span>
00008 <span class="comment"> *      P. O. Box 2528</span>
00009 <span class="comment"> *      Tempe, AZ  85280-2528</span>
00010 <span class="comment"> *</span>
00011 <span class="comment"> * This program is free software; you can redistribute it and/or modify it</span>
00012 <span class="comment"> * under the terms of the GNU General Public License as published by the</span>
00013 <span class="comment"> * Free Software Foundation version 2.</span>
00014 <span class="comment"> *</span>
00015 <span class="comment"> * This program is distributed in the hope that it will be useful, but</span>
00016 <span class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</span>
00017 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
00018 <span class="comment"> * General Public License for more details.</span>
00019 <span class="comment"> *</span>
00020 <span class="comment"> */</span>
00021 
00022 
00023 <span class="preprocessor">#ifndef TREEKEYIDX_H</span>
00024 <span class="preprocessor"></span><span class="preprocessor">#define TREEKEYIDX_H</span>
00025 <span class="preprocessor"></span>
00026 <span class="preprocessor">#include &lt;treekey.h&gt;</span>
00027 <span class="preprocessor">#include &lt;sysdata.h&gt;</span>
00028 <span class="preprocessor">#include &lt;filemgr.h&gt;</span>
00029 
00030 SWORD_NAMESPACE_START
00031 
<a name="l00036"></a><a class="code" href="classsword_1_1_tree_key_idx.html">00036</a> <span class="keyword">class </span>SWDLLEXPORT <a class="code" href="classsword_1_1_tree_key_idx.html">TreeKeyIdx</a> : <span class="keyword">public</span> <a class="code" href="classsword_1_1_tree_key.html">TreeKey</a> {
00037 
00038         <span class="keyword">class </span>TreeNode {
00039         <span class="keyword">public</span>:
00040                 TreeNode();
00041                 ~TreeNode();
00042                 <span class="keywordtype">void</span> clear();
00043                 __u32 offset;
00044                 __s32 parent;
00045                 __s32 next;
00046                 __s32 firstChild;
00047                 <span class="keywordtype">char</span> *name;
00048                 __u16 dsize;
00049                 <span class="keywordtype">char</span> *userData;
00050         } currentNode;
00051 
00052         <span class="keyword">static</span> <a class="code" href="classsword_1_1_s_w_class.html">SWClass</a> classdef;
00053 
00054         <span class="keywordtype">char</span> *path;
00055 
00056         FileDesc *idxfd;
00057         FileDesc *datfd;
00058 
00059         <span class="keywordtype">void</span> getTreeNodeFromDatOffset(<span class="keywordtype">long</span> ioffset, TreeNode *buf) <span class="keyword">const</span>;
00060         <span class="keywordtype">char</span> getTreeNodeFromIdxOffset(<span class="keywordtype">long</span> ioffset, TreeNode *node) <span class="keyword">const</span>;
00061         <span class="keywordtype">void</span> saveTreeNode(TreeNode *node);
00062         <span class="keywordtype">void</span> saveTreeNodeOffsets(TreeNode *node);
00063         <span class="keywordtype">void</span> init();
00064 
00065 <span class="keyword">public</span>:
00066         <a class="code" href="classsword_1_1_tree_key_idx.html">TreeKeyIdx</a>(<span class="keyword">const</span> <a class="code" href="classsword_1_1_tree_key_idx.html">TreeKeyIdx</a> &amp;ikey);
00067         <a class="code" href="classsword_1_1_tree_key_idx.html">TreeKeyIdx</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *idxPath, <span class="keywordtype">int</span> fileMode = -1);
00068         ~<a class="code" href="classsword_1_1_tree_key_idx.html">TreeKeyIdx</a> ();
00069 
00070         <span class="keyword">virtual</span> <a class="code" href="classsword_1_1_s_w_key.html">SWKey</a> *<a class="code" href="classsword_1_1_s_w_key.html#a3">clone</a>() <span class="keyword">const</span>;
00071 
00072         <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *getLocalName();
00073         <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *setLocalName(<span class="keyword">const</span> <span class="keywordtype">char</span> *);
00074 
00075         <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *getUserData(<span class="keywordtype">int</span> *size = 0);
00076         <span class="keyword">virtual</span> <span class="keywordtype">void</span> setUserData(<span class="keyword">const</span> <span class="keywordtype">char</span> *userData, <span class="keywordtype">int</span> size = 0);
00077 
00078         <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *getFullName() <span class="keyword">const</span>;
00079 
00080         <span class="keyword">virtual</span> <span class="keywordtype">void</span> root();
00081         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> parent();
00082 
00083         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> firstChild();
00084         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> nextSibling();
00085         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> previousSibling();
00086 
00087         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> hasChildren();
00088 
00089         <span class="keyword">virtual</span> <span class="keywordtype">void</span> append();
00090         <span class="keyword">virtual</span> <span class="keywordtype">void</span> appendChild();
00091         <span class="keyword">virtual</span> <span class="keywordtype">void</span> insertBefore();
00092 
00093         <span class="keyword">virtual</span> <span class="keywordtype">void</span> remove();
00094         <span class="keyword">virtual</span> <span class="keywordtype">void</span> save();
00095 
00096         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsword_1_1_s_w_key.html#a8">copyFrom</a>(<span class="keyword">const</span> <a class="code" href="classsword_1_1_tree_key_idx.html">TreeKeyIdx</a> &amp;ikey);
00097         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsword_1_1_s_w_key.html#a8">copyFrom</a>(<span class="keyword">const</span> <a class="code" href="classsword_1_1_s_w_key.html">SWKey</a> &amp; ikey);
00098 
00099         <span class="keywordtype">void</span> setOffset(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> offset);
00100         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> getOffset() <span class="keyword">const</span>;
00101 
00102 
00103 
00104         <span class="comment">// OPERATORS ------------------------------------------------------------</span>
00105 
00106 
00107         <span class="keyword">virtual</span> <a class="code" href="classsword_1_1_s_w_key.html">SWKey</a> &amp;operator = (<span class="keyword">const</span> <a class="code" href="classsword_1_1_tree_key_idx.html">TreeKeyIdx</a> &amp;ikey) { <a class="code" href="classsword_1_1_s_w_key.html#a8">copyFrom</a>(ikey); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
00108         SWKEY_OPERATORS
00109 
00110         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsword_1_1_tree_key.html#a19">setText</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *ikey);
00111         <span class="keyword">virtual</span> <span class="keywordtype">void</span> setPosition(SW_POSITION p);
00112         <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classsword_1_1_tree_key.html#a21">getText</a>() <span class="keyword">const</span>;
00113         <span class="keyword">virtual</span> <span class="keywordtype">int</span> _compare (<span class="keyword">const</span> <a class="code" href="classsword_1_1_tree_key_idx.html">TreeKeyIdx</a> &amp; ikey);
00114         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classsword_1_1_tree_key.html#a22">compare</a>(<span class="keyword">const</span> <a class="code" href="classsword_1_1_s_w_key.html">SWKey</a> &amp;ikey);
00115         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsword_1_1_tree_key.html#a23">decrement</a>(<span class="keywordtype">int</span> steps = 1);
00116         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsword_1_1_tree_key.html#a24">increment</a>(<span class="keywordtype">int</span> steps = 1);
00117         <span class="keyword">virtual</span> <span class="keywordtype">char</span> Traversable () { <span class="keywordflow">return</span> 1; }
00118 
00119         <span class="keyword">static</span> <span class="keywordtype">signed</span> <span class="keywordtype">char</span> create(<span class="keyword">const</span> <span class="keywordtype">char</span> *path);
00120 };
00121 
00122 SWORD_NAMESPACE_END
00123 
00124 <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>