summaryrefslogtreecommitdiff
path: root/ace/Containers.i
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-09-07 03:36:55 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-09-07 03:36:55 +0000
commitfde65b269be13ab2bbe9cdfc11f22844306198ee (patch)
tree9e20cc5bfec4c4cf931219d530e561b60565d40e /ace/Containers.i
parent7c9ada52e7c281f0fd11b6b92ad379a2f25f3f6f (diff)
downloadATCD-fde65b269be13ab2bbe9cdfc11f22844306198ee.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/Containers.i')
-rw-r--r--ace/Containers.i79
1 files changed, 79 insertions, 0 deletions
diff --git a/ace/Containers.i b/ace/Containers.i
index 6dabbd04f5c..c49f95438a4 100644
--- a/ace/Containers.i
+++ b/ace/Containers.i
@@ -297,3 +297,82 @@ ACE_Ordered_MultiSet<T>::size (void) const
// ACE_TRACE ("ACE_Ordered_MultiSet<T>::size");
return this->cur_size_;
}
+
+// Clean up the array (e.g., delete dynamically allocated memory).
+
+template <class T> ACE_INLINE
+ACE_Array<T>::~ACE_Array (void)
+{
+ delete [] this->array_;
+}
+
+template <class T> ACE_INLINE size_t
+ACE_Array<T>::size (void) const
+{
+ return this->cur_size_;
+}
+
+template <class T> ACE_INLINE int
+ACE_Array<T>::in_range (size_t index) const
+{
+ return index < this->cur_size_;
+}
+
+template <class T> ACE_INLINE T &
+ACE_Array<T>::operator[] (size_t index)
+{
+ return this->array_[index];
+}
+
+template <class T> ACE_INLINE const T &
+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 ();
+}