31 lines
563 B
C++
31 lines
563 B
C++
#pragma once
|
|
#include <map>
|
|
|
|
class PVF_M {
|
|
public:
|
|
static PVF_M& getInstance() {
|
|
static PVF_M instance;
|
|
return instance;
|
|
}
|
|
|
|
// 禁止拷贝构造函数和赋值运算符重载
|
|
PVF_M(const PVF_M&) = delete;
|
|
PVF_M& operator=(const PVF_M&) = delete;
|
|
|
|
private:
|
|
PVF_M() {} // 私有构造函数,防止外部创建实例
|
|
|
|
struct PvfData
|
|
{
|
|
char* Data;
|
|
int Size;
|
|
};
|
|
|
|
|
|
public:
|
|
void Init();
|
|
int charPtrToInt(const char* ptr);
|
|
void intToCharPtr(int value, char* ptr);
|
|
void CrcDecode(PvfData &Data, const int crc32);
|
|
};
|