blob: 08f78e89cbb66559ab1cef7b30b218eb248fd059 (
plain)
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
33
34
35
36
37
38
39
40
41
42
43
|
#ifndef BU_TAF_NODE_H
#define BU_TAF_NODE_H
#include <stdint.h>
#include "bu/fstring.h"
#include "bu/hash.h"
#include "bu/list.h"
namespace Bu
{
/**
*
*/
class TafNode
{
public:
typedef Bu::List<Bu::FString> PropList;
typedef Bu::Hash<Bu::FString, PropList> PropHash;
typedef Bu::List<TafNode *> NodeList;
typedef Bu::Hash<Bu::FString, NodeList> NodeHash;
public:
TafNode();
virtual ~TafNode();
void setName( const Bu::FString &sName );
const Bu::FString &getName() const;
void setProperty( Bu::FString sName, Bu::FString sValue );
const Bu::FString &getProperty( const Bu::FString &sName ) const;
const PropList &getProperties( const Bu::FString &sName ) const;
const TafNode *getChild( const Bu::FString &sName ) const;
const NodeList &getChildren( const Bu::FString &sName ) const;
void addChild( TafNode *pNode );
private:
Bu::FString sName;
PropHash hProp;
NodeHash hChildren;
};
}
#endif
|