diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-05-08 06:31:33 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-05-08 06:31:33 +0000 |
commit | c17c4ebbab022de80a9f893115f2fd41e6a07c44 (patch) | |
tree | e2d49c6e96447b6046f5567fa897f4da56caf639 /src/xmlreader.h | |
parent | 0f0be6146dc711f8d44db0348e8fe0d010a31ca7 (diff) | |
download | libbu++-c17c4ebbab022de80a9f893115f2fd41e6a07c44.tar.gz libbu++-c17c4ebbab022de80a9f893115f2fd41e6a07c44.tar.bz2 libbu++-c17c4ebbab022de80a9f893115f2fd41e6a07c44.tar.xz libbu++-c17c4ebbab022de80a9f893115f2fd41e6a07c44.zip |
Added the TAF format structures and XML format structures, I'm making up TAF
(textual archive format), but named it wrong, this seemed easier than redoing
it all.
Diffstat (limited to 'src/xmlreader.h')
-rw-r--r-- | src/xmlreader.h | 70 |
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 | |||
9 | namespace 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 | ||