diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-06-06 21:18:15 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-06-06 21:18:15 +0000 |
commit | 3c846af2fa8e4693c190c5131ec87d967eb58b3e (patch) | |
tree | 46ce9a7ae6f83d1dccd79a751a5340cca2eb05bc /src/tafnode.h | |
parent | 3144bd7deb950de0cb80e2215c1545bdf8fc81e9 (diff) | |
download | libbu++-3c846af2fa8e4693c190c5131ec87d967eb58b3e.tar.gz libbu++-3c846af2fa8e4693c190c5131ec87d967eb58b3e.tar.bz2 libbu++-3c846af2fa8e4693c190c5131ec87d967eb58b3e.tar.xz libbu++-3c846af2fa8e4693c190c5131ec87d967eb58b3e.zip |
The TafReader is more general and much nicer, and about to actually construct
nodes, that part will be exciting. I also fixed some stuff and added some new
functions to List, it now has first() and last() which work just like std::list
front() and back(), I may add compatibility functions later...
Diffstat (limited to 'src/tafnode.h')
-rw-r--r-- | src/tafnode.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/tafnode.h b/src/tafnode.h index 34f5289..e962e88 100644 --- a/src/tafnode.h +++ b/src/tafnode.h | |||
@@ -2,6 +2,9 @@ | |||
2 | #define BU_TAF_NODE_H | 2 | #define BU_TAF_NODE_H |
3 | 3 | ||
4 | #include <stdint.h> | 4 | #include <stdint.h> |
5 | #include "bu/fstring.h" | ||
6 | #include "bu/hash.h" | ||
7 | #include "bu/list.h" | ||
5 | 8 | ||
6 | namespace Bu | 9 | namespace Bu |
7 | { | 10 | { |
@@ -11,11 +14,23 @@ namespace Bu | |||
11 | class TafNode | 14 | class TafNode |
12 | { | 15 | { |
13 | public: | 16 | public: |
17 | typedef Bu::List<Bu::FString> PropList; | ||
18 | typedef Bu::Hash<Bu::FString, PropList> PropHash; | ||
19 | typedef Bu::List<TafNode *> NodeList; | ||
20 | typedef Bu::Hash<Bu::FString, NodeList> NodeHash; | ||
21 | |||
22 | public: | ||
14 | TafNode(); | 23 | TafNode(); |
15 | virtual ~TafNode(); | 24 | virtual ~TafNode(); |
16 | 25 | ||
17 | private: | 26 | void setProperty( Bu::FString sName, Bu::FString sValue ); |
27 | const PropList &getProperty( const Bu::FString &sName ); | ||
18 | 28 | ||
29 | private: | ||
30 | Bu::FString sName; | ||
31 | PropHash hProp; | ||
32 | NodeHash hChildren; | ||
19 | }; | 33 | }; |
20 | } | 34 | } |
35 | |||
21 | #endif | 36 | #endif |