hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Defs.hpp
Go to the documentation of this file.
1 /*
2  * Defs.hpp
3  *
4  * Created on: Dec 3, 2012
5  * Author: handler
6  */
7 
8 #ifndef DEFS_HPP
9 #define DEFS_HPP
10 
11 #include <string>
12 #include <iostream>
13 
14 namespace HCE {
15 
16 #define CONF_FILE "conf.xml"
17 
18 #define MYSQL_USER "hce"
19 #define MYSQL_PWD "hceprjp"
20 #define MYSQL_HOST "localhost"
21 //#define MYSQL_PORT "3306"
22 #define MYSQL_DB "templatesr"
23 #define MYSQL_TABLE "stat_raw_data"
24 
25 
29 #if __cplusplus >= 201100L
30  #define CHAR_TYPE char
31 // #define CHAR_TYPE char16_t
32 #else
33  #define CHAR_TYPE char
34 // #define CHAR_TYPE unsigned short
35 #endif
36 
37 
38 //#define UCS2STRING std::basic_string<CHAR_TYPE>
39 #define WORD_CONTENT_OFFSET unsigned long
40 #define LANG_ID unsigned short//LANG
41 #define TAG_ID unsigned short
42 #define WORD_LENGTH unsigned long
43 #define SSTRING std::basic_string<CHAR_TYPE>
44 //typedef unsigned char WORD_TYPE;
45 //#define POS_MASK unsigned short
46 typedef unsigned short POSMask;
47 #define MAX_NUM_LANG 161
48 #define _log_ std::cout
49 #define _log_end_ std::endl
50 
51 #define DEFAULT_NORMALIZATION_WITHOUT 0
52 #define DEFAULT_NORMALIZATION_WITH 1
53 #define DEFAULT_SUBJECT_MASK 0
54 
55 //enum ExitStatus {EXIT_STATUS_SUCCESS, EXIT_STATUS_FAILURE};
56 
57 static const unsigned TAG_CODES_TOTAL_NUMBER = 0xA11;
58 static const unsigned TAG_CODES_BASE = 0xEEEE;
59 
60 static const int POS_NUM = 16;
61 
62 enum class WORD_TYPE : unsigned short { UNDEFINED=0, DELIMITER=0, WORD, NUMBER, PUNCTUATION };
63 
64 enum class GRANULARITY_LEVEL: unsigned short { ONLY_BY_DELIMITERS=0, BY_WORD_TYPE};
65 
66 }
67 
68 #endif /* DEFS_H_ */