diff options
Diffstat (limited to 'src/tafnode.h')
-rw-r--r-- | src/tafnode.h | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/src/tafnode.h b/src/tafnode.h index f6d2ea9..5aa5082 100644 --- a/src/tafnode.h +++ b/src/tafnode.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <stdint.h> | 11 | #include <stdint.h> |
12 | #include "bu/fstring.h" | 12 | #include "bu/fstring.h" |
13 | #include "bu/hash.h" | 13 | #include "bu/hash.h" |
14 | #include "bu/list.h" | ||
15 | #include "bu/exceptionbase.h" | 14 | #include "bu/exceptionbase.h" |
16 | 15 | ||
17 | namespace Bu | 16 | namespace Bu |
@@ -40,87 +39,6 @@ namespace Bu | |||
40 | private: | 39 | private: |
41 | NodeType eType; | 40 | NodeType eType; |
42 | }; | 41 | }; |
43 | |||
44 | class TafProperty; | ||
45 | class TafComment; | ||
46 | /** | ||
47 | * | ||
48 | *@ingroup Taf | ||
49 | */ | ||
50 | class TafGroup : public TafNode | ||
51 | { | ||
52 | public: | ||
53 | typedef Bu::List<Bu::FString> PropList; | ||
54 | typedef Bu::Hash<Bu::FString, PropList> PropHash; | ||
55 | typedef Bu::List<class Bu::TafGroup *> GroupList; | ||
56 | typedef Bu::Hash<Bu::FString, GroupList> GroupHash; | ||
57 | typedef Bu::List<class Bu::TafNode *> NodeList; | ||
58 | |||
59 | TafGroup( const Bu::FString &sName ); | ||
60 | virtual ~TafGroup(); | ||
61 | |||
62 | const Bu::FString &getName() const; | ||
63 | void setName( const Bu::FString &sName ); | ||
64 | |||
65 | bool hasProperty( const Bu::FString &sName ) const; | ||
66 | const Bu::FString &getProperty( const Bu::FString &sName ) const; | ||
67 | const Bu::FString &getProperty( const Bu::FString &sName, | ||
68 | const Bu::FString &sDef ) const; | ||
69 | const PropList &getProperties( const Bu::FString &sName ) const; | ||
70 | bool hasChild( const Bu::FString &sName ) const; | ||
71 | const TafGroup *getChild( const Bu::FString &sName ) const; | ||
72 | const GroupList &getChildren( const Bu::FString &sName ) const; | ||
73 | TafNode *addChild( TafNode *pNode ); | ||
74 | TafGroup *addChild( TafGroup *pNode ); | ||
75 | TafProperty *addChild( TafProperty *pNode ); | ||
76 | TafComment *addChild( TafComment *pNode ); | ||
77 | TafGroup *addGroup( const Bu::FString &sName ); | ||
78 | TafProperty *addProperty( | ||
79 | const Bu::FString &sName, const Bu::FString &sValue ); | ||
80 | const NodeList &getChildren() const; | ||
81 | |||
82 | private: | ||
83 | Bu::FString sName; | ||
84 | PropHash hProp; | ||
85 | GroupHash hChildren; | ||
86 | NodeList lChildren; | ||
87 | }; | ||
88 | |||
89 | /** | ||
90 | * | ||
91 | *@ingroup Taf | ||
92 | */ | ||
93 | class TafProperty : public TafNode | ||
94 | { | ||
95 | public: | ||
96 | TafProperty( const Bu::FString &sName, const Bu::FString &sValue ); | ||
97 | virtual ~TafProperty(); | ||
98 | |||
99 | const Bu::FString &getName() const; | ||
100 | const Bu::FString &getValue() const; | ||
101 | |||
102 | private: | ||
103 | Bu::FString sName; | ||
104 | Bu::FString sValue; | ||
105 | }; | ||
106 | |||
107 | /** | ||
108 | * | ||
109 | *@ingroup Taf | ||
110 | */ | ||
111 | class TafComment : public TafNode | ||
112 | { | ||
113 | public: | ||
114 | TafComment( const Bu::FString &sText, bool bEOL=false ); | ||
115 | virtual ~TafComment(); | ||
116 | |||
117 | const Bu::FString &getText() const; | ||
118 | bool isEOLStyle() const; | ||
119 | |||
120 | private: | ||
121 | Bu::FString sText; | ||
122 | bool bEOL; | ||
123 | }; | ||
124 | } | 42 | } |
125 | 43 | ||
126 | #endif | 44 | #endif |