OSDN Git Service

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