6 #if !defined (ACE_LACKS_PRAGMA_ONCE)
8 #endif /* ACE_LACKS_PRAGMA_ONCE */
10 #if !defined (__ACE_INLINE__)
11 #include "ace/Map_T.inl"
12 #endif /* __ACE_INLINE__ */
14 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
16 template <class KEY
, class VALUE
>
17 ACE_Map
<KEY
, VALUE
>::~ACE_Map (void)
22 ACE_Iterator_Impl
<T
>::~ACE_Iterator_Impl (void)
27 ACE_Reverse_Iterator_Impl
<T
>::~ACE_Reverse_Iterator_Impl (void)
31 template <class T
, class IMPLEMENTATION
, class ENTRY
>
32 ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::~ACE_Map_Impl_Iterator_Adapter (void)
37 template <class T
, class IMPLEMENTATION
, class ENTRY
> ACE_Iterator_Impl
<T
> *
38 ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::clone (void) const
40 ACE_Iterator_Impl
<T
> *temp
= 0;
42 (ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>) (*this),
47 template <class T
, class IMPLEMENTATION
, class ENTRY
> int
48 ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::compare (const ACE_Iterator_Impl
<T
> &rhs
) const
50 const ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
> &rhs_local
51 = dynamic_cast<const ACE_Map_Impl_Iterator_Adapter
< T
, IMPLEMENTATION
, ENTRY
> &> (rhs
);
53 return this->implementation_
== rhs_local
.implementation_
;
56 template <class T
, class IMPLEMENTATION
, class ENTRY
> T
57 ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::dereference () const
59 ENTRY
&entry
= *this->implementation_
;
60 return T (entry
.ext_id_
,
64 template <class T
, class IMPLEMENTATION
, class ENTRY
> void
65 ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::plus_plus (void)
67 ++this->implementation_
;
70 template <class T
, class IMPLEMENTATION
, class ENTRY
> void
71 ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::minus_minus (void)
73 --this->implementation_
;
76 template <class T
, class IMPLEMENTATION
, class ENTRY
>
77 ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::~ACE_Map_Impl_Reverse_Iterator_Adapter (void)
81 template <class T
, class IMPLEMENTATION
, class ENTRY
> ACE_Reverse_Iterator_Impl
<T
> *
82 ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::clone (void) const
84 ACE_Reverse_Iterator_Impl
<T
> *temp
= 0;
86 (ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>) (*this),
92 template <class T
, class IMPLEMENTATION
, class ENTRY
> int
93 ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::compare (const ACE_Reverse_Iterator_Impl
<T
> &rhs
) const
95 const ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
> &rhs_local
96 = dynamic_cast<const ACE_Map_Impl_Reverse_Iterator_Adapter
< T
, IMPLEMENTATION
, ENTRY
> &> (rhs
);
98 return this->implementation_
== rhs_local
.implementation_
;
101 template <class T
, class IMPLEMENTATION
, class ENTRY
> T
102 ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::dereference () const
104 ENTRY
&entry
= *this->implementation_
;
105 return T (entry
.ext_id_
,
109 template <class T
, class IMPLEMENTATION
, class ENTRY
> void
110 ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::plus_plus (void)
112 ++this->implementation_
;
115 template <class T
, class IMPLEMENTATION
, class ENTRY
> void
116 ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::minus_minus (void)
118 --this->implementation_
;
122 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
>
123 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::~ACE_Map_Impl (void)
127 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
128 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::open (size_t length
,
129 ACE_Allocator
*alloc
)
131 return this->implementation_
.open (length
,
135 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
136 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::close (void)
138 return this->implementation_
.close ();
141 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
142 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::bind (const KEY
&key
,
145 return this->implementation_
.bind (key
,
149 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
150 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::bind_modify_key (const VALUE
&value
,
153 return this->implementation_
.bind_modify_key (value
,
157 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
158 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::create_key (KEY
&key
)
160 return this->implementation_
.create_key (key
);
163 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
164 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::bind_create_key (const VALUE
&value
,
167 return this->implementation_
.bind_create_key (value
,
171 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
172 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::bind_create_key (const VALUE
&value
)
174 return this->implementation_
.bind_create_key (value
);
177 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
178 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::recover_key (const KEY
&modified_key
,
181 return this->implementation_
.recover_key (modified_key
,
185 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
186 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::rebind (const KEY
&key
,
189 return this->implementation_
.rebind (key
,
193 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
194 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::rebind (const KEY
&key
,
198 return this->implementation_
.rebind (key
,
203 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
204 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::rebind (const KEY
&key
,
209 return this->implementation_
.rebind (key
,
215 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
216 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::trybind (const KEY
&key
,
219 return this->implementation_
.trybind (key
,
223 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
224 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::find (const KEY
&key
,
227 return this->implementation_
.find (key
,
231 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
232 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::find (const KEY
&key
)
234 return this->implementation_
.find (key
);
237 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
238 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::unbind (const KEY
&key
)
240 return this->implementation_
.unbind (key
);
243 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
244 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::unbind (const KEY
&key
,
247 return this->implementation_
.unbind (key
,
251 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> size_t
252 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::current_size (void) const
254 return this->implementation_
.current_size ();
257 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> size_t
258 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::total_size (void) const
260 return this->implementation_
.total_size ();
263 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> void
264 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::dump (void) const
266 #if defined (ACE_HAS_DUMP)
267 this->implementation_
.dump ();
268 #endif /* ACE_HAS_DUMP */
271 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
272 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::begin_impl (void)
274 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
275 ACE_NEW_RETURN (temp
,
276 iterator_impl (this->implementation_
.begin ()),
281 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
282 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::end_impl (void)
284 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
285 ACE_NEW_RETURN (temp
,
286 iterator_impl (this->implementation_
.end ()),
291 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
292 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::rbegin_impl (void)
294 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
295 ACE_NEW_RETURN (temp
,
296 reverse_iterator_impl (this->implementation_
.rbegin ()),
301 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
302 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::rend_impl (void)
304 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
305 ACE_NEW_RETURN (temp
,
306 reverse_iterator_impl (this->implementation_
.rend ()),
311 template <class T
, class VALUE
>
312 ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
>::~ACE_Active_Map_Manager_Iterator_Adapter (void)
316 template <class T
, class VALUE
> ACE_Iterator_Impl
<T
> *
317 ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
>::clone (void) const
319 ACE_Iterator_Impl
<T
> *temp
= 0;
320 ACE_NEW_RETURN (temp
,
321 (ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
>) (*this),
327 template <class T
, class VALUE
> int
328 ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
>::compare (const ACE_Iterator_Impl
<T
> &rhs
) const
330 const ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
> &rhs_local
331 = dynamic_cast<const ACE_Active_Map_Manager_Iterator_Adapter
< T
, VALUE
> &> (rhs
);
333 return this->implementation_
== rhs_local
.implementation_
;
336 template <class T
, class VALUE
> T
337 ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
>::dereference () const
339 // The following syntax is necessary to work around certain broken compilers.
340 // In particular, please do not prefix implementation_ with this->
341 return T ((*implementation_
).int_id_
.first
,
342 (*implementation_
).int_id_
.second
);
345 template <class T
, class VALUE
> void
346 ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
>::plus_plus (void)
348 ++this->implementation_
;
351 template <class T
, class VALUE
> void
352 ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
>::minus_minus (void)
354 --this->implementation_
;
357 template <class T
, class VALUE
>
358 ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
>::~ACE_Active_Map_Manager_Reverse_Iterator_Adapter (void)
362 template <class T
, class VALUE
> ACE_Reverse_Iterator_Impl
<T
> *
363 ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
>::clone (void) const
365 ACE_Reverse_Iterator_Impl
<T
> *temp
= 0;
366 ACE_NEW_RETURN (temp
,
367 (ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
>) (*this),
373 template <class T
, class VALUE
> int
374 ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
>::compare (const ACE_Reverse_Iterator_Impl
<T
> &rhs
) const
376 const ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
> &rhs_local
377 = dynamic_cast<const ACE_Active_Map_Manager_Reverse_Iterator_Adapter
< T
, VALUE
> &> (rhs
);
379 return this->implementation_
== rhs_local
.implementation_
;
382 template <class T
, class VALUE
> T
383 ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
>::dereference () const
385 // The following syntax is necessary to work around certain broken compilers.
386 // In particular, please do not prefix implementation_ with this->
387 return T ((*implementation_
).int_id_
.first
,
388 (*implementation_
).int_id_
.second
);
391 template <class T
, class VALUE
> void
392 ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
>::plus_plus (void)
394 ++this->implementation_
;
397 template <class T
, class VALUE
> void
398 ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
>::minus_minus (void)
400 --this->implementation_
;
403 template <class KEY
, class VALUE
, class KEY_ADAPTER
>
404 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::~ACE_Active_Map_Manager_Adapter (void)
408 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
409 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::open (size_t length
,
410 ACE_Allocator
*alloc
)
412 return this->implementation_
.open (length
,
416 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
417 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::close (void)
419 return this->implementation_
.close ();
422 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
423 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::bind (const KEY
&,
426 ACE_NOTSUP_RETURN (-1);
429 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
430 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::bind_modify_key (const VALUE
&value
,
433 // Reserve a slot and create an active key.
434 expanded_value
*internal_value
= 0;
435 ACE_Active_Map_Manager_Key active_key
;
436 int result
= this->implementation_
.bind (active_key
,
440 // Encode the active key and the existing user key into key part
441 // of <expanded_value>.
442 result
= this->key_adapter_
.encode (key
,
444 internal_value
->first
);
447 // Copy user value into <expanded_value>.
448 internal_value
->second
= value
;
449 // Copy new, modified key back to the user key.
450 key
= internal_value
->first
;
454 // In case of errors, unbind from map.
455 this->implementation_
.unbind (active_key
);
462 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
463 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::create_key (KEY
&)
465 ACE_NOTSUP_RETURN (-1);
468 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
469 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::bind_create_key (const VALUE
&value
,
472 // Reserve a slot and create an active key.
473 expanded_value
*internal_value
= 0;
474 ACE_Active_Map_Manager_Key active_key
;
475 int result
= this->implementation_
.bind (active_key
,
479 // Encode the active key into key part of <expanded_value>.
480 result
= this->key_adapter_
.encode (internal_value
->first
,
482 internal_value
->first
);
485 // Copy user value into <expanded_value>.
486 internal_value
->second
= value
;
487 // Copy new, modified key to the user key.
488 key
= internal_value
->first
;
492 // In case of errors, unbind from map.
493 this->implementation_
.unbind (active_key
);
500 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
501 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::bind_create_key (const VALUE
&value
)
503 // Reserve a slot and create an active key.
504 expanded_value
*internal_value
= 0;
505 ACE_Active_Map_Manager_Key active_key
;
506 int result
= this->implementation_
.bind (active_key
,
510 // Encode the active key into key part of <expanded_value>.
511 result
= this->key_adapter_
.encode (internal_value
->first
,
513 internal_value
->first
);
516 // Copy user value into <expanded_value>.
517 internal_value
->second
= value
;
521 // In case of errors, unbind from map.
522 this->implementation_
.unbind (active_key
);
529 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
530 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::recover_key (const KEY
&modified_key
,
533 // Ask the <key_adapter_> to help out with recovering the original
534 // user key, since it was the one that encode it in the first place.
535 return this->key_adapter_
.decode (modified_key
,
539 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
540 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::find (const KEY
&key
,
541 expanded_value
*&internal_value
)
543 // Ask the <key_adapter_> to recover the active key.
544 ACE_Active_Map_Manager_Key active_key
;
545 int result
= this->key_adapter_
.decode (key
,
549 // Find recovered active key in map.
550 result
= this->implementation_
.find (active_key
,
557 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
558 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::find (const KEY
&key
,
561 expanded_value
*internal_value
= 0;
562 int result
= this->find (key
,
568 value
= internal_value
->second
;
574 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
575 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::find (const KEY
&key
)
577 expanded_value
*internal_value
= 0;
578 return this->find (key
,
582 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
583 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::rebind (const KEY
&key
,
586 expanded_value
*internal_value
= 0;
587 int result
= this->find (key
,
593 internal_value
->second
= value
;
599 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
600 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::rebind (const KEY
&key
,
604 expanded_value
*internal_value
= 0;
605 int result
= this->find (key
,
611 old_value
= internal_value
->second
;
613 // Reset to new value.
614 internal_value
->second
= value
;
620 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
621 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::rebind (const KEY
&key
,
626 expanded_value
*internal_value
= 0;
627 int result
= this->find (key
,
632 // Copy old key and value.
633 old_key
= internal_value
->first
;
634 old_value
= internal_value
->second
;
636 // Reset to new value.
637 internal_value
->second
= value
;
643 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
644 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::trybind (const KEY
&,
647 ACE_NOTSUP_RETURN (-1);
650 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
651 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::unbind (const KEY
&key
,
652 expanded_value
*&internal_value
)
654 // Ask the <key_adapter_> to recover the active key.
655 ACE_Active_Map_Manager_Key active_key
;
656 int result
= this->key_adapter_
.decode (key
,
660 // Unbind recovered active key from map.
661 result
= this->implementation_
.unbind (active_key
,
668 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
669 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::unbind (const KEY
&key
)
671 expanded_value
*internal_value
= 0;
672 return this->unbind (key
,
676 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
677 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::unbind (const KEY
&key
,
680 expanded_value
*internal_value
= 0;
681 int result
= this->unbind (key
,
687 value
= internal_value
->second
;
693 template <class KEY
, class VALUE
, class KEY_ADAPTER
> size_t
694 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::current_size (void) const
696 return this->implementation_
.current_size ();
699 template <class KEY
, class VALUE
, class KEY_ADAPTER
> size_t
700 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::total_size (void) const
702 return this->implementation_
.total_size ();
705 template <class KEY
, class VALUE
, class KEY_ADAPTER
> void
706 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::dump (void) const
708 #if defined (ACE_HAS_DUMP)
709 this->implementation_
.dump ();
710 #endif /* ACE_HAS_DUMP */
713 template <class KEY
, class VALUE
, class KEY_ADAPTER
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
714 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::begin_impl (void)
716 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
717 ACE_NEW_RETURN (temp
,
718 iterator_impl (this->implementation_
.begin ()),
723 template <class KEY
, class VALUE
, class KEY_ADAPTER
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
724 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::end_impl (void)
726 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
727 ACE_NEW_RETURN (temp
,
728 iterator_impl (this->implementation_
.end ()),
733 template <class KEY
, class VALUE
, class KEY_ADAPTER
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
734 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::rbegin_impl (void)
736 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
737 ACE_NEW_RETURN (temp
,
738 reverse_iterator_impl (this->implementation_
.rbegin ()),
743 template <class KEY
, class VALUE
, class KEY_ADAPTER
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
744 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::rend_impl (void)
746 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
747 ACE_NEW_RETURN (temp
,
748 reverse_iterator_impl (this->implementation_
.rend ()),
753 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
>
754 ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::~ACE_Hash_Map_Manager_Ex_Iterator_Adapter (void)
758 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> ACE_Iterator_Impl
<T
> *
759 ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::clone (void) const
761 ACE_Iterator_Impl
<T
> *temp
= 0;
762 ACE_NEW_RETURN (temp
,
763 (ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>) (*this),
769 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> int
770 ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::compare (const ACE_Iterator_Impl
<T
> &rhs
) const
772 const ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
> &rhs_local
773 = dynamic_cast<const ACE_Hash_Map_Manager_Ex_Iterator_Adapter
< T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
> &> (rhs
);
775 return this->implementation_
== rhs_local
.implementation_
;
778 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> T
779 ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::dereference () const
781 // The following syntax is necessary to work around certain broken compilers.
782 // In particular, please do not prefix implementation_ with this->
783 return T ((*implementation_
).ext_id_
,
784 (*implementation_
).int_id_
);
787 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> void
788 ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::plus_plus (void)
790 ++this->implementation_
;
793 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> void
794 ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::minus_minus (void)
796 --this->implementation_
;
799 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
>
800 ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::~ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter (void)
804 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> ACE_Reverse_Iterator_Impl
<T
> *
805 ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::clone (void) const
807 ACE_Reverse_Iterator_Impl
<T
> *temp
= 0;
808 ACE_NEW_RETURN (temp
,
809 (ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>) (*this),
815 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> int
816 ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::compare (const ACE_Reverse_Iterator_Impl
<T
> &rhs
) const
818 const ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
> &rhs_local
819 = dynamic_cast<const ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
< T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
> &> (rhs
);
821 return this->implementation_
== rhs_local
.implementation_
;
824 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> T
825 ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::dereference () const
827 // The following syntax is necessary to work around certain broken compilers.
828 // In particular, please do not prefix implementation_ with this->
829 return T ((*implementation_
).ext_id_
,
830 (*implementation_
).int_id_
);
833 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> void
834 ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::plus_plus (void)
836 ++this->implementation_
;
839 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> void
840 ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::minus_minus (void)
842 --this->implementation_
;
845 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
>
846 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::~ACE_Hash_Map_Manager_Ex_Adapter (void)
850 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
851 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::open (size_t length
,
852 ACE_Allocator
*alloc
)
854 return this->implementation_
.open (length
,
858 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
859 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::close (void)
861 return this->implementation_
.close ();
864 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
865 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::bind (const KEY
&key
,
868 return this->implementation_
.bind (key
,
872 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
873 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::bind_modify_key (const VALUE
&value
,
876 return this->implementation_
.bind (key
,
880 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
881 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::create_key (KEY
&key
)
883 // Invoke the user specified key generation functor.
884 return this->key_generator_ (key
);
887 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
888 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::bind_create_key (const VALUE
&value
,
891 // Invoke the user specified key generation functor.
892 int result
= this->key_generator_ (key
);
897 result
= this->implementation_
.bind (key
,
904 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
905 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::bind_create_key (const VALUE
&value
)
908 return this->bind_create_key (value
,
912 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
913 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::recover_key (const KEY
&modified_key
,
916 original_key
= modified_key
;
920 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
921 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::rebind (const KEY
&key
,
924 return this->implementation_
.rebind (key
,
928 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
929 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::rebind (const KEY
&key
,
933 return this->implementation_
.rebind (key
,
938 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
939 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::rebind (const KEY
&key
,
944 return this->implementation_
.rebind (key
,
950 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
951 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::trybind (const KEY
&key
,
954 return this->implementation_
.trybind (key
,
958 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
959 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::find (const KEY
&key
,
962 return this->implementation_
.find (key
,
966 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
967 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::find (const KEY
&key
)
969 return this->implementation_
.find (key
);
972 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
973 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::unbind (const KEY
&key
)
975 return this->implementation_
.unbind (key
);
978 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
979 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::unbind (const KEY
&key
,
982 return this->implementation_
.unbind (key
,
986 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> size_t
987 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::current_size (void) const
989 return this->implementation_
.current_size ();
992 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> size_t
993 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::total_size (void) const
995 return this->implementation_
.total_size ();
998 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> void
999 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::dump (void) const
1001 #if defined (ACE_HAS_DUMP)
1002 this->implementation_
.dump ();
1003 #endif /* ACE_HAS_DUMP */
1006 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
1007 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::begin_impl (void)
1009 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
1010 ACE_NEW_RETURN (temp
,
1011 iterator_impl (this->implementation_
.begin ()),
1016 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
1017 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::end_impl (void)
1019 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
1020 ACE_NEW_RETURN (temp
,
1021 iterator_impl (this->implementation_
.end ()),
1026 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
1027 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::rbegin_impl (void)
1029 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
1030 ACE_NEW_RETURN (temp
,
1031 reverse_iterator_impl (this->implementation_
.rbegin ()),
1036 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
1037 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::rend_impl (void)
1039 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
1040 ACE_NEW_RETURN (temp
,
1041 reverse_iterator_impl (this->implementation_
.rend ()),
1046 template <class T
, class KEY
, class VALUE
>
1047 ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
>::~ACE_Map_Manager_Iterator_Adapter (void)
1051 template <class T
, class KEY
, class VALUE
> ACE_Iterator_Impl
<T
> *
1052 ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
>::clone (void) const
1054 ACE_Iterator_Impl
<T
> *temp
= 0;
1055 ACE_NEW_RETURN (temp
,
1056 (ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
>) (*this),
1062 template <class T
, class KEY
, class VALUE
> int
1063 ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
>::compare (const ACE_Iterator_Impl
<T
> &rhs
) const
1065 const ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
> &rhs_local
1066 = dynamic_cast<const ACE_Map_Manager_Iterator_Adapter
< T
, KEY
, VALUE
> &> (rhs
);
1068 return this->implementation_
== rhs_local
.implementation_
;
1071 template <class T
, class KEY
, class VALUE
> T
1072 ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
>::dereference () const
1074 // The following syntax is necessary to work around certain broken compilers.
1075 // In particular, please do not prefix implementation_ with this->
1076 return T ((*implementation_
).ext_id_
,
1077 (*implementation_
).int_id_
);
1080 template <class T
, class KEY
, class VALUE
> void
1081 ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
>::plus_plus (void)
1083 ++this->implementation_
;
1086 template <class T
, class KEY
, class VALUE
> void
1087 ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
>::minus_minus (void)
1089 --this->implementation_
;
1092 template <class T
, class KEY
, class VALUE
>
1093 ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
>::~ACE_Map_Manager_Reverse_Iterator_Adapter (void)
1097 template <class T
, class KEY
, class VALUE
> ACE_Reverse_Iterator_Impl
<T
> *
1098 ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
>::clone (void) const
1100 ACE_Reverse_Iterator_Impl
<T
> *temp
= 0;
1101 ACE_NEW_RETURN (temp
,
1102 (ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
>) (*this),
1108 template <class T
, class KEY
, class VALUE
> int
1109 ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
>::compare (const ACE_Reverse_Iterator_Impl
<T
> &rhs
) const
1111 const ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
> &rhs_local
1112 = dynamic_cast<const ACE_Map_Manager_Reverse_Iterator_Adapter
< T
, KEY
, VALUE
> &> (rhs
);
1114 return this->implementation_
== rhs_local
.implementation_
;
1117 template <class T
, class KEY
, class VALUE
> T
1118 ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
>::dereference () const
1120 // The following syntax is necessary to work around certain broken compilers.
1121 // In particular, please do not prefix implementation_ with this->
1122 return T ((*implementation_
).ext_id_
,
1123 (*implementation_
).int_id_
);
1126 template <class T
, class KEY
, class VALUE
> void
1127 ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
>::plus_plus (void)
1129 ++this->implementation_
;
1132 template <class T
, class KEY
, class VALUE
> void
1133 ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
>::minus_minus (void)
1135 --this->implementation_
;
1138 template <class KEY
, class VALUE
, class KEY_GENERATOR
>
1139 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::~ACE_Map_Manager_Adapter (void)
1143 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1144 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::open (size_t length
,
1145 ACE_Allocator
*alloc
)
1147 return this->implementation_
.open (length
,
1151 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1152 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::close (void)
1154 return this->implementation_
.close ();
1157 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1158 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::bind (const KEY
&key
,
1161 return this->implementation_
.bind (key
,
1165 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1166 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::bind_modify_key (const VALUE
&value
,
1169 return this->implementation_
.bind (key
,
1173 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1174 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::create_key (KEY
&key
)
1176 // Invoke the user specified key generation functor.
1177 return this->key_generator_ (key
);
1180 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1181 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::bind_create_key (const VALUE
&value
,
1184 // Invoke the user specified key generation functor.
1185 int result
= this->key_generator_ (key
);
1190 result
= this->implementation_
.bind (key
,
1197 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1198 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::bind_create_key (const VALUE
&value
)
1201 return this->bind_create_key (value
,
1205 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1206 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::recover_key (const KEY
&modified_key
,
1209 original_key
= modified_key
;
1213 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1214 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::rebind (const KEY
&key
,
1217 return this->implementation_
.rebind (key
,
1221 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1222 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::rebind (const KEY
&key
,
1226 return this->implementation_
.rebind (key
,
1231 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1232 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::rebind (const KEY
&key
,
1237 return this->implementation_
.rebind (key
,
1243 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1244 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::trybind (const KEY
&key
,
1247 return this->implementation_
.trybind (key
,
1251 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1252 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::find (const KEY
&key
,
1255 return this->implementation_
.find (key
,
1259 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1260 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::find (const KEY
&key
)
1262 return this->implementation_
.find (key
);
1265 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1266 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::unbind (const KEY
&key
)
1268 return this->implementation_
.unbind (key
);
1271 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1272 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::unbind (const KEY
&key
,
1275 return this->implementation_
.unbind (key
,
1279 template <class KEY
, class VALUE
, class KEY_GENERATOR
> size_t
1280 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::current_size (void) const
1282 return this->implementation_
.current_size ();
1285 template <class KEY
, class VALUE
, class KEY_GENERATOR
> size_t
1286 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::total_size (void) const
1288 return this->implementation_
.total_size ();
1291 template <class KEY
, class VALUE
, class KEY_GENERATOR
> void
1292 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::dump (void) const
1294 #if defined (ACE_HAS_DUMP)
1295 this->implementation_
.dump ();
1296 #endif /* ACE_HAS_DUMP */
1299 template <class KEY
, class VALUE
, class KEY_GENERATOR
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
1300 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::begin_impl (void)
1302 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
1303 ACE_NEW_RETURN (temp
,
1304 iterator_impl (this->implementation_
.begin ()),
1309 template <class KEY
, class VALUE
, class KEY_GENERATOR
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
1310 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::end_impl (void)
1312 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
1313 ACE_NEW_RETURN (temp
,
1314 iterator_impl (this->implementation_
.end ()),
1319 template <class KEY
, class VALUE
, class KEY_GENERATOR
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
1320 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::rbegin_impl (void)
1322 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
1323 ACE_NEW_RETURN (temp
,
1324 reverse_iterator_impl (this->implementation_
.rbegin ()),
1329 template <class KEY
, class VALUE
, class KEY_GENERATOR
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
1330 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::rend_impl (void)
1332 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
1333 ACE_NEW_RETURN (temp
,
1334 reverse_iterator_impl (this->implementation_
.rend ()),
1339 ACE_END_VERSIONED_NAMESPACE_DECL
1341 #endif /* ACE_MAP_T_CPP */