#include <Naming_Service_Container.h>
Public Member Functions | |
ACE_Unbounded_List_Iterator (ACE_Unbounded_List< T > &s, int end=0) | |
int | next (T *&next_item) |
int | advance (void) |
int | first (void) |
int | done (void) const |
Returns 1 when all items have been seen, else 0. | |
void | dump (void) const |
Dump the state of an object. | |
ACE_Unbounded_List_Iterator< T > | operator++ (int) |
Postfix advance. | |
ACE_Unbounded_List_Iterator< T > & | operator++ (void) |
Prefix advance. | |
T & | operator * (void) |
Returns a reference to the interal element <this> is pointing to. | |
bool | operator== (const ACE_Unbounded_List_Iterator< T > &) const |
Check if two iterators point to the same position. | |
bool | operator!= (const ACE_Unbounded_List_Iterator< T > &) const |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
Private Attributes | |
ACE_NS_Node< T > * | current_ |
Pointer to the current node in the iteration. | |
ACE_Unbounded_List< T > * | set_ |
Pointer to the set we're iterating over. |
Definition at line 76 of file Naming_Service_Container.h.
ACE_Unbounded_List_Iterator< T >::ACE_Unbounded_List_Iterator | ( | ACE_Unbounded_List< T > & | s, | |
int | end = 0 | |||
) |
int ACE_Unbounded_List_Iterator< T >::advance | ( | void | ) |
Move forward by one element in the List. Returns 0 when all the items in the List have been seen, else 1.
Definition at line 284 of file Naming_Service_Container.cpp.
References ACE_Unbounded_List_Iterator< T >::current_, and ACE_Unbounded_List_Iterator< T >::set_.
Referenced by ACE_Unbounded_List_Iterator< T >::operator++().
00285 { 00286 // ACE_TRACE ("ACE_Unbounded_List_Iterator<T>::advance"); 00287 this->current_ = this->current_->next_; 00288 return this->current_ != this->set_->head_; 00289 }
int ACE_Unbounded_List_Iterator< T >::done | ( | void | ) | const |
Returns 1 when all items have been seen, else 0.
Definition at line 300 of file Naming_Service_Container.cpp.
References ACE_TRACE, ACE_Unbounded_List_Iterator< T >::current_, and ACE_Unbounded_List_Iterator< T >::set_.
00301 { 00302 ACE_TRACE ("ACE_Unbounded_List_Iterator<T>::done"); 00303 00304 return this->current_ == this->set_->head_; 00305 }
void ACE_Unbounded_List_Iterator< T >::dump | ( | void | ) | const |
int ACE_Unbounded_List_Iterator< T >::first | ( | void | ) |
Move to the first element in the List. Returns 0 if the List is empty, else 1.
Definition at line 292 of file Naming_Service_Container.cpp.
References ACE_Unbounded_List_Iterator< T >::current_, and ACE_Unbounded_List_Iterator< T >::set_.
00293 { 00294 // ACE_TRACE ("ACE_Unbounded_List_Iterator<T>::first"); 00295 this->current_ = this->set_->head_->next_; 00296 return this->current_ != this->set_->head_; 00297 }
int ACE_Unbounded_List_Iterator< T >::next | ( | T *& | next_item | ) |
Pass back the <next_item> that hasn't been seen in the List. Returns 0 when all items have been seen, else 1.
Definition at line 308 of file Naming_Service_Container.cpp.
References ACE_Unbounded_List_Iterator< T >::current_.
Referenced by ACE_Unbounded_List_Iterator< T >::operator *().
00309 { 00310 // ACE_TRACE ("ACE_Unbounded_List_Iterator<T>::next"); 00311 if (this->current_ == this->set_->head_) 00312 return 0; 00313 else 00314 { 00315 item = &this->current_->item_; 00316 return 1; 00317 } 00318 }
T & ACE_Unbounded_List_Iterator< T >::operator * | ( | void | ) |
Returns a reference to the interal element <this> is pointing to.
Definition at line 344 of file Naming_Service_Container.cpp.
References ACE_ASSERT, and ACE_Unbounded_List_Iterator< T >::next().
00345 { 00346 //ACE_TRACE ("ACE_Unbounded_List_Iterator<T>::operator*"); 00347 T *retv = 0; 00348 00349 int result = this->next (retv); 00350 ACE_ASSERT (result != 0); 00351 ACE_UNUSED_ARG (result); 00352 00353 return *retv; 00354 }
bool ACE_Unbounded_List_Iterator< T >::operator!= | ( | const ACE_Unbounded_List_Iterator< T > & | ) | const |
Definition at line 364 of file Naming_Service_Container.cpp.
References ACE_Unbounded_List_Iterator< T >::current_, and ACE_Unbounded_List_Iterator< T >::set_.
00365 { 00366 //ACE_TRACE ("ACE_Unbounded_List_Iterator<T>::operator!="); 00367 return (this->set_ != rhs.set_ || this->current_ != rhs.current_); 00368 }
ACE_Unbounded_List_Iterator< T > & ACE_Unbounded_List_Iterator< T >::operator++ | ( | void | ) |
Prefix advance.
Definition at line 333 of file Naming_Service_Container.cpp.
References ACE_Unbounded_List_Iterator< T >::advance().
00334 { 00335 // ACE_TRACE ("ACE_Unbounded_List_Iterator<T>::operator++ (void)"); 00336 00337 // prefix operator 00338 00339 this->advance (); 00340 return *this; 00341 }
ACE_Unbounded_List_Iterator< T > ACE_Unbounded_List_Iterator< T >::operator++ | ( | int | ) |
Postfix advance.
Definition at line 321 of file Naming_Service_Container.cpp.
References ACE_Unbounded_List_Iterator< T >::advance().
00322 { 00323 //ACE_TRACE ("ACE_Unbounded_List_Iterator<T>::operator++ (int)"); 00324 ACE_Unbounded_List_Iterator<T> retv (*this); 00325 00326 // postfix operator 00327 00328 this->advance (); 00329 return retv; 00330 }
bool ACE_Unbounded_List_Iterator< T >::operator== | ( | const ACE_Unbounded_List_Iterator< T > & | ) | const |
Check if two iterators point to the same position.
Definition at line 357 of file Naming_Service_Container.cpp.
References ACE_Unbounded_List_Iterator< T >::current_, and ACE_Unbounded_List_Iterator< T >::set_.
00358 { 00359 //ACE_TRACE ("ACE_Unbounded_List_Iterator<T>::operator=="); 00360 return (this->set_ == rhs.set_ && this->current_ == rhs.current_); 00361 }
ACE_Unbounded_List_Iterator< T >::ACE_ALLOC_HOOK_DECLARE |
ACE_NS_Node<T>* ACE_Unbounded_List_Iterator< T >::current_ [private] |
Pointer to the current node in the iteration.
Definition at line 123 of file Naming_Service_Container.h.
Referenced by ACE_Unbounded_List_Iterator< T >::advance(), ACE_Unbounded_List_Iterator< T >::done(), ACE_Unbounded_List_Iterator< T >::first(), ACE_Unbounded_List_Iterator< T >::next(), ACE_Unbounded_List_Iterator< T >::operator!=(), and ACE_Unbounded_List_Iterator< T >::operator==().
ACE_Unbounded_List<T>* ACE_Unbounded_List_Iterator< T >::set_ [private] |
Pointer to the set we're iterating over.
Definition at line 126 of file Naming_Service_Container.h.
Referenced by ACE_Unbounded_List_Iterator< T >::advance(), ACE_Unbounded_List_Iterator< T >::done(), ACE_Unbounded_List_Iterator< T >::first(), ACE_Unbounded_List_Iterator< T >::operator!=(), and ACE_Unbounded_List_Iterator< T >::operator==().