Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

sword::TreeKeyIdx Class Reference

Class VerseKey The SWKey implementation used for verse based modules like Bibles or commentaries. More...

#include <treekeyidx.h>

Inheritance diagram for sword::TreeKeyIdx:

Inheritance graph
[legend]
Collaboration diagram for sword::TreeKeyIdx:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TreeKeyIdx (const TreeKeyIdx &ikey)
 TreeKeyIdx (const char *idxPath, int fileMode=-1)
virtual SWKeyclone () const
 Returns a copy of this SWKey object.

virtual const char * getLocalName ()
virtual const char * setLocalName (const char *)
virtual const char * getUserData (int *size=0)
virtual void setUserData (const char *userData, int size=0)
virtual const char * getFullName () const
virtual void root ()
virtual bool parent ()
virtual bool firstChild ()
virtual bool nextSibling ()
virtual bool previousSibling ()
virtual bool hasChildren ()
virtual void append ()
virtual void appendChild ()
virtual void insertBefore ()
virtual void remove ()
virtual void save ()
virtual void copyFrom (const TreeKeyIdx &ikey)
virtual void copyFrom (const SWKey &ikey)
 Equates this SWKey to another SWKey object.

void setOffset (unsigned long offset)
unsigned long getOffset () const
virtual SWKeyoperator= (const TreeKeyIdx &ikey)
SWKeyoperator= (const char *ikey)
SWKeyoperator= (const SWKey &ikey)
SWKeyoperator= (SW_POSITION pos)
 operator const char * () const
bool operator== (const SWKey &ikey)
bool operator!= (const SWKey &ikey)
virtual bool operator> (const SWKey &ikey)
virtual bool operator< (const SWKey &ikey)
virtual bool operator>= (const SWKey &ikey)
virtual bool operator<= (const SWKey &ikey)
SWKeyoperator-= (int steps)
SWKeyoperator+= (int steps)
SWKeyoperator++ (int)
SWKeyoperator-- (int)
virtual void setText (const char *ikey)
 Equates this SWKey to a character string.

virtual void setPosition (SW_POSITION p)
virtual const char * getText () const
 returns text key if (char *) cast is requested

virtual int _compare (const TreeKeyIdx &ikey)
virtual int compare (const SWKey &ikey)
 Compares another VerseKey object.

virtual void decrement (int steps=1)
 Decrements key a number of entries.

virtual void increment (int steps=1)
 Increments key a number of entries.

virtual char Traversable ()

Static Public Member Functions

signed char create (const char *path)

Private Member Functions

void getTreeNodeFromDatOffset (long ioffset, TreeNode *buf) const
char getTreeNodeFromIdxOffset (long ioffset, TreeNode *node) const
void saveTreeNode (TreeNode *node)
void saveTreeNodeOffsets (TreeNode *node)
void init ()

Private Attributes

sword::TreeKeyIdx::TreeNode currentNode
char * path
FileDesc * idxfd
FileDesc * datfd

Static Private Attributes

SWClass classdef

Detailed Description

Class VerseKey The SWKey implementation used for verse based modules like Bibles or commentaries.


Member Function Documentation

SWKey * sword::TreeKeyIdx::clone   const [virtual]
 

Returns a copy of this SWKey object.

This is useful to get a 1:1 copy of an SWKey based object.

Returns:
SWKey

Reimplemented from sword::SWKey.

int sword::TreeKeyIdx::compare const SWKey   ikey [virtual]
 

Compares another VerseKey object.

Parameters:
ikey key to compare with this one
Returns:
>0 if this key is greater than compare key; <0 if this key is smaller than compare key; 0 if the keys are the same

Implements sword::TreeKey.

void sword::TreeKeyIdx::copyFrom const SWKey   ikey [virtual]
 

Equates this SWKey to another SWKey object.

Parameters:
ikey other swkey object

Reimplemented from sword::SWKey.

void sword::TreeKeyIdx::decrement int    steps = 1 [virtual]
 

Decrements key a number of entries.

Parameters:
steps Number of entries to jump backward
Returns:
*this

Implements sword::TreeKey.

void sword::TreeKeyIdx::increment int    steps = 1 [virtual]
 

Increments key a number of entries.

Parameters:
steps Number of entries to jump forward
Returns:
*this

Implements sword::TreeKey.

void sword::TreeKeyIdx::setText const char *    ikey [virtual]
 

Equates this SWKey to a character string.

Parameters:
ikey string to set this key to

Implements sword::TreeKey.


The documentation for this class was generated from the following files:
Generated on Fri Feb 28 22:01:47 2003 for The Sword Project by doxygen1.3-rc3