ListKey Class Reference
#include <listkey.h>
List of all members.
Detailed Description
ListKey is the basis for all types of keys that have lists of specified indexes (e.g. a list of verses, place, etc.)
Definition at line 38 of file listkey.h.
Constructor & Destructor Documentation
| ListKey::ListKey |
( |
const char * |
ikey = 0 |
) |
|
| ListKey::ListKey |
( |
ListKey const & |
k |
) |
|
| ListKey::~ListKey |
( |
|
) |
[virtual] |
Member Function Documentation
| void ListKey::add |
( |
const SWKey & |
ikey |
) |
[virtual] |
| void ListKey::clear |
( |
|
) |
[virtual] |
Clears out elements of list
Definition at line 85 of file listkey.cpp.
| virtual void SWKey::clearBound |
( |
|
) |
const [inline, virtual, inherited] |
| virtual void ListKey::ClearList |
( |
|
) |
[inline, virtual] |
| SWKey * ListKey::clone |
( |
|
) |
const [virtual] |
Returns a new exact clone of this SWKey object. This allocates a new SWKey which must be deleted by the caller
- Returns:
- new clone of this key
Reimplemented from SWKey.
Definition at line 66 of file listkey.cpp.
00067 {
00068 return new ListKey(*this);
00069 }
| int SWKey::compare |
( |
const SWKey & |
ikey |
) |
[virtual, inherited] |
Compares this key object to another SWKey object
- Parameters:
-
| ikey | key to compare with this one |
- Returns:
- >0 if this key is greater than compare key; <0 if this key is smaller than compare key; 0 if the keys are the same
Definition at line 217 of file swkey.cpp.
00218 {
00219 return strcmp((const char *)*this, (const char *)ikey);
00220 }
| virtual void ListKey::copyFrom |
( |
const SWKey & |
ikey |
) |
[inline, virtual] |
| void ListKey::copyFrom |
( |
const ListKey & |
ikey |
) |
[virtual] |
| int ListKey::Count |
( |
|
) |
[virtual] |
Returns number of elements in list
- Returns:
- number of elements in list
Definition at line 209 of file listkey.cpp.
| void ListKey::decrement |
( |
int |
step = 1 |
) |
[virtual] |
Decrements a number of elements
Reimplemented from SWKey.
Definition at line 185 of file listkey.cpp.
| virtual bool SWKey::equals |
( |
const SWKey & |
ikey |
) |
[inline, virtual, inherited] |
test equality of this SWKey object's position with another SWKey
- Parameters:
-
| ikey | key to compare with this one |
- Returns:
- true if the key positions are equal
Definition at line 195 of file swkey.h.
| SWDEPRECATED char SWKey::Error |
( |
|
) |
[inline, inherited] |
Gets and clears error status
- Returns:
- error status
Definition at line 159 of file swkey.h.
| const SWClass* SWObject::getClass |
( |
|
) |
const [inline, inherited] |
Use this to get the class definition and inheritance order.
- Returns:
- The class definition of this object
Definition at line 59 of file swobject.h.
00059 {
00060 return myclass;
00061 }
| virtual SWKey* ListKey::GetElement |
( |
int |
pos = -1 |
) |
[inline, virtual] |
| SWKey * ListKey::getElement |
( |
int |
pos = -1 |
) |
[virtual] |
Gets a key element number
- Parameters:
-
| pos | element number to get (or default current) |
- Returns:
- Key or null on error
Definition at line 257 of file listkey.cpp.
| virtual long ListKey::getIndex |
( |
|
) |
const [inline, virtual] |
Use this function to get an index position within a module.
Reimplemented from SWKey.
Definition at line 127 of file listkey.h.
| char* SWKey::getLocale |
( |
|
) |
const [inline, inherited] |
| const char * ListKey::getOSISRefRangeText |
( |
|
) |
const [virtual] |
| SWLocale * SWKey::getPrivateLocale |
( |
|
) |
const [protected, inherited] |
| const char * ListKey::getRangeText |
( |
|
) |
const [virtual] |
| const char * ListKey::getShortText |
( |
|
) |
const [virtual] |
| const char * ListKey::getText |
( |
|
) |
const [virtual] |
returns string representation of this key
Reimplemented from SWKey.
Definition at line 324 of file listkey.cpp.
| void ListKey::increment |
( |
int |
step = 1 |
) |
[virtual] |
Increments a number of elements
Reimplemented from SWKey.
Definition at line 161 of file listkey.cpp.
| void ListKey::init |
( |
|
) |
[private] |
| virtual bool SWKey::isBoundSet |
( |
|
) |
const [inline, virtual, inherited] |
| bool SWKey::isPersist |
( |
|
) |
const [inherited] |
Gets whether this key should persist in any module to which it is set otherwise just a copy will be used in the module.
- Returns:
- 1 - persists in module; 0 - a copy is attempted
Definition at line 98 of file swkey.cpp.
00099 {
00100 return persist;
00101 }
| virtual bool ListKey::isTraversable |
( |
|
) |
const [inline, virtual] |
Whether or not this key can be ++ -- incremented
Reimplemented from SWKey.
Definition at line 126 of file listkey.h.
| ListKey& ListKey::operator<< |
( |
const SWKey & |
ikey |
) |
[inline] |
Adds an element to the list
- Parameters:
-
Definition at line 101 of file listkey.h.
00101 { add(ikey); return *this; }
| SWKEY_OPERATORS ListKey& ListKey::operator= |
( |
const ListKey & |
key |
) |
[inline] |
| SWDEPRECATED char SWKey::Persist |
( |
signed char |
ipersist |
) |
[inline, inherited] |
Sets whether this key should persist in any module to which it is set otherwise just a copy will be used in the module.
- Parameters:
-
| ipersist | value which to set persist; |
- Returns:
- 1 - persists in module; 0 - a copy is attempted
Definition at line 153 of file swkey.h.
| SWDEPRECATED char SWKey::Persist |
( |
|
) |
const [inline, inherited] |
| char SWKey::popError |
( |
|
) |
[virtual, inherited] |
Definition at line 146 of file swkey.cpp.
00147 {
00148 char retval = error;
00149
00150 error = 0;
00151 return retval;
00152 }
| virtual void SWKey::positionFrom |
( |
const SWKey & |
ikey |
) |
[inline, virtual, inherited] |
| void ListKey::Remove |
( |
|
) |
[virtual] |
Removes current element from list
Definition at line 272 of file listkey.cpp.
| virtual void SWKey::setError |
( |
char |
err |
) |
[inline, virtual, inherited] |
| virtual void ListKey::setIndex |
( |
long |
index |
) |
[inline, virtual] |
Returns the index for the new one given as as parameter. The first parameter is the new index.
Reimplemented from SWKey.
Definition at line 136 of file listkey.h.
| void SWKey::setLocale |
( |
const char * |
name |
) |
[inline, inherited] |
| void SWKey::setPersist |
( |
bool |
ipersist |
) |
[inherited] |
| void ListKey::setPosition |
( |
SW_POSITION |
pos |
) |
[virtual] |
Positions this key
- Parameters:
-
- Returns:
- *this
Reimplemented from SWKey.
Definition at line 145 of file listkey.cpp.
| void ListKey::setText |
( |
const char * |
ikey |
) |
[virtual] |
Sets this SWKey with a character string
- Parameters:
-
| ikey | string used to set this key |
Reimplemented from SWKey.
Definition at line 337 of file listkey.cpp.
| char ListKey::SetToElement |
( |
int |
ielement, |
|
|
SW_POSITION |
pos = TOP | |
|
) |
| | [virtual] |
Sets key to element number
- Parameters:
-
| ielement | element number to set to |
- Returns:
- error status
Definition at line 222 of file listkey.cpp.
| void ListKey::sort |
( |
|
) |
[virtual] |
Member Data Documentation
The documentation for this class was generated from the following files: