Menu

[r186]: / trunk / src / SerializeUtils.h  Maximize  Restore  History

Download this file

34 lines (27 with data), 849 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
29
30
31
32
33
#pragma once
#include <string>
#include "UnicodeUtils.h"
using namespace std;
class CSerializeUtils
{
public:
CSerializeUtils(void);
~CSerializeUtils(void);
static bool SaveNumber(FILE * hFile, unsigned __int64 value);
static bool LoadNumber(FILE * hFile, unsigned __int64& value);
static bool LoadNumber(const unsigned char *& buf, unsigned __int64& value);
static bool SaveString(FILE * hFile, string str);
static bool SaveString(FILE * hFile, wstring str);
static bool LoadString(FILE * hFile, string& str);
static bool LoadString(const unsigned char *& buf, string& str);
static bool LoadString(FILE * hFile, wstring& str);
static bool LoadString(const unsigned char *& buf, wstring& str);
enum SerializeTypes
{
SerializeType_Number,
SerializeType_String,
SerializeType_Map
};
private:
static char buffer[4096];
};
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.