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

treekey.h

00001 /******************************************************************************
00002  *  versekey.h - code for class 'versekey'- a standard Biblical verse key
00003  *
00004  * $Id: treekey_8h-source.html,v 1.5 2002/10/31 11:30:16 joachim Exp $
00005  *
00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
00007  *      CrossWire Bible Society
00008  *      P. O. Box 2528
00009  *      Tempe, AZ  85280-2528
00010  *
00011  * This program is free software; you can redistribute it and/or modify it
00012  * under the terms of the GNU General Public License as published by the
00013  * Free Software Foundation version 2.
00014  *
00015  * This program is distributed in the hope that it will be useful, but
00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * General Public License for more details.
00019  *
00020  */
00021 
00022 
00023 #ifndef TREEKEY_H
00024 #define TREEKEY_H
00025 
00026 #include <swkey.h>
00027 #include <swmacs.h>
00028 
00029 #include <defs.h>
00030 
00031 SWORD_NAMESPACE_START
00032 
00037 class SWDLLEXPORT TreeKey : public SWKey {
00038         static SWClass classdef;
00039         void init();
00040 
00041 public:
00042 //      TreeKey (const char *ikey = 0);
00043 //      TreeKey (const SWKey * ikey);
00044 //      TreeKey (TreeKey const &k);
00045         TreeKey () { init(); };
00046         ~TreeKey () {};
00047 
00048 
00049         virtual const char *getLocalName() = 0;
00050         virtual const char *setLocalName(const char *) = 0;
00051 
00052         virtual const char *getUserData(int *size = 0) = 0;
00053         virtual void setUserData(const char *userData, int size = 0) = 0;
00054 
00055         virtual const char *getFullName() const = 0;
00056 
00057         virtual void root() = 0;
00058         virtual bool parent() = 0;
00059 
00060         virtual bool firstChild() = 0;
00061         virtual bool nextSibling() = 0;
00062         virtual bool previousSibling() = 0;
00063 
00064         virtual bool hasChildren() = 0;
00065 
00066         virtual void append() = 0;
00067         virtual void appendChild() = 0;
00068         virtual void insertBefore() = 0;
00069 
00070         virtual void remove() = 0;
00071 
00072         virtual void setOffset(unsigned long offset) = 0;
00073         virtual unsigned long getOffset() const = 0;
00074 
00075         virtual void setText(const char *ikey) = 0;
00076         virtual void setPosition(SW_POSITION p) = 0;
00077         virtual const char *getText() const = 0;
00078         virtual int compare(const SWKey &ikey) = 0;
00079         virtual void decrement(int steps = 1) = 0;
00080         virtual void increment(int steps = 1) = 0;
00081         virtual char Traversable () { return 1; }
00082         virtual long Index () const { return getOffset(); }
00083         virtual long Index (long iindex) { setOffset(iindex); return getOffset(); }
00084 
00085         SWKEY_OPERATORS
00086 
00087         };
00088 
00089 SWORD_NAMESPACE_END
00090 #endif

Generated on Thu Oct 31 12:11:28 2002 for The Sword Project by doxygen1.2.17