summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-05-08 07:37:52 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-05-08 07:37:52 +0000
commit84c7f1b5175419d86e7b2b4bb9a2f7f3d4429c46 (patch)
tree00a1107982d583e801406576b28a6fa5daf2dacf /ace
parent84a94b535724d036e083e8e7bba1d095fba2f08b (diff)
downloadATCD-84c7f1b5175419d86e7b2b4bb9a2f7f3d4429c46.tar.gz
*** empty log message ***
Diffstat (limited to 'ace')
-rw-r--r--ace/Containers.h10
-rw-r--r--ace/Containers.i20
2 files changed, 29 insertions, 1 deletions
diff --git a/ace/Containers.h b/ace/Containers.h
index 787f8bc3c29..6a1cf76614b 100644
--- a/ace/Containers.h
+++ b/ace/Containers.h
@@ -68,6 +68,9 @@ public:
int is_full (void) const;
// Returns 1 if the container is full, otherwise returns 0.
+ size_t size (void) const;
+ // The number of items in the stack.
+
void dump (void) const;
// Dump the state of an object.
@@ -135,6 +138,9 @@ public:
int is_full (void) const;
// Returns 1 if the container is full, otherwise returns 0.
+ size_t size (void) const;
+ // The number of items in the stack.
+
void dump (void) const;
// Dump the state of an object.
@@ -197,6 +203,7 @@ class ACE_Unbounded_Stack
// = DESCRIPTION
// This implementation of an unbounded Stack uses a linked list.
{
+ friend class ACE_Unbounded_Stack_Iterator<T>;
public:
// = Initialization, assignemnt, and termination methods.
ACE_Unbounded_Stack (void);
@@ -250,6 +257,9 @@ public:
int find (const T &item) const;
// Finds if <item> occurs the set. Returns 1 if finds, else 0.
+ size_t size (void) const;
+ // The number of items in the stack.
+
void dump (void) const;
// Dump the state of an object.
diff --git a/ace/Containers.i b/ace/Containers.i
index 87ea4b4016a..2ca3093f72c 100644
--- a/ace/Containers.i
+++ b/ace/Containers.i
@@ -56,6 +56,12 @@ ACE_Bounded_Stack<T>::top (T &item) const
return 0;
}
+template <class T> ACE_INLINE size_t
+ACE_Bounded_Stack<T>::size (void) const
+{
+ return this->size_;
+}
+
//----------------------------------------
template <class T, size_t SIZE> ACE_INLINE int
@@ -111,6 +117,12 @@ ACE_Fixed_Stack<T, SIZE>::top (T &item) const
return 0;
}
+template <class T, size_t SIZE> ACE_INLINE size_t
+ACE_Fixed_Stack<T, SIZE>::size (void) const
+{
+ return this->size_;
+}
+
//----------------------------------------
template <class T> ACE_INLINE int
@@ -141,13 +153,19 @@ ACE_Unbounded_Stack<T>::is_full (void) const
}
template <class T> ACE_INLINE size_t
-ACE_Unbounded_Queue<T>::size (void) const
+ACE_Unbounded_Stack<T>::size (void) const
{
return this->cur_size_;
}
// ---
+template <class T> ACE_INLINE size_t
+ACE_Unbounded_Queue<T>::size (void) const
+{
+ return this->cur_size_;
+}
+
template <class T> ACE_INLINE int
ACE_Unbounded_Queue<T>::is_empty (void) const
{