2 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
4 template<typename Key, typename Value, class EqualTo, class Alloc>
6 ACE_Array_Map<Key, Value, EqualTo, Alloc>::ACE_Array_Map (
7 typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::size_type s)
10 , nodes_ (s == 0 ? 0 : this->alloc_.allocate (s))
12 std::uninitialized_fill_n (this->nodes_, s, value_type ());
15 template<typename Key, typename Value, class EqualTo, class Alloc>
16 ACE_INLINE ACE_Array_Map<Key, Value, EqualTo, Alloc> &
17 ACE_Array_Map<Key, Value, EqualTo, Alloc>::operator= (
18 ACE_Array_Map<Key, Value, EqualTo, Alloc> const & map)
20 // Strongly exception-safe assignment.
22 ACE_Array_Map<Key, Value, EqualTo, Alloc> temp (map);
27 template<typename Key, typename Value, class EqualTo, class Alloc>
28 ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::iterator
29 ACE_Array_Map<Key, Value, EqualTo, Alloc>::begin ()
34 template<typename Key, typename Value, class EqualTo, class Alloc>
35 ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::iterator
36 ACE_Array_Map<Key, Value, EqualTo, Alloc>::end ()
38 return this->nodes_ + this->size_;
41 template<typename Key, typename Value, class EqualTo, class Alloc>
42 ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::const_iterator
43 ACE_Array_Map<Key, Value, EqualTo, Alloc>::begin () const
48 template<typename Key, typename Value, class EqualTo, class Alloc>
49 ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::const_iterator
50 ACE_Array_Map<Key, Value, EqualTo, Alloc>::end () const
52 return this->nodes_ + this->size_;
55 template<typename Key, typename Value, class EqualTo, class Alloc>
56 ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::reverse_iterator
57 ACE_Array_Map<Key, Value, EqualTo, Alloc>::rbegin ()
59 return reverse_iterator (this->end ());
62 template<typename Key, typename Value, class EqualTo, class Alloc>
63 ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::reverse_iterator
64 ACE_Array_Map<Key, Value, EqualTo, Alloc>::rend ()
66 return reverse_iterator (this->begin ());
69 template<typename Key, typename Value, class EqualTo, class Alloc>
70 ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::const_reverse_iterator
71 ACE_Array_Map<Key, Value, EqualTo, Alloc>::rbegin () const
73 return const_reverse_iterator (this->end ());
76 template<typename Key, typename Value, class EqualTo, class Alloc>
77 ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::const_reverse_iterator
78 ACE_Array_Map<Key, Value, EqualTo, Alloc>::rend () const
80 return const_reverse_iterator (this->begin ());
83 template<typename Key, typename Value, class EqualTo, class Alloc>
84 ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::size_type
85 ACE_Array_Map<Key, Value, EqualTo, Alloc>::size () const
90 template<typename Key, typename Value, class EqualTo, class Alloc>
91 ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::size_type
92 ACE_Array_Map<Key, Value, EqualTo, Alloc>::max_size () const
94 return size_type (-1) / sizeof (value_type);
97 template<typename Key, typename Value, class EqualTo, class Alloc>
99 ACE_Array_Map<Key, Value, EqualTo, Alloc>::is_empty () const
101 return this->size_ == 0;
104 // The following method is deprecated.
106 template<typename Key, typename Value, class EqualTo, class Alloc>
108 ACE_Array_Map<Key, Value, EqualTo, Alloc>::empty () const
110 return this->is_empty ();
113 template<typename Key, typename Value, class EqualTo, class Alloc>
114 ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::size_type
115 ACE_Array_Map<Key, Value, EqualTo, Alloc>::count (
116 typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::key_type const & k)
119 (this->find (k) == this->end () ? 0 : 1); // Only one datum per key.
122 template<typename Key, typename Value, class EqualTo, class Alloc>
123 ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::mapped_type &
124 ACE_Array_Map<Key, Value, EqualTo, Alloc>::operator[] (
125 typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::key_type const & k)
127 iterator i = (this->insert (value_type (k, mapped_type ()))).first;
131 ACE_END_VERSIONED_NAMESPACE_DECL