summaryrefslogtreecommitdiff
path: root/ace/Containers.cpp
diff options
context:
space:
mode:
authorcdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-02-06 14:28:19 +0000
committercdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-02-06 14:28:19 +0000
commit4f8e50ed18adce2d4f4edcc55e5d4d5d409d37f3 (patch)
treed6d4954d59d730fc3c0deae6b92a7463f246f059 /ace/Containers.cpp
parente6363b267851004b7d3b16e48816d877d18eb06f (diff)
downloadATCD-4f8e50ed18adce2d4f4edcc55e5d4d5d409d37f3.tar.gz
added first () method to Iterators
Diffstat (limited to 'ace/Containers.cpp')
-rw-r--r--ace/Containers.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/ace/Containers.cpp b/ace/Containers.cpp
index a74c93fe897..4b99b0128f8 100644
--- a/ace/Containers.cpp
+++ b/ace/Containers.cpp
@@ -610,6 +610,14 @@ ACE_Unbounded_Queue_Iterator<T>::advance (void)
}
template <class T> int
+ACE_Unbounded_Queue_Iterator<T>::first (void)
+{
+// ACE_TRACE ("ACE_Unbounded_Queue_Iterator<T>::first");
+ this->current_ = this->queue_.head_->next_;
+ return this->current_ != this->queue_.head_;
+}
+
+template <class T> int
ACE_Unbounded_Queue_Iterator<T>::done (void) const
{
ACE_TRACE ("ACE_Unbounded_Queue_Iterator<T>::done");
@@ -674,6 +682,13 @@ ACE_Double_Linked_List_Iterator<T>::advance (void)
}
template <class T> int
+ACE_Double_Linked_List_Iterator<T>::first (void)
+{
+ this->current_ = dll.head_->next_;
+ return this->not_done ();
+}
+
+template <class T> int
ACE_Double_Linked_List_Iterator<T>::done (void) const
{
return this->not_done () ? 0 : 1;
@@ -1103,6 +1118,15 @@ ACE_Fixed_Set_Iterator<T, SIZE>::advance (void)
}
template <class T, size_t SIZE> int
+ACE_Fixed_Set_Iterator<T, SIZE>::first (void)
+{
+ ACE_TRACE ("ACE_Fixed_Set_Iterator<T, SIZE>::first");
+
+ next_ = -1;
+ return this->advance ();
+}
+
+template <class T, size_t SIZE> int
ACE_Fixed_Set_Iterator<T, SIZE>::done (void) const
{
ACE_TRACE ("ACE_Fixed_Set_Iterator<T, SIZE>::done");
@@ -1307,6 +1331,15 @@ ACE_Bounded_Set_Iterator<T>::advance (void)
}
template <class T> int
+ACE_Bounded_Set_Iterator<T>::first (void)
+{
+ ACE_TRACE ("ACE_Bounded_Set_Iterator<T>::first");
+
+ next_ = -1;
+ return this->advance ();
+}
+
+template <class T> int
ACE_Bounded_Set_Iterator<T>::done (void) const
{
ACE_TRACE ("ACE_Bounded_Set_Iterator<T>::done");
@@ -1611,6 +1644,14 @@ ACE_Unbounded_Set_Iterator<T>::advance (void)
}
template <class T> int
+ACE_Unbounded_Set_Iterator<T>::first (void)
+{
+// ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::first");
+ this->current_ = this->set_->head_->next_;
+ return this->current_ != this->set_->head_;
+}
+
+template <class T> int
ACE_Unbounded_Set_Iterator<T>::done (void) const
{
ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::done");
@@ -1696,6 +1737,14 @@ ACE_Unbounded_Stack_Iterator<T>::advance (void)
}
template <class T> int
+ACE_Unbounded_Stack_Iterator<T>::first (void)
+{
+// ACE_TRACE ("ACE_Unbounded_Stack_Iterator<T>::first");
+ this->current_ = this->stack_.head_->next_;
+ return this->current_ != this->stack_.head_;
+}
+
+template <class T> int
ACE_Unbounded_Stack_Iterator<T>::done (void) const
{
ACE_TRACE ("ACE_Unbounded_Stack_Iterator<T>::done");