aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tafnode.cpp16
-rw-r--r--src/tafnode.h4
2 files changed, 20 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 );
diff --git a/src/tafnode.h b/src/tafnode.h
index cb4093f..4940bee 100644
--- a/src/tafnode.h
+++ b/src/tafnode.h
@@ -46,6 +46,7 @@ namespace Bu
46 virtual ~TafGroup(); 46 virtual ~TafGroup();
47 47
48 const Bu::FString &getName() const; 48 const Bu::FString &getName() const;
49 void setName( const Bu::FString &sName );
49 50
50 const Bu::FString &getProperty( const Bu::FString &sName ) const; 51 const Bu::FString &getProperty( const Bu::FString &sName ) const;
51 const PropList &getProperties( const Bu::FString &sName ) const; 52 const PropList &getProperties( const Bu::FString &sName ) const;
@@ -55,6 +56,9 @@ namespace Bu
55 TafGroup *addChild( TafGroup *pNode ); 56 TafGroup *addChild( TafGroup *pNode );
56 TafProperty *addChild( TafProperty *pNode ); 57 TafProperty *addChild( TafProperty *pNode );
57 TafComment *addChild( TafComment *pNode ); 58 TafComment *addChild( TafComment *pNode );
59 TafGroup *addGroup( const Bu::FString &sName );
60 TafProperty *addProperty(
61 const Bu::FString &sName, const Bu::FString &sValue );
58 const NodeList &getChildren() const; 62 const NodeList &getChildren() const;
59 63
60 private: 64 private: