00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
00043
00044
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