summaryrefslogtreecommitdiff
path: root/ace/Containers.h
diff options
context:
space:
mode:
authornw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-07-29 18:15:04 +0000
committernw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-07-29 18:15:04 +0000
commitf54306acd856dfec36606fff1de280f1e888460a (patch)
tree62afe8e8c0900b0213b3cc48d6bd052e0b944014 /ace/Containers.h
parent241e2af6f8351fdc19d3b6192fdae987b461f2e3 (diff)
downloadATCD-f54306acd856dfec36606fff1de280f1e888460a.tar.gz
Added back parameterized allocation strategy version.
Diffstat (limited to 'ace/Containers.h')
-rw-r--r--ace/Containers.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/ace/Containers.h b/ace/Containers.h
index cffb7258eac..372e159d3f9 100644
--- a/ace/Containers.h
+++ b/ace/Containers.h
@@ -19,6 +19,8 @@
#include "ace/ACE.h"
+class ACE_Allocator;
+
template <class T>
class ACE_Bounded_Stack
// = TITLE
@@ -206,8 +208,9 @@ class ACE_Unbounded_Stack
friend class ACE_Unbounded_Stack_Iterator<T>;
public:
// = Initialization, assignemnt, and termination methods.
- ACE_Unbounded_Stack (void);
- // Initialize a new stack so that it is empty.
+ ACE_Unbounded_Stack (ACE_Allocator *alloc = 0);
+ // Initialize a new stack so that it is empty. Use user defined
+ // allocation strategy if specified.
ACE_Unbounded_Stack (const ACE_Unbounded_Stack<T> &s);
// The copy constructor (performs initialization).
@@ -278,6 +281,9 @@ private:
size_t cur_size_;
// Current size of the stack.
+
+ ACE_Allocator *allocator_;
+ // Allocation strategy of the stack.
};
template <class T>
@@ -367,8 +373,9 @@ class ACE_Unbounded_Queue
friend class ACE_Unbounded_Queue_Iterator<T>;
public:
// = Initialization and termination methods.
- ACE_Unbounded_Queue (void);
- // construction.
+ ACE_Unbounded_Queue (ACE_Allocator *alloc = 0);
+ // construction. Use user specified allocation strategy
+ // if specified.
ACE_Unbounded_Queue (const ACE_Unbounded_Queue<T> &);
// Copy constructor.
@@ -437,6 +444,9 @@ protected:
size_t cur_size_;
// Current size of the queue.
+
+ ACE_Allocator *allocator_;
+ // Allocation Strategy of the queue.
};
template <class T>
@@ -488,8 +498,9 @@ class ACE_Unbounded_Set
friend class ACE_Unbounded_Set_Iterator<T>;
public:
// = Initialization and termination methods.
- ACE_Unbounded_Set (void);
- // Constructor.
+ ACE_Unbounded_Set (ACE_Allocator *alloc = 0);
+ // Constructor. Use user specified allocation strategy
+ // if specified.
ACE_Unbounded_Set (const ACE_Unbounded_Set<T> &);
// Copy constructor.
@@ -549,6 +560,9 @@ private:
size_t cur_size_;
// Current size of the set.
+
+ ACE_Allocator *allocator_;
+ // Allocation strategy of the set.
};
// Forward declaration.