aboutsummaryrefslogtreecommitdiff
path: root/src/tafnode.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-10-03 03:05:30 +0000
committerMike Buland <eichlan@xagasoft.com>2007-10-03 03:05:30 +0000
commit850ebb96df909a4113fdf9c5bf82cf0f598901ca (patch)
tree82c562ea4a9239f113ff3a65425cae123e349df4 /src/tafnode.cpp
parent1a93511936a87715115f968a94841ca3b502c858 (diff)
downloadlibbu++-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.cpp16
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
36void Bu::TafGroup::setName( const Bu::FString &sName )
37{
38 this->sName = sName;
39}
40
36Bu::TafNode *Bu::TafGroup::addChild( Bu::TafNode *pNode ) 41Bu::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
87Bu::TafGroup *Bu::TafGroup::addGroup( const Bu::FString &sName )
88{
89 return addChild( new TafGroup( sName ) );
90}
91
92Bu::TafProperty *Bu::TafGroup::addProperty(
93 const Bu::FString &sName, const Bu::FString &sValue )
94{
95 return addChild( new TafProperty( sName, sValue ) );
96}
97
82const Bu::TafGroup::GroupList &Bu::TafGroup::getChildren( const Bu::FString &sName ) const 98const Bu::TafGroup::GroupList &Bu::TafGroup::getChildren( const Bu::FString &sName ) const
83{ 99{
84 return hChildren.get( sName ); 100 return hChildren.get( sName );