-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.h
More file actions
28 lines (23 loc) · 670 Bytes
/
common.h
File metadata and controls
28 lines (23 loc) · 670 Bytes
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
#pragma once
#include <iostream>
#include <string>
#include "Poco/Mutex.h"
class Common
{
public:
static Common* getInstance();
std::string FnFormatDateYYMMDD();
std::string FnFormatDateYYMMDD_HHMMSS();
std::string FnCurrentFormatDateYYYY_MM_DD_HH_MM_SS();
std::string FnConverImageToBase64String(const std::string& imagePath);
void FnRetrieveIpAddressFromNetInterface();
std::string FnGetIpAddress();
Common(Common& common) = delete;
void operator=(const Common&) = delete;
private:
static Common* common_;
static Poco::Mutex singletonCommonMutex_;
Poco::Mutex commonMutex_;
std::string ipAddr_;
Common();
};