-
Notifications
You must be signed in to change notification settings - Fork 5
/
Constant.hpp
82 lines (69 loc) · 2.37 KB
/
Constant.hpp
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
#pragma once
#include "stdafx.h"
#include <string>
#include "EuroScopePlugIn.h"
#include <vector>
#include <sstream>
#include <iomanip>
const int TAG_ITEM_VCH_REQ = 540;
const int TAG_ITEM_VCH_RQC = 541;
const int TAG_ITEM_VCH_RQP = 542;
const int TAG_ITEM_VCH_RQS = 543;
const int TAG_ITEM_VCH_RQT = 544;
const int TAG_ITEM_VCH_RQD = 545;
const int TAG_ITEM_VCH_SRQ = 546;
const int TAG_FUNC_VCH_RMEN = 548;
const int TAG_FUNC_VCH_REQRESET = 550;
const int TAG_FUNC_VCH_CLEARENCE = 551;
const int TAG_FUNC_VCH_PUSHBACK = 552;
const int TAG_FUNC_VCH_STARTUP = 553;
const int TAG_FUNC_VCH_TAXI = 554;
const int TAG_FUNC_VCH_DEPARTURE = 555;
const int TAG_FUNC_VCH_SORT = 556;
const int TAG_ITEM_VCH_HOS = 440;
const int TAG_FUNC_VCH_HMEN = 444;
const int TAG_FUNC_VCH_HOS = 445;
const int TAG_FUNC_VCH_HOSTEXT = 446;
const int TAG_FUNC_VCH_HOSRESET = 447;
const int TAG_ITEM_VCH_CTL = 640;
const int TAG_ITEM_VCH_SCL = 641;
const int TAG_ITEM_VCH_CFT = 642;
const int TAG_FUNC_VCH_CTL = 650;
const int TAG_ITEM_VCH_REM = 340;
const int TAG_ITEM_VCH_SRM = 341;
const int TAG_FUNC_VCH_REM = 346;
const int SYNC_REQUEST = 100;
const int TAG_STRIP_ANNO_REM = 8;
const int TAG_STRIP_ANNO_CTL = 3;
const int TAG_STRIP_ANNO_HOS = 4;
const int TAG_STRIP_ANNO_REQ = 2;
const COLORREF TAG_LIGHTGREEN = RGB(130, 190, 130);
const COLORREF TAG_LIGHTYELLOW = RGB(190, 190, 130);
const COLORREF TAG_LIGHTRED = RGB(255, 130, 130);
const COLORREF TAG_LIGHTORANGE = RGB(200, 160, 130);
const COLORREF TAG_GREEN = RGB(0, 220, 0);
const COLORREF TAG_RED = RGB(255, 0, 0);
const COLORREF TAG_YELLOW = RGB(220, 220, 0);
const COLORREF TAG_ORANGE = RGB(255, 190, 0);
const COLORREF TAG_CYAN = RGB(0, 220, 220);
const COLORREF TAG_BLUE = RGB(0, 0, 220);
const COLORREF TAG_GREY = RGB(130, 130, 130);
const COLORREF TAG_WHITE = RGB(220, 220, 220);
inline static bool startsWith(const char *pre, const char *str)
{
size_t lenpre = strlen(pre), lenstr = strlen(str);
return lenstr < lenpre ? false : strncmp(pre, str, lenpre) == 0;
};
inline static std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems) {
std::stringstream ss(s);
std::string item;
while (std::getline(ss, item, delim)) {
elems.push_back(item);
}
return elems;
};
inline static std::vector<std::string> split(const std::string &s, char delim) {
std::vector<std::string> elems;
split(s, delim, elems);
return elems;
};