aboutsummaryrefslogtreecommitdiff
path: root/src/xmlreader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlreader.h')
-rw-r--r--src/xmlreader.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/xmlreader.h b/src/xmlreader.h
new file mode 100644
index 0000000..19791c4
--- /dev/null
+++ b/src/xmlreader.h
@@ -0,0 +1,70 @@
1#ifndef XML_READER_H
2#define XML_READER_H
3
4#include <stdint.h>
5#include "bu/stream.h"
6#include "bu/fstring.h"
7#include "bu/xmlnode.h"
8
9namespace Bu
10{
11 /**
12 *
13 */
14 class XmlReader
15 {
16 public:
17 XmlReader( Bu::Stream &sIn );
18 virtual ~XmlReader();
19
20 XmlNode *read();
21
22 private:
23 Bu::Stream &sIn;
24 Bu::FString sBuf;
25
26 private: // Helpers
27 const char *lookahead( int nAmnt );
28 void burn( int nAmnt );
29 void checkString( const char *str, int nLen );
30
31 private: // States
32 /**
33 * The headers, etc.
34 */
35 void prolog();
36
37 /**
38 * The xml decleration (version, encoding, etc).
39 */
40 void XMLDecl();
41
42 /**
43 * Misc things...?
44 */
45 void Misc();
46
47 /**
48 * Whitespace eater.
49 */
50 void S();
51
52 /**
53 * Optional whitespace eater.
54 */
55 void Sq();
56
57 /**
58 * XML Version spec
59 */
60 void VersionInfo();
61
62 /**
63 * Your basic equals sign with surrounding whitespace.
64 */
65 void Eq();
66
67 };
68}
69
70#endif