summaryrefslogtreecommitdiff
path: root/include/listkey.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/listkey.h')
-rw-r--r--include/listkey.h50
1 files changed, 31 insertions, 19 deletions
diff --git a/include/listkey.h b/include/listkey.h
index 2c0a611..a388a06 100644
--- a/include/listkey.h
+++ b/include/listkey.h
@@ -1,12 +1,12 @@
/******************************************************************************
- * listkey.h - code for base class 'listkey'. listkey is the basis for all
- * types of keys for indexing into modules
- * (e.g. verse, word,
- * place, etc.)
*
- * $Id: listkey.h 2195 2008-09-11 00:20:58Z scribe $
+ * listkey.h - code for base class 'listkey'. listkey is the basis for all
+ * types of keys for indexing into modules
+ * (e.g. verse, word, place, etc.)
*
- * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
+ * $Id: listkey.h 2893 2013-07-16 03:07:02Z scribe $
+ *
+ * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
* P. O. Box 2528
* Tempe, AZ 85280-2528
@@ -64,26 +64,36 @@ public:
/** Clears out elements of list
*/
virtual void clear();
+ // deprecated, use clear(), instead
+ SWDEPRECATED virtual void ClearList() { clear(); }
- /** deprecated, use clear(), instead
- */
- virtual void ClearList() { clear(); }
- /** Returns number of elements in list
- * @return number of elements in list
+ /** Returns number of key elements in list
+ * @return number of key elements in list
*/
- virtual int Count();
+ virtual int getCount() const;
+ //deprecated, use getCount
+ SWDEPRECATED virtual int Count() { return getCount(); }
/** Removes current element from list
*/
- virtual void Remove();
+ virtual void remove();
+ // deprecated use remove
+ SWDEPRECATED virtual void Remove() { remove(); }
+
- /** Sets key to element number
+ /** Sets container to subkey element number and repositions that subkey to either top or bottom
*
- * @param ielement element number to set to
+ * @param ielement - element number to set to
+ * @param pos - set the subkey element to position (TOP) or BOTTOM
* @return error status
+ * deprecated use setToElement
*/
- virtual char SetToElement(int ielement, SW_POSITION = TOP);
+ virtual char setToElement(int ielement, SW_POSITION = TOP);
+ // deprecated use setToElement
+ SWDEPRECATED virtual char SetToElement(int ielement, SW_POSITION pos = TOP) { return setToElement(ielement, pos); }
+
+
/** Gets a key element number
*
@@ -91,9 +101,10 @@ public:
* @return Key or null on error
*/
virtual SWKey *getElement(int pos = -1);
+ virtual const SWKey *getElement(int pos = -1) const;
// deprecated, use above function
- virtual SWKey *GetElement(int pos = -1) { return getElement(pos); }
+ SWDEPRECATED virtual SWKey *GetElement(int pos = -1) { return getElement(pos); }
/** Adds an element to the list
* @param ikey the element to add
@@ -124,15 +135,16 @@ public:
virtual void increment(int step = 1);
virtual bool isTraversable() const { return true; }
- virtual long Index() const { return arraypos; }
+ virtual long getIndex() const { return arraypos; }
virtual const char *getRangeText() const;
virtual const char *getOSISRefRangeText() const;
+ virtual const char *getShortText() const;
/**
* Returns the index for the new one given as as parameter.
* The first parameter is the new index.
*/
- virtual long Index(long index) { SetToElement(index); return Index (); }
+ virtual void setIndex(long index) { setToElement(index); }
virtual const char *getText() const;
virtual void setText(const char *ikey);
virtual void sort();