summaryrefslogtreecommitdiff
path: root/ace/Array.i
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-10-24 01:36:13 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-10-24 01:36:13 +0000
commit7dbaa3064b1317bacece0233ca9cc5b21d0e87d9 (patch)
tree3ad90b5241ee46fb0e4a334e3b951113daa625ea /ace/Array.i
parent642ed05feae794ae8971c97c6b5be511c00bb5bb (diff)
downloadATCD-7dbaa3064b1317bacece0233ca9cc5b21d0e87d9.tar.gz
added ACE_Array_Iterator
Diffstat (limited to 'ace/Array.i')
-rw-r--r--ace/Array.i47
1 files changed, 47 insertions, 0 deletions
diff --git a/ace/Array.i b/ace/Array.i
index 36e36264cb1..32058b290b8 100644
--- a/ace/Array.i
+++ b/ace/Array.i
@@ -31,3 +31,50 @@ ACE_Array<T>::operator[] (size_t index) const
{
return this->array_[index];
}
+
+// Compare this array with <s> for inequality.
+
+template <class T> ACE_INLINE int
+ACE_Array<T>::operator!= (const ACE_Array<T> &s) const
+{
+ return !(*this == s);
+}
+
+template <class T> ACE_INLINE void
+ACE_Array_Iterator<T>::dump (void) const
+{
+ // ACE_TRACE ("ACE_Array_Iterator<T>::dump");
+}
+
+template <class T> ACE_INLINE
+ACE_Array_Iterator<T>::ACE_Array_Iterator (ACE_Array<T> &a)
+ : current_ (0),
+ array_ (a)
+{
+ // ACE_TRACE ("ACE_Array_Iterator<T>::ACE_Array_Iterator");
+}
+
+template <class T> ACE_INLINE int
+ACE_Array_Iterator<T>::advance (void)
+{
+ // ACE_TRACE ("ACE_Array_Iterator<T>::advance");
+
+ if (this->current_ < array_.size ())
+ {
+ ++this->current_;
+ return 1;
+ }
+ else
+ {
+ // Already finished iterating.
+ return 0;
+ }
+}
+
+template <class T> ACE_INLINE int
+ACE_Array_Iterator<T>::done (void) const
+{
+ ACE_TRACE ("ACE_Array_Iterator<T>::done");
+
+ return this->current_ >= array_.size ();
+}