22 #ifndef ROBOTTESTINGFRAMEWORK_VOCAB_H 23 #define ROBOTTESTINGFRAMEWORK_VOCAB_H 31 constexpr int32_t
VOCAB(
char a,
char b = 0,
char c = 0,
char d = 0)
33 return ((((int32_t)(d)) << 24) + (((int32_t)(c)) << 16) + (((int32_t)(b)) << 8) + ((int32_t)(a)));
41 static int encode(
const std::string& s)
47 if (s.length() >= 1) {
49 if (s.length() >= 2) {
51 if (s.length() >= 3) {
53 if (s.length() >= 4) {
59 return VOCAB(a, b, c, d);
66 for (
int i = 0; i < 4; i++) {
77 #endif // ROBOTTESTINGFRAMEWORK_VOCAB_H static int encode(const std::string &s)
constexpr int32_t VOCAB(char a, char b=0, char c=0, char d=0)
static std::string decode(int code)