File: affentry.hxx

package info (click to toggle)
myspell 1:3.0+pre3.1-24.2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 1,228 kB
  • ctags: 436
  • sloc: cpp: 5,985; sh: 1,250; ansic: 1,176; makefile: 222; perl: 81
file content (86 lines) | stat: -rw-r--r-- 2,284 bytes parent folder | download | duplicates (22)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef _AFFIX_HXX_
#define _AFFIX_HXX_

#include "atypes.hxx"
#include "baseaffix.hxx"
#include "affixmgr.hxx"


/* A Prefix Entry  */

class PfxEntry : public AffEntry
{
       AffixMgr*    pmyMgr;

       PfxEntry * next;
       PfxEntry * nexteq;
       PfxEntry * nextne;
       PfxEntry * flgnxt;

public:

  PfxEntry(AffixMgr* pmgr, affentry* dp );
  ~PfxEntry();

  struct hentry *      check(const char * word, int len);

  inline bool          allowCross() { return ((xpflg & XPRODUCT) != 0); }
  inline unsigned char getFlag()   { return achar;   }
  inline const char *  getKey()    { return appnd;  } 
  char *               add(const char * word, int len);

  inline PfxEntry *    getNext()   { return next;   }
  inline PfxEntry *    getNextNE() { return nextne; }
  inline PfxEntry *    getNextEQ() { return nexteq; }
  inline PfxEntry *    getFlgNxt() { return flgnxt; }

  inline void   setNext(PfxEntry * ptr)   { next = ptr;   }
  inline void   setNextNE(PfxEntry * ptr) { nextne = ptr; }
  inline void   setNextEQ(PfxEntry * ptr) { nexteq = ptr; }
  inline void   setFlgNxt(PfxEntry * ptr) { flgnxt = ptr; }
};




/* A Suffix Entry */

class SfxEntry : public AffEntry
{
       AffixMgr*    pmyMgr;
       char *       rappnd;

       SfxEntry *   next;
       SfxEntry *   nexteq;
       SfxEntry *   nextne;
       SfxEntry *   flgnxt;

public:

  SfxEntry(AffixMgr* pmgr, affentry* dp );
  ~SfxEntry();

  struct hentry *   check(const char * word, int len, int optflags, 
                                                       AffEntry* ppfx);

  inline bool          allowCross() { return ((xpflg & XPRODUCT) != 0); }
  inline unsigned char getFlag()   { return achar;   }
  inline const char *  getKey()    { return rappnd; } 
  char *               add(const char * word, int len);

  inline SfxEntry *    getNext()   { return next;   }
  inline SfxEntry *    getNextNE() { return nextne; }
  inline SfxEntry *    getNextEQ() { return nexteq; }
  inline SfxEntry *    getFlgNxt() { return flgnxt; }

  inline void   setNext(SfxEntry * ptr)   { next = ptr;   }
  inline void   setNextNE(SfxEntry * ptr) { nextne = ptr; }
  inline void   setNextEQ(SfxEntry * ptr) { nexteq = ptr; }
  inline void   setFlgNxt(SfxEntry * ptr) { flgnxt = ptr; }

};


#endif