1 |
#ifndef __BinaryInput_H__
|
2 |
#define __BinaryInput_H__
|
3 |
|
4 |
#include "../NetWork/NetWorkTools.h"
|
5 |
#include "../System/SystemDefine.h"
|
6 |
#include "../String/String.h"
|
7 |
#include "../String/StringTools.h"
|
8 |
#include "../String/Parse.h"
|
9 |
#include "../Files/FileTools.h"
|
10 |
#include "../String/StringTools.h"
|
11 |
#include <math.h>
|
12 |
#include <stdio.h>
|
13 |
|
14 |
|
15 |
class BinaryInput
|
16 |
{
|
17 |
|
18 |
public:
|
19 |
BinaryInput();
|
20 |
~BinaryInput();
|
21 |
|
22 |
void readFile(const String & string);
|
23 |
void readFile(char *filename);
|
24 |
void resetScanWord();
|
25 |
void setInternBuffer(char *iInternBuffer, int size);
|
26 |
bool getScanBinaryStatus();
|
27 |
char *getWord(int size);
|
28 |
char getChar();
|
29 |
int getInt();
|
30 |
float getFloat();
|
31 |
void setBigEndian(bool bigEndian);
|
32 |
bool getBinaryStatus();
|
33 |
short getShort();
|
34 |
bool jumpForward(int jumpValue);
|
35 |
char *getInternBuffer();
|
36 |
int getInternBufferSize();
|
37 |
int getFileStatus();
|
38 |
int socketSend(int socket);
|
39 |
void setInternBufferPosition(int position);
|
40 |
char *getWord();
|
41 |
void resetCharCounter();
|
42 |
int getCharCounter();
|
43 |
short getShortButGoNotFoward();
|
44 |
|
45 |
private:
|
46 |
|
47 |
int fileStatus;
|
48 |
char *internBuffer;
|
49 |
char *sourceBuffer;
|
50 |
char *endBuffer;
|
51 |
char *wordBuffer;
|
52 |
int fileSize;
|
53 |
bool scanBinaryStatus;
|
54 |
bool bigEndian;
|
55 |
bool binaryStatus;
|
56 |
int charCounter;
|
57 |
FileTools *fileTools;
|
58 |
StringTools *stringTools;
|
59 |
};
|
60 |
|
61 |
|
62 |
#endif
|