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 T
, class IMPLEMENTATION
, class ENTRY
> ACE_Iterator_Impl
<T
> *
17 ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::clone () const
19 ACE_Iterator_Impl
<T
> *temp
= 0;
21 (ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>) (*this),
26 template <class T
, class IMPLEMENTATION
, class ENTRY
> int
27 ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::compare (const ACE_Iterator_Impl
<T
> &rhs
) const
29 const ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
> &rhs_local
30 = dynamic_cast<const ACE_Map_Impl_Iterator_Adapter
< T
, IMPLEMENTATION
, ENTRY
> &> (rhs
);
32 return this->implementation_
== rhs_local
.implementation_
;
35 template <class T
, class IMPLEMENTATION
, class ENTRY
> T
36 ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::dereference () const
38 ENTRY
&entry
= *this->implementation_
;
39 return T (entry
.ext_id_
,
43 template <class T
, class IMPLEMENTATION
, class ENTRY
> void
44 ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::plus_plus ()
46 ++this->implementation_
;
49 template <class T
, class IMPLEMENTATION
, class ENTRY
> void
50 ACE_Map_Impl_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::minus_minus ()
52 --this->implementation_
;
55 template <class T
, class IMPLEMENTATION
, class ENTRY
>
56 ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::~ACE_Map_Impl_Reverse_Iterator_Adapter ()
60 template <class T
, class IMPLEMENTATION
, class ENTRY
> ACE_Reverse_Iterator_Impl
<T
> *
61 ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::clone () const
63 ACE_Reverse_Iterator_Impl
<T
> *temp
= 0;
65 (ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>) (*this),
70 template <class T
, class IMPLEMENTATION
, class ENTRY
> int
71 ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::compare (const ACE_Reverse_Iterator_Impl
<T
> &rhs
) const
73 const ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
> &rhs_local
74 = dynamic_cast<const ACE_Map_Impl_Reverse_Iterator_Adapter
< T
, IMPLEMENTATION
, ENTRY
> &> (rhs
);
76 return this->implementation_
== rhs_local
.implementation_
;
79 template <class T
, class IMPLEMENTATION
, class ENTRY
> T
80 ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::dereference () const
82 ENTRY
&entry
= *this->implementation_
;
83 return T (entry
.ext_id_
,
87 template <class T
, class IMPLEMENTATION
, class ENTRY
> void
88 ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::plus_plus ()
90 ++this->implementation_
;
93 template <class T
, class IMPLEMENTATION
, class ENTRY
> void
94 ACE_Map_Impl_Reverse_Iterator_Adapter
<T
, IMPLEMENTATION
, ENTRY
>::minus_minus ()
96 --this->implementation_
;
100 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
>
101 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::~ACE_Map_Impl ()
105 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
106 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::open (size_t length
,
107 ACE_Allocator
*alloc
)
109 return this->implementation_
.open (length
,
113 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
114 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::close ()
116 return this->implementation_
.close ();
119 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
120 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::bind (const KEY
&key
,
123 return this->implementation_
.bind (key
,
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
>::bind_modify_key (const VALUE
&value
,
131 return this->implementation_
.bind_modify_key (value
,
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
>::create_key (KEY
&key
)
138 return this->implementation_
.create_key (key
);
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_create_key (const VALUE
&value
,
145 return this->implementation_
.bind_create_key (value
,
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_create_key (const VALUE
&value
)
152 return this->implementation_
.bind_create_key (value
);
155 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
156 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::recover_key (const KEY
&modified_key
,
159 return this->implementation_
.recover_key (modified_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
>::rebind (const KEY
&key
,
167 return this->implementation_
.rebind (key
,
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
>::rebind (const KEY
&key
,
176 return this->implementation_
.rebind (key
,
181 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
182 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::rebind (const KEY
&key
,
187 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
>::trybind (const KEY
&key
,
197 return this->implementation_
.trybind (key
,
201 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
202 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::find (const KEY
&key
,
205 return this->implementation_
.find (key
,
209 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
210 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::find (const KEY
&key
)
212 return this->implementation_
.find (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
>::unbind (const KEY
&key
)
218 return this->implementation_
.unbind (key
);
221 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> int
222 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::unbind (const KEY
&key
,
225 return this->implementation_
.unbind (key
,
229 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> size_t
230 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::current_size () const
232 return this->implementation_
.current_size ();
235 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> size_t
236 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::total_size () const
238 return this->implementation_
.total_size ();
241 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> void
242 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::dump () const
244 #if defined (ACE_HAS_DUMP)
245 this->implementation_
.dump ();
246 #endif /* ACE_HAS_DUMP */
249 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
250 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::begin_impl ()
252 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
253 ACE_NEW_RETURN (temp
,
254 iterator_impl (this->implementation_
.begin ()),
259 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
260 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::end_impl ()
262 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
263 ACE_NEW_RETURN (temp
,
264 iterator_impl (this->implementation_
.end ()),
269 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
270 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::rbegin_impl ()
272 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
273 ACE_NEW_RETURN (temp
,
274 reverse_iterator_impl (this->implementation_
.rbegin ()),
279 template <class KEY
, class VALUE
, class IMPLEMENTATION
, class ITERATOR
, class REVERSE_ITERATOR
, class ENTRY
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
280 ACE_Map_Impl
<KEY
, VALUE
, IMPLEMENTATION
, ITERATOR
, REVERSE_ITERATOR
, ENTRY
>::rend_impl ()
282 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
283 ACE_NEW_RETURN (temp
,
284 reverse_iterator_impl (this->implementation_
.rend ()),
289 template <class T
, class VALUE
>
290 ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
>::~ACE_Active_Map_Manager_Iterator_Adapter ()
294 template <class T
, class VALUE
> ACE_Iterator_Impl
<T
> *
295 ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
>::clone () const
297 ACE_Iterator_Impl
<T
> *temp
= 0;
298 ACE_NEW_RETURN (temp
,
299 (ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
>) (*this),
305 template <class T
, class VALUE
> int
306 ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
>::compare (const ACE_Iterator_Impl
<T
> &rhs
) const
308 const ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
> &rhs_local
309 = dynamic_cast<const ACE_Active_Map_Manager_Iterator_Adapter
< T
, VALUE
> &> (rhs
);
311 return this->implementation_
== rhs_local
.implementation_
;
314 template <class T
, class VALUE
> T
315 ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
>::dereference () const
317 // The following syntax is necessary to work around certain broken compilers.
318 // In particular, please do not prefix implementation_ with this->
319 return T ((*implementation_
).int_id_
.first
,
320 (*implementation_
).int_id_
.second
);
323 template <class T
, class VALUE
> void
324 ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
>::plus_plus ()
326 ++this->implementation_
;
329 template <class T
, class VALUE
> void
330 ACE_Active_Map_Manager_Iterator_Adapter
<T
, VALUE
>::minus_minus ()
332 --this->implementation_
;
335 template <class T
, class VALUE
>
336 ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
>::~ACE_Active_Map_Manager_Reverse_Iterator_Adapter ()
340 template <class T
, class VALUE
> ACE_Reverse_Iterator_Impl
<T
> *
341 ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
>::clone () const
343 ACE_Reverse_Iterator_Impl
<T
> *temp
= 0;
344 ACE_NEW_RETURN (temp
,
345 (ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
>) (*this),
351 template <class T
, class VALUE
> int
352 ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
>::compare (const ACE_Reverse_Iterator_Impl
<T
> &rhs
) const
354 const ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
> &rhs_local
355 = dynamic_cast<const ACE_Active_Map_Manager_Reverse_Iterator_Adapter
< T
, VALUE
> &> (rhs
);
357 return this->implementation_
== rhs_local
.implementation_
;
360 template <class T
, class VALUE
> T
361 ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
>::dereference () const
363 // The following syntax is necessary to work around certain broken compilers.
364 // In particular, please do not prefix implementation_ with this->
365 return T ((*implementation_
).int_id_
.first
,
366 (*implementation_
).int_id_
.second
);
369 template <class T
, class VALUE
> void
370 ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
>::plus_plus ()
372 ++this->implementation_
;
375 template <class T
, class VALUE
> void
376 ACE_Active_Map_Manager_Reverse_Iterator_Adapter
<T
, VALUE
>::minus_minus ()
378 --this->implementation_
;
381 template <class KEY
, class VALUE
, class KEY_ADAPTER
>
382 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::~ACE_Active_Map_Manager_Adapter ()
386 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
387 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::open (size_t length
,
388 ACE_Allocator
*alloc
)
390 return this->implementation_
.open (length
,
394 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
395 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::close ()
397 return this->implementation_
.close ();
400 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
401 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::bind (const KEY
&,
404 ACE_NOTSUP_RETURN (-1);
407 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
408 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::bind_modify_key (const VALUE
&value
,
411 // Reserve a slot and create an active key.
412 expanded_value
*internal_value
= 0;
413 ACE_Active_Map_Manager_Key active_key
;
414 int result
= this->implementation_
.bind (active_key
,
418 // Encode the active key and the existing user key into key part
419 // of <expanded_value>.
420 result
= this->key_adapter_
.encode (key
,
422 internal_value
->first
);
425 // Copy user value into <expanded_value>.
426 internal_value
->second
= value
;
427 // Copy new, modified key back to the user key.
428 key
= internal_value
->first
;
432 // In case of errors, unbind from map.
433 this->implementation_
.unbind (active_key
);
440 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
441 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::create_key (KEY
&)
443 ACE_NOTSUP_RETURN (-1);
446 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
447 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::bind_create_key (const VALUE
&value
,
450 // Reserve a slot and create an active key.
451 expanded_value
*internal_value
= 0;
452 ACE_Active_Map_Manager_Key active_key
;
453 int result
= this->implementation_
.bind (active_key
,
457 // Encode the active key into key part of <expanded_value>.
458 result
= this->key_adapter_
.encode (internal_value
->first
,
460 internal_value
->first
);
463 // Copy user value into <expanded_value>.
464 internal_value
->second
= value
;
465 // Copy new, modified key to the user key.
466 key
= internal_value
->first
;
470 // In case of errors, unbind from map.
471 this->implementation_
.unbind (active_key
);
478 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
479 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::bind_create_key (const VALUE
&value
)
481 // Reserve a slot and create an active key.
482 expanded_value
*internal_value
= 0;
483 ACE_Active_Map_Manager_Key active_key
;
484 int result
= this->implementation_
.bind (active_key
,
488 // Encode the active key into key part of <expanded_value>.
489 result
= this->key_adapter_
.encode (internal_value
->first
,
491 internal_value
->first
);
494 // Copy user value into <expanded_value>.
495 internal_value
->second
= value
;
499 // In case of errors, unbind from map.
500 this->implementation_
.unbind (active_key
);
507 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
508 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::recover_key (const KEY
&modified_key
,
511 // Ask the <key_adapter_> to help out with recovering the original
512 // user key, since it was the one that encode it in the first place.
513 return this->key_adapter_
.decode (modified_key
,
517 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
518 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::find (const KEY
&key
,
519 expanded_value
*&internal_value
)
521 // Ask the <key_adapter_> to recover the active key.
522 ACE_Active_Map_Manager_Key active_key
;
523 int result
= this->key_adapter_
.decode (key
,
527 // Find recovered active key in map.
528 result
= this->implementation_
.find (active_key
,
535 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
536 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::find (const KEY
&key
,
539 expanded_value
*internal_value
= 0;
540 int result
= this->find (key
,
546 value
= internal_value
->second
;
552 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
553 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::find (const KEY
&key
)
555 expanded_value
*internal_value
= 0;
556 return this->find (key
,
560 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
561 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::rebind (const KEY
&key
,
564 expanded_value
*internal_value
= 0;
565 int result
= this->find (key
,
571 internal_value
->second
= value
;
577 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
578 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::rebind (const KEY
&key
,
582 expanded_value
*internal_value
= 0;
583 int result
= this->find (key
,
589 old_value
= internal_value
->second
;
591 // Reset to new value.
592 internal_value
->second
= value
;
598 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
599 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
,
610 // Copy old key and value.
611 old_key
= internal_value
->first
;
612 old_value
= internal_value
->second
;
614 // Reset to new value.
615 internal_value
->second
= value
;
621 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
622 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::trybind (const KEY
&,
625 ACE_NOTSUP_RETURN (-1);
628 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
629 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::unbind (const KEY
&key
,
630 expanded_value
*&internal_value
)
632 // Ask the <key_adapter_> to recover the active key.
633 ACE_Active_Map_Manager_Key active_key
;
634 int result
= this->key_adapter_
.decode (key
,
638 // Unbind recovered active key from map.
639 result
= this->implementation_
.unbind (active_key
,
646 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
647 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::unbind (const KEY
&key
)
649 expanded_value
*internal_value
= 0;
650 return this->unbind (key
,
654 template <class KEY
, class VALUE
, class KEY_ADAPTER
> int
655 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::unbind (const KEY
&key
,
658 expanded_value
*internal_value
= 0;
659 int result
= this->unbind (key
,
665 value
= internal_value
->second
;
671 template <class KEY
, class VALUE
, class KEY_ADAPTER
> size_t
672 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::current_size () const
674 return this->implementation_
.current_size ();
677 template <class KEY
, class VALUE
, class KEY_ADAPTER
> size_t
678 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::total_size () const
680 return this->implementation_
.total_size ();
683 template <class KEY
, class VALUE
, class KEY_ADAPTER
> void
684 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::dump () const
686 #if defined (ACE_HAS_DUMP)
687 this->implementation_
.dump ();
688 #endif /* ACE_HAS_DUMP */
691 template <class KEY
, class VALUE
, class KEY_ADAPTER
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
692 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::begin_impl ()
694 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
695 ACE_NEW_RETURN (temp
,
696 iterator_impl (this->implementation_
.begin ()),
701 template <class KEY
, class VALUE
, class KEY_ADAPTER
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
702 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::end_impl ()
704 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
705 ACE_NEW_RETURN (temp
,
706 iterator_impl (this->implementation_
.end ()),
711 template <class KEY
, class VALUE
, class KEY_ADAPTER
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
712 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::rbegin_impl ()
714 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
715 ACE_NEW_RETURN (temp
,
716 reverse_iterator_impl (this->implementation_
.rbegin ()),
721 template <class KEY
, class VALUE
, class KEY_ADAPTER
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
722 ACE_Active_Map_Manager_Adapter
<KEY
, VALUE
, KEY_ADAPTER
>::rend_impl ()
724 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
725 ACE_NEW_RETURN (temp
,
726 reverse_iterator_impl (this->implementation_
.rend ()),
731 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
>
732 ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::~ACE_Hash_Map_Manager_Ex_Iterator_Adapter ()
736 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> ACE_Iterator_Impl
<T
> *
737 ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::clone () const
739 ACE_Iterator_Impl
<T
> *temp
= 0;
740 ACE_NEW_RETURN (temp
,
741 (ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>) (*this),
747 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> int
748 ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::compare (const ACE_Iterator_Impl
<T
> &rhs
) const
750 const ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
> &rhs_local
751 = dynamic_cast<const ACE_Hash_Map_Manager_Ex_Iterator_Adapter
< T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
> &> (rhs
);
753 return this->implementation_
== rhs_local
.implementation_
;
756 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> T
757 ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::dereference () const
759 // The following syntax is necessary to work around certain broken compilers.
760 // In particular, please do not prefix implementation_ with this->
761 return T ((*implementation_
).ext_id_
,
762 (*implementation_
).int_id_
);
765 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> void
766 ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::plus_plus ()
768 ++this->implementation_
;
771 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> void
772 ACE_Hash_Map_Manager_Ex_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::minus_minus ()
774 --this->implementation_
;
777 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
>
778 ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::~ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter ()
782 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> ACE_Reverse_Iterator_Impl
<T
> *
783 ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::clone () const
785 ACE_Reverse_Iterator_Impl
<T
> *temp
= 0;
786 ACE_NEW_RETURN (temp
,
787 (ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>) (*this),
793 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> int
794 ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::compare (const ACE_Reverse_Iterator_Impl
<T
> &rhs
) const
796 const ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
> &rhs_local
797 = dynamic_cast<const ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
< T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
> &> (rhs
);
799 return this->implementation_
== rhs_local
.implementation_
;
802 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> T
803 ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::dereference () const
805 // The following syntax is necessary to work around certain broken compilers.
806 // In particular, please do not prefix implementation_ with this->
807 return T ((*implementation_
).ext_id_
,
808 (*implementation_
).int_id_
);
811 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> void
812 ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::plus_plus ()
814 ++this->implementation_
;
817 template <class T
, class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
> void
818 ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
>::minus_minus ()
820 --this->implementation_
;
823 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
>
824 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::~ACE_Hash_Map_Manager_Ex_Adapter ()
828 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
829 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::open (size_t length
,
830 ACE_Allocator
*alloc
)
832 return this->implementation_
.open (length
,
836 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
837 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::close ()
839 return this->implementation_
.close ();
842 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
843 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::bind (const KEY
&key
,
846 return this->implementation_
.bind (key
,
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
>::bind_modify_key (const VALUE
&value
,
854 return this->implementation_
.bind (key
,
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
>::create_key (KEY
&key
)
861 // Invoke the user specified key generation functor.
862 return this->key_generator_ (key
);
865 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
866 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::bind_create_key (const VALUE
&value
,
869 // Invoke the user specified key generation functor.
870 int result
= this->key_generator_ (key
);
875 result
= this->implementation_
.bind (key
,
882 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
883 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::bind_create_key (const VALUE
&value
)
886 return this->bind_create_key (value
,
890 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
891 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::recover_key (const KEY
&modified_key
,
894 original_key
= modified_key
;
898 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
899 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::rebind (const KEY
&key
,
902 return this->implementation_
.rebind (key
,
906 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
907 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::rebind (const KEY
&key
,
911 return this->implementation_
.rebind (key
,
916 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
917 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::rebind (const KEY
&key
,
922 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
>::trybind (const KEY
&key
,
932 return this->implementation_
.trybind (key
,
936 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
937 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::find (const KEY
&key
,
940 return this->implementation_
.find (key
,
944 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
945 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::find (const KEY
&key
)
947 return this->implementation_
.find (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
>::unbind (const KEY
&key
)
953 return this->implementation_
.unbind (key
);
956 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> int
957 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::unbind (const KEY
&key
,
960 return this->implementation_
.unbind (key
,
964 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> size_t
965 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::current_size () const
967 return this->implementation_
.current_size ();
970 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> size_t
971 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::total_size () const
973 return this->implementation_
.total_size ();
976 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> void
977 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::dump () const
979 #if defined (ACE_HAS_DUMP)
980 this->implementation_
.dump ();
981 #endif /* ACE_HAS_DUMP */
984 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
985 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::begin_impl ()
987 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
988 ACE_NEW_RETURN (temp
,
989 iterator_impl (this->implementation_
.begin ()),
994 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
995 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::end_impl ()
997 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
998 ACE_NEW_RETURN (temp
,
999 iterator_impl (this->implementation_
.end ()),
1004 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
1005 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::rbegin_impl ()
1007 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
1008 ACE_NEW_RETURN (temp
,
1009 reverse_iterator_impl (this->implementation_
.rbegin ()),
1014 template <class KEY
, class VALUE
, class HASH_KEY
, class COMPARE_KEYS
, class KEY_GENERATOR
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
1015 ACE_Hash_Map_Manager_Ex_Adapter
<KEY
, VALUE
, HASH_KEY
, COMPARE_KEYS
, KEY_GENERATOR
>::rend_impl ()
1017 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
1018 ACE_NEW_RETURN (temp
,
1019 reverse_iterator_impl (this->implementation_
.rend ()),
1024 template <class T
, class KEY
, class VALUE
>
1025 ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
>::~ACE_Map_Manager_Iterator_Adapter ()
1029 template <class T
, class KEY
, class VALUE
> ACE_Iterator_Impl
<T
> *
1030 ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
>::clone () const
1032 ACE_Iterator_Impl
<T
> *temp
= 0;
1033 ACE_NEW_RETURN (temp
,
1034 (ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
>) (*this),
1040 template <class T
, class KEY
, class VALUE
> int
1041 ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
>::compare (const ACE_Iterator_Impl
<T
> &rhs
) const
1043 const ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
> &rhs_local
1044 = dynamic_cast<const ACE_Map_Manager_Iterator_Adapter
< T
, KEY
, VALUE
> &> (rhs
);
1046 return this->implementation_
== rhs_local
.implementation_
;
1049 template <class T
, class KEY
, class VALUE
> T
1050 ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
>::dereference () const
1052 // The following syntax is necessary to work around certain broken compilers.
1053 // In particular, please do not prefix implementation_ with this->
1054 return T ((*implementation_
).ext_id_
,
1055 (*implementation_
).int_id_
);
1058 template <class T
, class KEY
, class VALUE
> void
1059 ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
>::plus_plus ()
1061 ++this->implementation_
;
1064 template <class T
, class KEY
, class VALUE
> void
1065 ACE_Map_Manager_Iterator_Adapter
<T
, KEY
, VALUE
>::minus_minus ()
1067 --this->implementation_
;
1070 template <class T
, class KEY
, class VALUE
>
1071 ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
>::~ACE_Map_Manager_Reverse_Iterator_Adapter ()
1075 template <class T
, class KEY
, class VALUE
> ACE_Reverse_Iterator_Impl
<T
> *
1076 ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
>::clone () const
1078 ACE_Reverse_Iterator_Impl
<T
> *temp
= 0;
1079 ACE_NEW_RETURN (temp
,
1080 (ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
>) (*this),
1086 template <class T
, class KEY
, class VALUE
> int
1087 ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
>::compare (const ACE_Reverse_Iterator_Impl
<T
> &rhs
) const
1089 const ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
> &rhs_local
1090 = dynamic_cast<const ACE_Map_Manager_Reverse_Iterator_Adapter
< T
, KEY
, VALUE
> &> (rhs
);
1092 return this->implementation_
== rhs_local
.implementation_
;
1095 template <class T
, class KEY
, class VALUE
> T
1096 ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
>::dereference () const
1098 // The following syntax is necessary to work around certain broken compilers.
1099 // In particular, please do not prefix implementation_ with this->
1100 return T ((*implementation_
).ext_id_
,
1101 (*implementation_
).int_id_
);
1104 template <class T
, class KEY
, class VALUE
> void
1105 ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
>::plus_plus ()
1107 ++this->implementation_
;
1110 template <class T
, class KEY
, class VALUE
> void
1111 ACE_Map_Manager_Reverse_Iterator_Adapter
<T
, KEY
, VALUE
>::minus_minus ()
1113 --this->implementation_
;
1116 template <class KEY
, class VALUE
, class KEY_GENERATOR
>
1117 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::~ACE_Map_Manager_Adapter ()
1121 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1122 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::open (size_t length
,
1123 ACE_Allocator
*alloc
)
1125 return this->implementation_
.open (length
,
1129 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1130 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::close ()
1132 return this->implementation_
.close ();
1135 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1136 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::bind (const KEY
&key
,
1139 return this->implementation_
.bind (key
,
1143 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1144 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::bind_modify_key (const VALUE
&value
,
1147 return this->implementation_
.bind (key
,
1151 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1152 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::create_key (KEY
&key
)
1154 // Invoke the user specified key generation functor.
1155 return this->key_generator_ (key
);
1158 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1159 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::bind_create_key (const VALUE
&value
,
1162 // Invoke the user specified key generation functor.
1163 int result
= this->key_generator_ (key
);
1168 result
= this->implementation_
.bind (key
,
1175 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1176 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::bind_create_key (const VALUE
&value
)
1179 return this->bind_create_key (value
,
1183 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1184 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::recover_key (const KEY
&modified_key
,
1187 original_key
= modified_key
;
1191 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1192 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::rebind (const KEY
&key
,
1195 return this->implementation_
.rebind (key
,
1199 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1200 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::rebind (const KEY
&key
,
1204 return this->implementation_
.rebind (key
,
1209 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1210 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::rebind (const KEY
&key
,
1215 return this->implementation_
.rebind (key
,
1221 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1222 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::trybind (const KEY
&key
,
1225 return this->implementation_
.trybind (key
,
1229 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1230 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::find (const KEY
&key
,
1233 return this->implementation_
.find (key
,
1237 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1238 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::find (const KEY
&key
)
1240 return this->implementation_
.find (key
);
1243 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1244 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::unbind (const KEY
&key
)
1246 return this->implementation_
.unbind (key
);
1249 template <class KEY
, class VALUE
, class KEY_GENERATOR
> int
1250 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::unbind (const KEY
&key
,
1253 return this->implementation_
.unbind (key
,
1257 template <class KEY
, class VALUE
, class KEY_GENERATOR
> size_t
1258 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::current_size () const
1260 return this->implementation_
.current_size ();
1263 template <class KEY
, class VALUE
, class KEY_GENERATOR
> size_t
1264 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::total_size () const
1266 return this->implementation_
.total_size ();
1269 template <class KEY
, class VALUE
, class KEY_GENERATOR
> void
1270 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::dump () const
1272 #if defined (ACE_HAS_DUMP)
1273 this->implementation_
.dump ();
1274 #endif /* ACE_HAS_DUMP */
1277 template <class KEY
, class VALUE
, class KEY_GENERATOR
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
1278 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::begin_impl ()
1280 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
1281 ACE_NEW_RETURN (temp
,
1282 iterator_impl (this->implementation_
.begin ()),
1287 template <class KEY
, class VALUE
, class KEY_GENERATOR
> ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
1288 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::end_impl ()
1290 ACE_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
1291 ACE_NEW_RETURN (temp
,
1292 iterator_impl (this->implementation_
.end ()),
1297 template <class KEY
, class VALUE
, class KEY_GENERATOR
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
1298 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::rbegin_impl ()
1300 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
1301 ACE_NEW_RETURN (temp
,
1302 reverse_iterator_impl (this->implementation_
.rbegin ()),
1307 template <class KEY
, class VALUE
, class KEY_GENERATOR
> ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *
1308 ACE_Map_Manager_Adapter
<KEY
, VALUE
, KEY_GENERATOR
>::rend_impl ()
1310 ACE_Reverse_Iterator_Impl
<ACE_Reference_Pair
<const KEY
, VALUE
> > *temp
= 0;
1311 ACE_NEW_RETURN (temp
,
1312 reverse_iterator_impl (this->implementation_
.rend ()),
1317 ACE_END_VERSIONED_NAMESPACE_DECL
1319 #endif /* ACE_MAP_T_CPP */