highlighter application  1.1
HCE project utils : highlighter
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
SymbolInfo.hpp
Go to the documentation of this file.
1 /*
2  * SymbolInfo.hpp
3  *
4  * Created on: Dec 19, 2012
5  * Author: handler
6  */
7 
8 #ifndef SYMBOLINFO_HPP
9 #define SYMBOLINFO_HPP
10 
11 
13 #include "Defs.hpp"
14 
15 
16 namespace HCE {
17 
18 namespace component {
19 
20 
21 typedef unsigned char SymbolType;
22 //typedef unsigned int LanguageMask;
23 typedef unsigned char AlgorithmType;
24 typedef unsigned short Language;
25 //typedef unsigned short POSMask;
26 
27 // The list of supported languages
28 /*
29 enum Language_enum
30 {
31  ENGLISH = 0,
32  JAPANESE,
33  RUSSIAN,
34  UKRAINIAN,
35  BYELORUSSIAN = UKRAINIAN,
36  GERMAN,
37  FRENCH,
38  THAI
39 };
40 
41 enum LanguageMask_enum
42 {
43  LM_NONE = 0,
44 
45  LM_ENGLISH = 1 << ENGLISH,
46  LM_JAPANESE = 1 << JAPANESE,
47  LM_RUSSIAN = 1 << RUSSIAN,
48  LM_UKRAINIAN = 1 << UKRAINIAN,
49  LM_BYELORUSSIAN = 1 << BYELORUSSIAN,
50  LM_GERMAN = 1 << GERMAN,
51  LM_FRENCH = 1 << FRENCH,
52  LM_THAI = 1 << THAI,
53 
54  LM_ALL = (LanguageMask) (-1)
55 };
56 */
57 
59 {
60  SI_COMMON = 0,
63 };
64 
65 
66 class SymbolInfo {
67 public:
68  SymbolInfo();
69  virtual ~SymbolInfo();
70 
72 public:
73  inline const LanguageMask& getMask() const { return _mask; }
74  inline const SymbolType& getType() const { return _type; }
75  inline const CHAR_TYPE& getUpper() const { return _upper; }
76  inline const CHAR_TYPE& getLower() const { return _lower; }
78 public:
79  inline void setType(const SymbolType& type) { _type = type; }
80  inline const LanguageMask& setMask(const LanguageMask& mask) { return _mask = mask; }
81  inline const CHAR_TYPE& setUpper(const CHAR_TYPE& upper) { return _upper = upper; }
82  inline const CHAR_TYPE& setLower(const CHAR_TYPE& lower) { return _lower = lower; }
83 private:
84  LanguageMask _mask;
85  SymbolType _type;
86  CHAR_TYPE _upper;
87  CHAR_TYPE _lower;
88 
89 };
90 
91 }
92 } /* namespace HCE */
93 #endif /* SYMBOLINFO_H_ */