The SWORD Project
1.9.0.svnversion
|
#include <treekeyidx.h>
Classes | |
class | TreeNode |
Public Member Functions | |
virtual int | _compare (const TreeKeyIdx &ikey) |
virtual void | append () |
virtual void | appendChild () |
virtual void | assureKeyPath (const char *keyPath=0) |
virtual void | clearBounds () const |
virtual SWKey * | clone () const |
virtual int | compare (const SWKey &ikey) |
virtual void | copyFrom (const TreeKeyIdx &ikey) |
virtual void | copyFrom (const SWKey &ikey) |
virtual void | decrement (int steps=1) |
virtual bool | equals (const SWKey &ikey) |
SWDEPRECATED char | Error () |
virtual bool | firstChild () |
const SWClass * | getClass () const |
virtual char | getError () const |
virtual long | getIndex () const |
virtual int | getLevel () |
char * | getLocale () const |
virtual const char * | getLocalName () |
unsigned long | getOffset () const |
virtual const char * | getOSISRefRangeText () const |
virtual const char * | getRangeText () const |
virtual const char * | getShortRangeText () const |
virtual const char * | getShortText () const |
virtual const char * | getText () const |
virtual const char * | getUserData (int *size=0) const |
virtual bool | hasChildren () |
virtual void | increment (int steps=1) |
virtual void | insertBefore () |
virtual bool | isBoundSet () const |
bool | isPersist () const |
virtual bool | isTraversable () const |
virtual bool | nextSibling () |
virtual SWKey & | operator= (const TreeKeyIdx &ikey) |
virtual bool | parent () |
SWDEPRECATED char | Persist () const |
SWDEPRECATED char | Persist (signed char ipersist) |
virtual char | popError () |
virtual void | positionFrom (const SWKey &ikey) |
virtual bool | previousSibling () |
virtual void | remove () |
virtual void | root () |
virtual void | save () |
virtual void | setError (char err) |
virtual void | setIndex (long iindex) |
void | setLocale (const char *name) |
virtual const char * | setLocalName (const char *) |
void | setOffset (unsigned long offset) |
void | setPersist (bool ipersist) |
virtual void | setPosition (SW_POSITION p) |
void | setPositionChangeListener (PositionChangeListener *pcl) |
virtual SWKEY_OPERATORS void | setText (const char *ikey) |
virtual void | setUserData (const char *userData, int size=0) |
TreeKeyIdx (const TreeKeyIdx &ikey) | |
TreeKeyIdx (const char *idxPath, int fileMode=-1) | |
virtual | ~TreeKeyIdx () |
Static Public Member Functions | |
static signed char | create (const char *path) |
Public Attributes | |
class TreeKey::PositionChangeListener * | posChangeListener |
SW_u64 | userData |
Protected Member Functions | |
SWLocale * | getPrivateLocale () const |
void | positionChanged () |
Protected Attributes | |
bool | boundSet |
char | error |
char * | keytext |
char * | localeName |
const SWClass * | myClass |
bool | persist |
char * | rangeText |
SWBuf | unsnappedKeyText |
Private Member Functions | |
void | getTreeNodeFromDatOffset (long ioffset, TreeNode *buf) const |
char | getTreeNodeFromIdxOffset (long ioffset, TreeNode *node) const |
void | init () |
void | saveTreeNode (TreeNode *node) |
void | saveTreeNodeOffsets (TreeNode *node) |
Private Attributes | |
class TreeKeyIdx::TreeNode | currentNode |
FileDesc * | datfd |
FileDesc * | idxfd |
char * | path |
Class TreeKeyIdx The TreeKey implementation used for tree-based modules in SWORD, such as GenBooks.
Definition at line 39 of file treekeyidx.h.
TreeKeyIdx::TreeKeyIdx | ( | const TreeKeyIdx & | ikey | ) |
Definition at line 41 of file treekeyidx.cpp.
TreeKeyIdx::TreeKeyIdx | ( | const char * | idxPath, |
int | fileMode = -1 |
||
) |
Definition at line 49 of file treekeyidx.cpp.
|
virtual |
Definition at line 82 of file treekeyidx.cpp.
|
virtual |
Definition at line 570 of file treekeyidx.cpp.
|
virtual |
Implements TreeKey.
Definition at line 203 of file treekeyidx.cpp.
|
virtual |
Implements TreeKey.
Definition at line 222 of file treekeyidx.cpp.
|
virtualinherited |
Set the key to this path. If the path doesn't exist, then nodes are created as necessary
keyPath | path to set/create; if unsupplied, then use any unsnapped setText value. |
Definition at line 41 of file treekey.cpp.
|
inlinevirtualinherited |
|
virtual |
Returns a new exact clone of this SWKey object. This allocates a new SWKey which must be deleted by the caller
Reimplemented from SWKey.
Definition at line 668 of file treekeyidx.cpp.
Compares this key object to another SWKey object
ikey | key to compare with this one |
Implements TreeKey.
Definition at line 575 of file treekeyidx.cpp.
|
virtual |
Definition at line 450 of file treekeyidx.cpp.
Copies as much info (position, range, etc.) as possible from another SWKey object
ikey | other SWKey object from which to copy |
Reimplemented from SWKey.
Definition at line 550 of file treekeyidx.cpp.
|
static |
Definition at line 290 of file treekeyidx.cpp.
|
virtual |
Decrements key a number of entry positions This is only valid if isTraversable is true
steps | Number of entries to jump backward |
Implements TreeKey.
Definition at line 583 of file treekeyidx.cpp.
|
inlineinherited |
|
virtual |
Go to the first child of the current node
Implements TreeKey.
Definition at line 158 of file treekeyidx.cpp.
Use this to get the class definition and inheritance order.
Definition at line 63 of file swobject.h.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
virtual |
Reimplemented from TreeKey.
Definition at line 136 of file treekeyidx.cpp.
|
virtual |
Implements TreeKey.
Definition at line 91 of file treekeyidx.cpp.
|
virtual |
Implements TreeKey.
Definition at line 410 of file treekeyidx.cpp.
|
virtualinherited |
|
protectedinherited |
Definition at line 111 of file swkey.cpp.
|
virtualinherited |
Reimplemented in VerseKey, and ListKey.
Definition at line 193 of file swkey.cpp.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
virtual |
returns string representation of this key
Implements TreeKey.
Definition at line 615 of file treekeyidx.cpp.
|
private |
Definition at line 331 of file treekeyidx.cpp.
|
private |
Definition at line 380 of file treekeyidx.cpp.
|
virtual |
Implements TreeKey.
Definition at line 97 of file treekeyidx.cpp.
|
virtual |
Does the current node have children?
Implements TreeKey.
Definition at line 198 of file treekeyidx.cpp.
|
virtual |
Increments key a number of entry positions This is only valid if isTraversable is true
steps | Number of entries to jump forward |
Implements TreeKey.
Definition at line 588 of file treekeyidx.cpp.
|
private |
Definition at line 77 of file treekeyidx.cpp.
|
virtual |
|
inlinevirtualinherited |
|
inherited |
Gets whether this key should persist in any module to which it is set otherwise just a copy will be used in the module.
|
inlinevirtual |
Whether or not this key can be ++ – incremented
Reimplemented from TreeKey.
Definition at line 119 of file treekeyidx.h.
|
virtual |
Go to the next sibling of the current node
Implements TreeKey.
Definition at line 168 of file treekeyidx.cpp.
|
inlinevirtual |
Definition at line 109 of file treekeyidx.h.
|
virtual |
Go to the parent of the current node
Implements TreeKey.
Definition at line 148 of file treekeyidx.cpp.
|
inlineinherited |
|
inlineinherited |
|
virtualinherited |
|
inlineprotectedinherited |
|
virtual |
Go to the previous sibling of the current node
Implements TreeKey.
Definition at line 178 of file treekeyidx.cpp.
|
virtual |
Implements TreeKey.
Definition at line 243 of file treekeyidx.cpp.
|
virtual |
Go to the root node
Implements TreeKey.
Definition at line 131 of file treekeyidx.cpp.
|
virtual |
Reimplemented from TreeKey.
Definition at line 126 of file treekeyidx.cpp.
|
private |
Definition at line 489 of file treekeyidx.cpp.
|
private |
Definition at line 421 of file treekeyidx.cpp.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
inlineinherited |
Definition at line 225 of file swkey.h.
Implements TreeKey.
Definition at line 119 of file treekeyidx.cpp.
|
virtual |
Implements TreeKey.
Definition at line 415 of file treekeyidx.cpp.
|
inherited |
Sets whether this key should persist in any module to which it is set otherwise just a copy will be used in the module.
ipersist | value which to set persist; |
|
virtual |
Implements TreeKey.
Definition at line 556 of file treekeyidx.cpp.
|
inlineinherited |
|
virtual |
Sets this SWKey with a character string
ikey | string used to set this key |
Implements TreeKey.
Definition at line 515 of file treekeyidx.cpp.
|
virtual |
Implements TreeKey.
Definition at line 105 of file treekeyidx.cpp.
|
private |
|
private |
Definition at line 59 of file treekeyidx.h.
|
private |
Definition at line 58 of file treekeyidx.h.
Definition at line 55 of file swobject.h.
|
private |
Definition at line 56 of file treekeyidx.h.
|
inherited |