#include <PartialCandidateItr.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
00151 { 00152 }
|
|
00156 : 00157 m_indexedCandidates( aOtherItr.indexedCandidates() ) , 00158 m_index( aOtherItr.index() ) , 00159 m_label( aOtherItr.label() ) 00160 { 00161 }
|
|
00067 {}
|
|
00167 : 00168 // cast away const as const_iterator can be assocciated with a non-const list, 00169 // but only const lists use this constructor 00170 m_indexedCandidates( (IndexedLabeledCandidates< CandidateClass >*)aList ) , 00171 m_index( aIndex ) , 00172 m_label( aLabel ) 00173 { 00174 // move to first entry with correct label 00175 if ( ( m_index < size_type( (*m_indexedCandidates).size() ) ) && 00176 ( (*m_indexedCandidates).labeledCandidateClass( m_index ) != m_label ) 00177 ) { 00178 operator++() ; 00179 } 00180 }
|
|
|
|
|
|
00067 {}
|
|
|
|
|
|
00133 {
00134 return ( m_index ) ;
00135 }
|
|
|
|
00125 {
00126 return ( m_indexedCandidates ) ;
00127 }
|
|
|
|
00140 {
00141 return ( m_label ) ;
00142 }
|
|
Reimplemented in dchain::PartialItr< T >, dchain::PartialItr< T >, dchain::PartialItr< CDDecay >, and dchain::PartialItr< CDDecay >. |
|
Reimplemented in dchain::PartialItr< T >, dchain::PartialItr< T >, dchain::PartialItr< CDDecay >, and dchain::PartialItr< CDDecay >. 00294 {
00295 return ( (*m_indexedCandidates).labeledCandidateClass( m_index ) ) ;
00296 }
|
|
|
|
00312 { 00313 // There needs to be a final test on the label as itrs with two different labels 00314 // have the same values for the past-the-end value 00315 return ( ( m_index != aOtherItr.index() ) || 00316 ( m_indexedCandidates != aOtherItr.indexedCandidates() ) || 00317 ( m_label != aOtherItr.label() ) ) ; 00318 }
|
|
Reimplemented in dchain::PartialItr< T >, dchain::PartialItr< T >, dchain::PartialItr< CDDecay >, and dchain::PartialItr< CDDecay >. |
|
Reimplemented in dchain::PartialItr< T >, dchain::PartialItr< T >, dchain::PartialItr< CDDecay >, and dchain::PartialItr< CDDecay >. |
|
Reimplemented in dchain::PartialItr< T >, dchain::PartialItr< T >, dchain::PartialItr< CDDecay >, and dchain::PartialItr< CDDecay >. 00224 { 00225 PartialCandidateItr< CandidateClass > tmp( *this ) ; 00226 ++m_index ; 00227 // This while loop find next match to label. 00228 // The order is done for efficiency reasons. It is more likely a label 00229 // will match than the end of the list has been reached. However this 00230 // will can cause an access to an uninitiallized location, but the 00231 // loop will still terminate correctly. 00232 while ( 00233 ( (*m_indexedCandidates).labeledCandidateClass( m_index ) != m_label ) && 00234 ( m_index < size_type( (*m_indexedCandidates).size() ) ) ) { 00235 ++m_index ; 00236 } 00237 return ( tmp ) ; 00238 }
|
|
Reimplemented in dchain::PartialItr< T >, dchain::PartialItr< T >, dchain::PartialItr< CDDecay >, and dchain::PartialItr< CDDecay >. 00203 { 00204 ++m_index ; 00205 // This while loop find next match to label. 00206 // The order is done for efficiency reasons. It is more likely a label 00207 // will match than the end of the list has been reached. However this 00208 // will can cause an access to an uninitiallized location, but the 00209 // loop will still terminate correctly. 00210 // update: the efficiency doesn't matter but reading invalid memory 00211 // makes our automated memory checkers have fits 00212 while ( 00213 ( m_index < size_type( (*m_indexedCandidates).size() ) && 00214 ( (*m_indexedCandidates).labeledCandidateClass( m_index ) != m_label ) 00215 ) ) { 00216 ++m_index ; 00217 } 00218 return ( *this ) ; 00219 }
|
|
Reimplemented in dchain::PartialItr< T >, dchain::PartialItr< T >, dchain::PartialItr< CDDecay >, and dchain::PartialItr< CDDecay >. |
|
Reimplemented in dchain::PartialItr< T >, dchain::PartialItr< T >, dchain::PartialItr< CDDecay >, and dchain::PartialItr< CDDecay >. |
|
Reimplemented in dchain::PartialItr< T >, dchain::PartialItr< T >, dchain::PartialItr< CDDecay >, and dchain::PartialItr< CDDecay >. 00266 { 00267 PartialCandidateItr< CandidateClass > tmp( *this ) ; 00268 // As the index is 'unsigned' it should not go below zero. This behavior is completely 00269 // consistent with the STL reverse_iterator adaptor. (See pp254 of Musser & Saini) 00270 // 00271 if ( 0 != m_index ) { 00272 --m_index ; 00273 } 00274 // This while loop find next match to label. 00275 // The order is done for efficiency reasons. It is more likely a label 00276 // will match than the end of the list has been reached. However this 00277 // will can cause an access to an uninitiallized location, but the 00278 // loop will still terminate correctly. 00279 while ( 00280 ( (*m_indexedCandidates).labeledCandidateClass( m_index ) != m_label ) && 00281 ( m_index != 0 ) ) { 00282 --m_index ; 00283 } 00284 return ( tmp ) ; 00285 }
|
|
Reimplemented in dchain::PartialItr< T >, dchain::PartialItr< T >, dchain::PartialItr< CDDecay >, and dchain::PartialItr< CDDecay >. 00243 { 00244 // As the index is 'unsigned' it should not go below zero. This behavior is completely 00245 // consistent with the STL reverse_iterator adaptor. (See pp254 of Musser & Saini) 00246 // 00247 if ( 0 != m_index ) { 00248 --m_index ; 00249 } 00250 // This while loop find next match to label. 00251 // The order is done for efficiency reasons. It is more likely a label 00252 // will match than the end of the list has been reached. However this 00253 // will can cause an access to an uninitiallized location, but the 00254 // loop will still terminate correctly. 00255 while ( 00256 ( (*m_indexedCandidates).labeledCandidateClass( m_index ) != m_label ) && 00257 ( m_index != 0 ) ) { 00258 --m_index ; 00259 } 00260 return ( *this ) ; 00261 }
|
|
|
|
00189 { 00190 m_indexedCandidates = aOtherItr.indexedCandidates() ; 00191 m_index = aOtherItr.index() ; 00192 m_label = aOtherItr.label() ; 00193 return ( *this ) ; 00194 }
|
|
|
|
00301 { 00302 // There needs to be a final test on the label as itrs with two different labels 00303 // have the same values for the past-the-end value 00304 return ( ( m_index == aOtherItr.index() ) && 00305 ( m_indexedCandidates == aOtherItr.indexedCandidates() ) && 00306 ( m_label == aOtherItr.label() ) ) ; 00307 }
|
|
|
|
|
|
|
|
|
|
|