35 #define KEYERR_OUTOFBOUNDS 1
37 #define SWKEY_OPERATORS \
38 SWKey &operator =(const char *ikey) { setText(ikey); return *this; } \
39 SWKey &operator =(const SWKey &ikey) { positionFrom(ikey); return *this; } \
40 SWKey &operator =(SW_POSITION pos) { setPosition(pos); return *this; } \
41 operator const char *() const { return getText(); } \
42 bool operator ==(const SWKey &ikey) { return equals(ikey); } \
43 bool operator !=(const SWKey &ikey) { return !equals(ikey); } \
44 virtual bool operator >(const SWKey &ikey) { return (compare(ikey) > 0); } \
45 virtual bool operator <(const SWKey &ikey) { return (compare(ikey) < 0); } \
46 virtual bool operator >=(const SWKey &ikey) { return (compare(ikey) > -1); } \
47 virtual bool operator <=(const SWKey &ikey) { return (compare(ikey) < 1); } \
48 SWKey &operator -=(int steps) { decrement(steps); return *this; } \
49 SWKey &operator +=(int steps) { increment(steps); return *this; } \
50 SWKey &operator ++() { increment(1); return *this; } \
51 SWKey operator ++(int) { SWKey temp = *this; increment(1); return temp; } \
52 SWKey &operator --() { decrement(1); return *this; } \
53 SWKey operator --(int) { SWKey temp = *this; decrement(1); return temp; }
62 operator char() {
return pos; }
65 #define POS_TOP ((char)1)
66 #define POS_BOTTOM ((char)2)
68 #define TOP SW_POSITION(POS_TOP)
69 #define BOTTOM SW_POSITION(POS_BOTTOM)
122 SWKey(
const char *ikey = 0);
137 virtual SWKey *clone()
const;
144 bool isPersist()
const;
154 void setPersist(
bool ipersist);
163 virtual char popError();
174 virtual void setText(
const char *ikey);
179 virtual void copyFrom(
const SWKey &ikey);
184 virtual const char *getText()
const;
186 virtual const char *getRangeText()
const;
188 virtual const char *getOSISRefRangeText()
const;
198 virtual int compare(
const SWKey &ikey);
212 virtual void decrement(
int steps = 1);
218 virtual void increment(
int steps = 1);
233 virtual void setIndex(
long iindex) { index = iindex; }
virtual bool isBoundSet() const
#define SWORD_NAMESPACE_START
virtual const char * getShortRangeText() const
virtual const char * getShortText() const
virtual void setIndex(long iindex)
SWDEPRECATED char Persist(signed char ipersist)
virtual bool equals(const SWKey &ikey)
virtual void positionFrom(const SWKey &ikey)
virtual void clearBounds() const
SWORD_NAMESPACE_START char * stdstr(char **ipstr, const char *istr, unsigned int memPadFactor=1)
unsigned long long SW_u64
SWDEPRECATED char Error()
static LocaleCache localeCache
virtual void setError(char err)
virtual bool isTraversable() const
#define SWORD_NAMESPACE_END
virtual char getError() const
virtual long getIndex() const
void setLocale(const char *name)
SWDEPRECATED char Persist() const