highlighter application  1.1
HCE project utils : highlighter
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
CWords.hpp
Go to the documentation of this file.
1 #ifndef CWORDS_HPP
2 #define CWORDS_HPP
3 
4 
5 #include <string>
6 
8 #include "POSMaskBitset.hpp"
9 #include "Defs.hpp"
10 
11 
12 namespace HCE
13 {
14 
15  class CWords
16  {
17  private:
18  unsigned long long _id;
19  unsigned char _black;
21  unsigned int _hCrc32;
22  unsigned int _offset;
23  unsigned int _sentenceNumber;
24  unsigned char _lingIntegrity;
25  unsigned int _initWordLen;
26  std::string _normWord;
27  std::string _originWord;
28  unsigned short _posMask;
29  WORD_TYPE _wordType;
30  //POSMaskBitset<POS_NUM> _posMask;
31  public:
32  //enum { UNDEFINED=0, DELIMITER, WORD, NUMBER, PUNCTUATION };
33  public:
35  : _id(0)
36  , _black(0)
37  , _simClass()
38  , _hCrc32(0)
39  , _offset(0)
40  , _sentenceNumber(0)
41  , _lingIntegrity(0)
42  , _initWordLen(0)
43  , _normWord()
44  , _wordType(WORD_TYPE::UNDEFINED)
45  {}
46  /*virtual*/ ~CWords() throw() {}
47  public:
48  void setId ( const unsigned long long & id ) { _id = id; }
49  void setBlack ( const unsigned char & black ) { _black = black; }
50  void setSimClass ( const unsigned short & simClass ) { _simClass.setMask(simClass); }
51  void setHCrc ( const unsigned int & hCrc32 ) { _hCrc32 = hCrc32; }
52  void setOffset ( const unsigned int & offset ) { _offset = offset; }
53  void setSentenceNumber( const unsigned int & sentenceNumber ) { _sentenceNumber = sentenceNumber; }
54  void setLingIntegrity( const unsigned char & lingIntegrity ) { _lingIntegrity = lingIntegrity; }
55  void setInitWordLen( const unsigned int & initWordLen ) { _initWordLen = initWordLen; }
56  void setOriginWord( const std::string & originWord ) { _originWord = originWord; }
57  void setNormWord( const std::string & normWord ) { _normWord = normWord; }
58  void setPosMask( const unsigned short & posMask) { _posMask = posMask; }
59  //void setPosMask ( const unsigned short & posMask) { _posMask.setMask( posMask ); }
60  void setWordType( const WORD_TYPE& wordType) { _wordType = wordType; }
61  public:
62  inline const unsigned long long & getId () const { return _id; }
63  inline const unsigned char & getBlack () const { return _black; }
64  inline const unsigned short getSimClass () const { return _simClass.getMask(); }
65  inline const unsigned int & getHCrc () const { return _hCrc32; }
66  inline const unsigned int & getOffset () const { return _offset; }
67  inline const unsigned int & getSentenceNumber () const { return _sentenceNumber; }
68  inline const unsigned char & getLingIntegrity () const { return _lingIntegrity; }
69  inline const unsigned int & getInitWordLen () const { return _initWordLen; }
70  inline const std::string & getOriginWord () const { return _originWord; }
71  inline const std::string & getNormWord () const { return _normWord; }
72  const unsigned short getPosMask() const { return _posMask; }
73  const WORD_TYPE getWordType() const { return _wordType; }
74  //const unsigned short getPosMask() const { return _posMask.getMask(); }
75  };
76 }
77 
78 #endif