1 |
bearsoft |
1.1 |
#ifndef __StringInput_H__
|
2 |
|
|
#define __StringInput_H__
|
3 |
|
|
|
4 |
|
|
#include "../NetWork/NetWorkTools.h"
|
5 |
|
|
#include "../System/SystemDefine.h"
|
6 |
|
|
#include "StringTools.h"
|
7 |
|
|
#include "Parse.h"
|
8 |
|
|
#include <math.h>
|
9 |
|
|
#include <stdio.h>
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
class StringInput
|
13 |
|
|
{
|
14 |
|
|
|
15 |
|
|
public:
|
16 |
|
|
StringInput();
|
17 |
|
|
~StringInput();
|
18 |
|
|
|
19 |
|
|
void readFile(char *filename);
|
20 |
|
|
bool findWord(char* word);
|
21 |
|
|
char *findWordAndCutTheBack(char *word);
|
22 |
|
|
char *cutTheBackMergeStrings(char * word, char *target);
|
23 |
|
|
float *findWordReturnFloats(char * word, int howManyScanForward, int numberOfFloats);
|
24 |
|
|
float *findAWordReturnFloats( char *word, int numberOf, float falseValue, int option);
|
25 |
|
|
char *scanWord();
|
26 |
|
|
void resetScanWord();
|
27 |
|
|
int nextSpace();
|
28 |
|
|
void skipSpace();
|
29 |
|
|
void readToNextSpace(char *dest);
|
30 |
|
|
void dontDefragMemory(int wordBufferSize);
|
31 |
|
|
void dontDefragMemory();
|
32 |
|
|
int *getEndTargetPointers();
|
33 |
|
|
void resetEndTargetPointers();
|
34 |
|
|
int sizeOfPointerList(int* pointerList);
|
35 |
|
|
void setInternBuffer(char *iInternBuffer);
|
36 |
|
|
void reserveWordBufferMemory();
|
37 |
|
|
bool scanWordForwardLoop(int numberOfTimes);
|
38 |
|
|
bool getScanWordStatus();
|
39 |
|
|
bool getScanEndFindWordStatus();
|
40 |
|
|
bool getScanRowStatus();
|
41 |
|
|
int getRowNumber();
|
42 |
|
|
int getFileStatus();
|
43 |
|
|
bool socketGetHttp(int socket);
|
44 |
|
|
char *getInternBuffer();
|
45 |
|
|
|
46 |
|
|
private:
|
47 |
|
|
|
48 |
|
|
char *internBuffer;
|
49 |
|
|
char *sourceBuffer;
|
50 |
|
|
char *endBuffer;
|
51 |
|
|
char *wordBuffer;
|
52 |
|
|
int *endTargetPointers;
|
53 |
|
|
int fileSize;
|
54 |
|
|
int defragMemory;
|
55 |
|
|
float *floatBuffer;
|
56 |
|
|
int defaultValue;
|
57 |
|
|
bool scanWordStatus;
|
58 |
|
|
bool scanEndFindWordStatus;
|
59 |
|
|
char *cutAndPasteBuffer;
|
60 |
|
|
bool scanRowStatus;
|
61 |
|
|
char *nextRowPosition;
|
62 |
|
|
int rowNumber;
|
63 |
|
|
int fileStatus;
|
64 |
|
|
StringTools *stringTools;
|
65 |
|
|
};
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
#endif
|