| OLD | NEW |
| (Empty) |
| 1 #ifndef _AFFIX_HXX_ | |
| 2 #define _AFFIX_HXX_ | |
| 3 | |
| 4 #include "hunvisapi.h" | |
| 5 | |
| 6 #include "atypes.hxx" | |
| 7 #include "baseaffix.hxx" | |
| 8 #include "affixmgr.hxx" | |
| 9 | |
| 10 /* A Prefix Entry */ | |
| 11 | |
| 12 class LIBHUNSPELL_DLL_EXPORTED PfxEntry : protected AffEntry | |
| 13 { | |
| 14 AffixMgr* pmyMgr; | |
| 15 | |
| 16 PfxEntry * next; | |
| 17 PfxEntry * nexteq; | |
| 18 PfxEntry * nextne; | |
| 19 PfxEntry * flgnxt; | |
| 20 | |
| 21 public: | |
| 22 | |
| 23 PfxEntry(AffixMgr* pmgr, affentry* dp ); | |
| 24 ~PfxEntry(); | |
| 25 | |
| 26 inline bool allowCross() { return ((opts & aeXPRODUCT) != 0); } | |
| 27 struct hentry * checkword(const char * word, int len, char in_compound, | |
| 28 const FLAG needflag = FLAG_NULL); | |
| 29 | |
| 30 struct hentry * check_twosfx(const char * word, int len, char in_compound
, const FLAG needflag = NULL); | |
| 31 | |
| 32 char * check_morph(const char * word, int len, char in_compound, | |
| 33 const FLAG needflag = FLAG_NULL); | |
| 34 | |
| 35 char * check_twosfx_morph(const char * word, int len, | |
| 36 char in_compound, const FLAG needflag = FLAG_NULL); | |
| 37 | |
| 38 inline FLAG getFlag() { return aflag; } | |
| 39 inline const char * getKey() { return appnd; } | |
| 40 char * add(const char * word, int len); | |
| 41 | |
| 42 inline short getKeyLen() { return appndl; } | |
| 43 | |
| 44 inline const char * getMorph() { return morphcode; } | |
| 45 | |
| 46 inline const unsigned short * getCont() { return contclass; } | |
| 47 inline short getContLen() { return contclasslen; } | |
| 48 | |
| 49 inline PfxEntry * getNext() { return next; } | |
| 50 inline PfxEntry * getNextNE() { return nextne; } | |
| 51 inline PfxEntry * getNextEQ() { return nexteq; } | |
| 52 inline PfxEntry * getFlgNxt() { return flgnxt; } | |
| 53 | |
| 54 inline void setNext(PfxEntry * ptr) { next = ptr; } | |
| 55 inline void setNextNE(PfxEntry * ptr) { nextne = ptr; } | |
| 56 inline void setNextEQ(PfxEntry * ptr) { nexteq = ptr; } | |
| 57 inline void setFlgNxt(PfxEntry * ptr) { flgnxt = ptr; } | |
| 58 | |
| 59 inline char * nextchar(char * p); | |
| 60 inline int test_condition(const char * st); | |
| 61 }; | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 /* A Suffix Entry */ | |
| 67 | |
| 68 class LIBHUNSPELL_DLL_EXPORTED SfxEntry : protected AffEntry | |
| 69 { | |
| 70 AffixMgr* pmyMgr; | |
| 71 char * rappnd; | |
| 72 | |
| 73 SfxEntry * next; | |
| 74 SfxEntry * nexteq; | |
| 75 SfxEntry * nextne; | |
| 76 SfxEntry * flgnxt; | |
| 77 | |
| 78 SfxEntry * l_morph; | |
| 79 SfxEntry * r_morph; | |
| 80 SfxEntry * eq_morph; | |
| 81 | |
| 82 public: | |
| 83 | |
| 84 SfxEntry(AffixMgr* pmgr, affentry* dp ); | |
| 85 ~SfxEntry(); | |
| 86 | |
| 87 inline bool allowCross() { return ((opts & aeXPRODUCT) != 0); } | |
| 88 struct hentry * checkword(const char * word, int len, int optflags, | |
| 89 PfxEntry* ppfx, char ** wlst, int maxSug, int * ns, | |
| 90 // const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_
NULL, char in_compound=IN_CPD_NOT); | |
| 91 const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NU
LL, const FLAG badflag = 0); | |
| 92 | |
| 93 struct hentry * check_twosfx(const char * word, int len, int optflags, PfxEn
try* ppfx, const FLAG needflag = NULL); | |
| 94 | |
| 95 char * check_twosfx_morph(const char * word, int len, int optflags, | |
| 96 PfxEntry* ppfx, const FLAG needflag = FLAG_NULL); | |
| 97 struct hentry * get_next_homonym(struct hentry * he); | |
| 98 struct hentry * get_next_homonym(struct hentry * word, int optflags, PfxEntry*
ppfx, | |
| 99 const FLAG cclass, const FLAG needflag); | |
| 100 | |
| 101 | |
| 102 inline FLAG getFlag() { return aflag; } | |
| 103 inline const char * getKey() { return rappnd; } | |
| 104 char * add(const char * word, int len); | |
| 105 | |
| 106 | |
| 107 inline const char * getMorph() { return morphcode; } | |
| 108 | |
| 109 inline const unsigned short * getCont() { return contclass; } | |
| 110 inline short getContLen() { return contclasslen; } | |
| 111 inline const char * getAffix() { return appnd; } | |
| 112 | |
| 113 inline short getKeyLen() { return appndl; } | |
| 114 | |
| 115 inline SfxEntry * getNext() { return next; } | |
| 116 inline SfxEntry * getNextNE() { return nextne; } | |
| 117 inline SfxEntry * getNextEQ() { return nexteq; } | |
| 118 | |
| 119 inline SfxEntry * getLM() { return l_morph; } | |
| 120 inline SfxEntry * getRM() { return r_morph; } | |
| 121 inline SfxEntry * getEQM() { return eq_morph; } | |
| 122 inline SfxEntry * getFlgNxt() { return flgnxt; } | |
| 123 | |
| 124 inline void setNext(SfxEntry * ptr) { next = ptr; } | |
| 125 inline void setNextNE(SfxEntry * ptr) { nextne = ptr; } | |
| 126 inline void setNextEQ(SfxEntry * ptr) { nexteq = ptr; } | |
| 127 inline void setFlgNxt(SfxEntry * ptr) { flgnxt = ptr; } | |
| 128 | |
| 129 inline char * nextchar(char * p); | |
| 130 inline int test_condition(const char * st, const char * begin); | |
| 131 | |
| 132 }; | |
| 133 | |
| 134 #endif | |
| 135 | |
| 136 | |
| OLD | NEW |