diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-07-12 22:52:13 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-07-12 22:52:13 +0000 |
commit | d093a607848aa4cce99729d9b301f4888dfa66db (patch) | |
tree | 9fdabd3d3c3bfeb7b474a72f9c41b3abff298050 | |
parent | c67327f6d1b76de4212e70881ce5ca7e07ab096c (diff) | |
download | libbu++-d093a607848aa4cce99729d9b301f4888dfa66db.tar.gz libbu++-d093a607848aa4cce99729d9b301f4888dfa66db.tar.bz2 libbu++-d093a607848aa4cce99729d9b301f4888dfa66db.tar.xz libbu++-d093a607848aa4cce99729d9b301f4888dfa66db.zip |
The SPtr now has != comparison operators
-rw-r--r-- | src/sptr.h | 20 | ||||
-rw-r--r-- | src/tafnode.cpp | 23 |
2 files changed, 20 insertions, 23 deletions
@@ -139,6 +139,26 @@ namespace Bu | |||
139 | { | 139 | { |
140 | return pData == src; | 140 | return pData == src; |
141 | } | 141 | } |
142 | |||
143 | /** | ||
144 | * Not equals comparison operator. | ||
145 | *@param src (const SPtr<T> &) The SPtr to compare to. | ||
146 | *@returns (bool) Are the equal? | ||
147 | */ | ||
148 | bool operator!=( const SPtr<T> &src ) const | ||
149 | { | ||
150 | return !(pData == src.pData); | ||
151 | } | ||
152 | |||
153 | /** | ||
154 | * Not equals comparison operator. | ||
155 | *@param src (const T *) The pointer to compare to. | ||
156 | *@returns (bool) Are the equal? | ||
157 | */ | ||
158 | bool operator!=( const T *src ) const | ||
159 | { | ||
160 | return !(pData == src); | ||
161 | } | ||
142 | 162 | ||
143 | /** | 163 | /** |
144 | * Boolean cast operator. Do we have a pointer? | 164 | * Boolean cast operator. Do we have a pointer? |
diff --git a/src/tafnode.cpp b/src/tafnode.cpp index 53b782e..98bb030 100644 --- a/src/tafnode.cpp +++ b/src/tafnode.cpp | |||
@@ -14,28 +14,6 @@ const Bu::TafNode::NodeType Bu::TafNode::getType() const | |||
14 | return eType; | 14 | return eType; |
15 | } | 15 | } |
16 | 16 | ||
17 | /* | ||
18 | const Bu::TafNode::PropList &Bu::TafNode::getProperties( const Bu::FString &sName ) const | ||
19 | { | ||
20 | return hProp.get( sName ); | ||
21 | } | ||
22 | |||
23 | const Bu::TafNode::NodeList &Bu::TafNode::getChildren( const Bu::FString &sName ) const | ||
24 | { | ||
25 | return hChildren.get( sName ); | ||
26 | } | ||
27 | |||
28 | const Bu::FString &Bu::TafNode::getProperty( const Bu::FString &sName ) const | ||
29 | { | ||
30 | return getProperties( sName ).first(); | ||
31 | } | ||
32 | |||
33 | const Bu::TafNode *Bu::TafNode::getChild( const Bu::FString &sName ) const | ||
34 | { | ||
35 | return getChildren( sName ).first(); | ||
36 | } | ||
37 | */ | ||
38 | |||
39 | Bu::TafGroup::TafGroup( const Bu::FString &sName ) : | 17 | Bu::TafGroup::TafGroup( const Bu::FString &sName ) : |
40 | TafNode( typeGroup ), | 18 | TafNode( typeGroup ), |
41 | sName( sName ) | 19 | sName( sName ) |
@@ -44,7 +22,6 @@ Bu::TafGroup::TafGroup( const Bu::FString &sName ) : | |||
44 | 22 | ||
45 | Bu::TafGroup::~TafGroup() | 23 | Bu::TafGroup::~TafGroup() |
46 | { | 24 | { |
47 | //printf("Entering Bu::TafNode::~TafNode() \"%s\"\n", sName.getStr() ); | ||
48 | for( NodeList::iterator i = lChildren.begin(); i != lChildren.end(); i++ ) | 25 | for( NodeList::iterator i = lChildren.begin(); i != lChildren.end(); i++ ) |
49 | { | 26 | { |
50 | delete (*i); | 27 | delete (*i); |