26 # define KILL_THIS_PROCESS TerminateProcess(GetCurrentProcess(), 0);
28 # define KILL_THIS_PROCESS kill(getpid(), -9);
32 std::vector<std::string>
StrSplit(
const std::string &src,
const std::string &sep);
40 int get_tokens(
const char* szInput,
char** pOutput,
int iMaxCount,
char cSeperator);
43 typedef struct tagTHREADNAME_INFO
58 bool ParseCIDRBan(
unsigned int IP,
unsigned int Mask,
unsigned int MaskBits);
59 unsigned int MakeIP(
const char * str);
109 static std::string
trim(
const std::string& str,
bool left,
bool right);
119 static void trim(std::string& str,
bool left,
bool right);
130 static std::wstring
trim(
const std::wstring& str,
bool left,
bool right);
140 static void trim(std::wstring& str,
bool left,
bool right);
149 static std::string
toUpperCase(
const std::string& TString);
166 static std::wstring
toUpperCase(
const std::wstring& TString);
183 static std::string
toLowerCase(
const std::string& TString);
200 static std::wstring
toLowerCase(
const std::wstring& TString);
220 static std::string
CaseFold(std::string & str);
228 static std::wstring
CaseFold(std::wstring & str);
266 hash = ((hash << 5) + hash) + c;
285 hash = ((hash << 5) + hash) + c;
300 const char * str = oStr.c_str();
306 hash = ((hash << 5) + hash) + c;
321 const wchar_t * str = oStr.c_str();
327 hash = ((hash << 5) + hash) + c;
346 for (i = 0; i < len; i++)
349 hash = ((hash << 5) + hash) + c;
370 hash = c + (hash << 6) + (hash << 16) - hash;
389 hash = c + (hash << 6) + (hash << 16) - hash;
408 hash = c + (hash << 6) + (hash << 16) - hash;
427 for (
int i = 0; i < len; i++)
430 hash = c + (hash << 6) + (hash << 16) - hash;
static uint32 sdbm_hash(const wchar_t *str)
sdbm algorithm taken from http://www.cse.yorku.ca/~oz/hash.html slightly modified ...
std::string ConvertTimeStampToDataTime(uint32 timestamp)
bool CheckIPs(const char *szIPList)
static uint32 djb2_hash(const char *str)
djb2 algorithm taken from http://www.cse.yorku.ca/~oz/hash.html slightly modified ...
std::vector< std::string > StrSplit(const std::string &src, const std::string &sep)
static std::wstring StringToWString(std::string &wstr)
bool ParseCIDRBan(unsigned int IP, unsigned int Mask, unsigned int MaskBits)
static std::string toUpperCase(const std::string &TString)
int32 GetTimePeriodFromString(const char *str)
static uint32 sdbm_hash(std::string &oStr)
sdbm algorithm taken from http://www.cse.yorku.ca/~oz/hash.html slightly modified ...
int get_tokens(const char *szInput, char **pOutput, int iMaxCount, char cSeperator)
a class to keep track of all the utility hash functions
time_t convTimePeriod(uint32 dLength, char dType)
static uint32 sdbm_hash(const char *str)
sdbm algorithm taken from http://www.cse.yorku.ca/~oz/hash.html slightly modified ...
static std::string toLowerCase(const std::string &TString)
void SetThreadName(const char *format,...)
static std::string CaseFold(std::string &str)
std::string ConvertTimeStampToStringNC(uint32 timestamp)
static uint32 djb2_hash(const std::string &oStr)
djb2 algorithm taken from http://www.cse.yorku.ca/~oz/hash.html slightly modified ...
static uint32 djb2_hash(const char *str, int len)
djb2 algorithm taken from http://www.cse.yorku.ca/~oz/hash.html slightly modified ...
static uint32 djb2_hash(const std::wstring &oStr)
djb2 algorithm taken from http://www.cse.yorku.ca/~oz/hash.html slightly modified ...
int32 ascent_roundf(float v)
unsigned int MakeIP(const char *str)
static std::string trim(const std::string &str, bool left, bool right)
std::string ConvertTimeStampToString(uint32 timestamp)
static uint32 sdbm_hash(const char *str, int len)
sdbm algorithm taken from http://www.cse.yorku.ca/~oz/hash.html slightly modified ...
int32 ascent_roundd(double v)
static uint32 djb2_hash(const wchar_t *str)
djb2 algorithm taken from http://www.cse.yorku.ca/~oz/hash.html slightly modified ...