-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathStringParser.h
More file actions
32 lines (21 loc) · 777 Bytes
/
StringParser.h
File metadata and controls
32 lines (21 loc) · 777 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
#ifndef STRING_PARSER_H
#define STRING_PARSER_H
#include "KeyValue.h"
class StringParser {
public:
explicit StringParser(char *szUnformattedString);
StringParser();
~StringParser();
void newRPC(char *szUnformattedString);
// The getNextKeyValue function
// It will attempt to parse out part of the string all the way up to the ";",
// it will then create a new KeyValue object with that partial string
// If it can;t it will return null;
void getNextKeyValue(KeyValue & keyVal);
private:
char rawString[32768]{}; // The original string is copied here
int m_currentPosition{};
KeyValue *m_pKeyValue{};
char *m_pch{}; // This is another copy of it
};
#endif