diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-10-03 03:05:30 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-10-03 03:05:30 +0000 |
commit | 850ebb96df909a4113fdf9c5bf82cf0f598901ca (patch) | |
tree | 82c562ea4a9239f113ff3a65425cae123e349df4 /src/tafnode.cpp | |
parent | 1a93511936a87715115f968a94841ca3b502c858 (diff) | |
download | libbu++-850ebb96df909a4113fdf9c5bf82cf0f598901ca.tar.gz libbu++-850ebb96df909a4113fdf9c5bf82cf0f598901ca.tar.bz2 libbu++-850ebb96df909a4113fdf9c5bf82cf0f598901ca.tar.xz libbu++-850ebb96df909a4113fdf9c5bf82cf0f598901ca.zip |
Added some fun new features to the TafNode system.
Diffstat (limited to 'src/tafnode.cpp')
-rw-r--r-- | src/tafnode.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tafnode.cpp b/src/tafnode.cpp index 98bb030..c04455b 100644 --- a/src/tafnode.cpp +++ b/src/tafnode.cpp | |||
@@ -33,6 +33,11 @@ const Bu::FString &Bu::TafGroup::getName() const | |||
33 | return sName; | 33 | return sName; |
34 | } | 34 | } |
35 | 35 | ||
36 | void Bu::TafGroup::setName( const Bu::FString &sName ) | ||
37 | { | ||
38 | this->sName = sName; | ||
39 | } | ||
40 | |||
36 | Bu::TafNode *Bu::TafGroup::addChild( Bu::TafNode *pNode ) | 41 | Bu::TafNode *Bu::TafGroup::addChild( Bu::TafNode *pNode ) |
37 | { | 42 | { |
38 | switch( pNode->getType() ) | 43 | switch( pNode->getType() ) |
@@ -79,6 +84,17 @@ Bu::TafComment *Bu::TafGroup::addChild( TafComment *pNode ) | |||
79 | return pNode; | 84 | return pNode; |
80 | } | 85 | } |
81 | 86 | ||
87 | Bu::TafGroup *Bu::TafGroup::addGroup( const Bu::FString &sName ) | ||
88 | { | ||
89 | return addChild( new TafGroup( sName ) ); | ||
90 | } | ||
91 | |||
92 | Bu::TafProperty *Bu::TafGroup::addProperty( | ||
93 | const Bu::FString &sName, const Bu::FString &sValue ) | ||
94 | { | ||
95 | return addChild( new TafProperty( sName, sValue ) ); | ||
96 | } | ||
97 | |||
82 | const Bu::TafGroup::GroupList &Bu::TafGroup::getChildren( const Bu::FString &sName ) const | 98 | const Bu::TafGroup::GroupList &Bu::TafGroup::getChildren( const Bu::FString &sName ) const |
83 | { | 99 | { |
84 | return hChildren.get( sName ); | 100 | return hChildren.get( sName ); |