建档
This commit is contained in:
36
source/Tool/Ifstream_NPK.h
Normal file
36
source/Tool/Ifstream_NPK.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
typedef unsigned char BYTE;
|
||||
|
||||
class Ifstream_NPK : public std::ifstream
|
||||
{
|
||||
private:
|
||||
const BYTE Key[256];
|
||||
|
||||
public:
|
||||
// 构造函数
|
||||
Ifstream_NPK();
|
||||
|
||||
// char* 转整数
|
||||
int CharToInt(char *Str);
|
||||
|
||||
// char* 转Long
|
||||
long CharToLong(char *Str);
|
||||
|
||||
// 读整数
|
||||
int ReadInt();
|
||||
|
||||
// 读字符串
|
||||
std::string ReadString();
|
||||
|
||||
// 读取信息
|
||||
std::string ReadInfo();
|
||||
|
||||
// 读LONG
|
||||
int ReadLong();
|
||||
|
||||
// 读指定长度数据
|
||||
BYTE *ReadCustomSize(int Size);
|
||||
};
|
||||
Reference in New Issue
Block a user