versetreekey.h

00001 /******************************************************************************
00002  *      versekey.h - code for class 'versekey'- a standard Biblical verse key
00003  *
00004  * $Id: versekey.h 1864 2005-11-20 06:06:40Z scribe $
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 VERSETREEKEY_H
00024 #define VERSETREEKEY_H
00025 
00026 #include <versekey.h>
00027 #include <treekey.h>
00028 #include <swmacs.h>
00029 #include <listkey.h>
00030 
00031 #include <defs.h>
00032 
00033 SWORD_NAMESPACE_START
00034 
00039 class SWDLLEXPORT VerseTreeKey : public VerseKey {
00040 
00041         static SWClass classdef;
00042         TreeKey *treeKey;
00043 
00044 public:
00045 
00052         VerseTreeKey(TreeKey *treeKey, const char *ikey = 0);
00053         
00060         VerseTreeKey(TreeKey *treeKey, const SWKey *ikey);
00061         
00068         VerseTreeKey(TreeKey *treeKey, const char *min, const char *max);
00069         
00075         VerseTreeKey(const VerseTreeKey &k);
00076         
00080         virtual ~VerseTreeKey();
00081 
00085         virtual SWKey *clone() const;
00086         
00087         virtual bool isTraversable() const { return true; }
00088 
00089         virtual TreeKey *getTreeKey() { return treeKey; }
00090         
00091 
00092         // OPERATORS --------------------------------------------------------------------
00093 
00094 
00095         SWKEY_OPERATORS
00096 
00097         virtual SWKey & operator = (const VerseKey & ikey) { copyFrom(ikey); return *this; }
00098 };
00099 
00100 SWORD_NAMESPACE_END
00101 
00102 #endif //VERSETREEKEY_H