Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   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.1 2002/04/03 20:54:08 mgruner 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 
00036 class SWDLLEXPORT TreeKey : public SWKey {
00037         static SWClass classdef;
00038 
00039 public:
00040 //      TreeKey (const char *ikey = 0);
00041 //      TreeKey (const SWKey * ikey);
00042 //      TreeKey (TreeKey const &k);
00043         TreeKey () {};
00044         ~TreeKey () {};
00045 
00046 
00047         virtual const char *getLocalName() = 0;
00048         virtual const char *setLocalName(const char *) = 0;
00049 
00050         virtual const char *getUserData(int *size = 0) = 0;
00051         virtual void setUserData(const char *userData, int size = 0) = 0;
00052 
00053         virtual const char *getFullName() const = 0;
00054 
00055         virtual void root() = 0;
00056         virtual bool parent() = 0;
00057 
00058         virtual bool firstChild() = 0;
00059         virtual bool nextSibling() = 0;
00060         virtual bool previousSibling() = 0;
00061 
00062         virtual bool hasChildren() = 0;
00063 
00064         virtual void append() = 0;
00065         virtual void appendChild() = 0;
00066         virtual void insertBefore() = 0;
00067 
00068         virtual void remove() = 0;
00069 
00070         virtual void setOffset(unsigned long offset) = 0;
00071         virtual unsigned long getOffset() const = 0;
00072 
00073         virtual void setText(const char *ikey) = 0;
00074         virtual void setPosition(SW_POSITION p) = 0;
00075         virtual const char *getText() const = 0;
00076         virtual int compare(const SWKey &ikey) = 0;
00077         virtual void decrement(int steps = 1) = 0;
00078         virtual void increment(int steps = 1) = 0;
00079         virtual char Traversable () { return 1; }
00080         virtual long Index () const { return getOffset(); }
00081         virtual long Index (long iindex) { setOffset(iindex); return getOffset(); }
00082 
00083         SWKEY_OPERATORS
00084 
00085         };
00086 
00087 
00088 #endif

Generated on Wed Apr 3 22:34:15 2002 for The Sword Project by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002