From 32546e22828e793e3881e1055acb72b6a044e331 Mon Sep 17 00:00:00 2001 From: Rat Date: Mon, 7 Jun 2010 19:10:55 +0200 Subject: added ace + vcproj for win --HG-- branch : trunk --- externals/ace/Map_T.cpp | 1343 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1343 insertions(+) create mode 100644 externals/ace/Map_T.cpp (limited to 'externals/ace/Map_T.cpp') diff --git a/externals/ace/Map_T.cpp b/externals/ace/Map_T.cpp new file mode 100644 index 00000000000..ef3184c5c2e --- /dev/null +++ b/externals/ace/Map_T.cpp @@ -0,0 +1,1343 @@ +// $Id: Map_T.cpp 80826 2008-03-04 14:51:23Z wotte $ + +#ifndef ACE_MAP_T_CPP +#define ACE_MAP_T_CPP + +#include "ace/Map_T.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#if !defined (__ACE_INLINE__) +#include "ace/Map_T.inl" +#endif /* __ACE_INLINE__ */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +template +ACE_Map::~ACE_Map (void) +{ +} + +template +ACE_Iterator_Impl::~ACE_Iterator_Impl (void) +{ +} + +template +ACE_Reverse_Iterator_Impl::~ACE_Reverse_Iterator_Impl (void) +{ +} + +template +ACE_Map_Impl_Iterator_Adapter::~ACE_Map_Impl_Iterator_Adapter (void) +{ +} + + +template ACE_Iterator_Impl * +ACE_Map_Impl_Iterator_Adapter::clone (void) const +{ + ACE_Iterator_Impl *temp = 0; + ACE_NEW_RETURN (temp, + (ACE_Map_Impl_Iterator_Adapter) (*this), + 0); + return temp; +} + +template int +ACE_Map_Impl_Iterator_Adapter::compare (const ACE_Iterator_Impl &rhs) const +{ + const ACE_Map_Impl_Iterator_Adapter &rhs_local + = dynamic_cast &> (rhs); + + return this->implementation_ == rhs_local.implementation_; +} + +template T +ACE_Map_Impl_Iterator_Adapter::dereference () const +{ + ENTRY &entry = *this->implementation_; + return T (entry.ext_id_, + entry.int_id_); +} + +template void +ACE_Map_Impl_Iterator_Adapter::plus_plus (void) +{ + ++this->implementation_; +} + +template void +ACE_Map_Impl_Iterator_Adapter::minus_minus (void) +{ + --this->implementation_; +} + +template +ACE_Map_Impl_Reverse_Iterator_Adapter::~ACE_Map_Impl_Reverse_Iterator_Adapter (void) +{ +} + +template ACE_Reverse_Iterator_Impl * +ACE_Map_Impl_Reverse_Iterator_Adapter::clone (void) const +{ + ACE_Reverse_Iterator_Impl *temp = 0; + ACE_NEW_RETURN (temp, + (ACE_Map_Impl_Reverse_Iterator_Adapter) (*this), + 0); + return temp; +} + + +template int +ACE_Map_Impl_Reverse_Iterator_Adapter::compare (const ACE_Reverse_Iterator_Impl &rhs) const +{ + const ACE_Map_Impl_Reverse_Iterator_Adapter &rhs_local + = dynamic_cast &> (rhs); + + return this->implementation_ == rhs_local.implementation_; +} + +template T +ACE_Map_Impl_Reverse_Iterator_Adapter::dereference () const +{ + ENTRY &entry = *this->implementation_; + return T (entry.ext_id_, + entry.int_id_); +} + +template void +ACE_Map_Impl_Reverse_Iterator_Adapter::plus_plus (void) +{ + ++this->implementation_; +} + +template void +ACE_Map_Impl_Reverse_Iterator_Adapter::minus_minus (void) +{ + --this->implementation_; +} + + +template +ACE_Map_Impl::~ACE_Map_Impl (void) +{ +} + +template int +ACE_Map_Impl::open (size_t length, + ACE_Allocator *alloc) +{ + return this->implementation_.open (length, + alloc); +} + +template int +ACE_Map_Impl::close (void) +{ + return this->implementation_.close (); +} + +template int +ACE_Map_Impl::bind (const KEY &key, + const VALUE &value) +{ + return this->implementation_.bind (key, + value); +} + +template int +ACE_Map_Impl::bind_modify_key (const VALUE &value, + KEY &key) +{ + return this->implementation_.bind_modify_key (value, + key); +} + +template int +ACE_Map_Impl::create_key (KEY &key) +{ + return this->implementation_.create_key (key); +} + +template int +ACE_Map_Impl::bind_create_key (const VALUE &value, + KEY &key) +{ + return this->implementation_.bind_create_key (value, + key); +} + +template int +ACE_Map_Impl::bind_create_key (const VALUE &value) +{ + return this->implementation_.bind_create_key (value); +} + +template int +ACE_Map_Impl::recover_key (const KEY &modified_key, + KEY &original_key) +{ + return this->implementation_.recover_key (modified_key, + original_key); +} + +template int +ACE_Map_Impl::rebind (const KEY &key, + const VALUE &value) +{ + return this->implementation_.rebind (key, + value); +} + +template int +ACE_Map_Impl::rebind (const KEY &key, + const VALUE &value, + VALUE &old_value) +{ + return this->implementation_.rebind (key, + value, + old_value); +} + +template int +ACE_Map_Impl::rebind (const KEY &key, + const VALUE &value, + KEY &old_key, + VALUE &old_value) +{ + return this->implementation_.rebind (key, + value, + old_key, + old_value); +} + +template int +ACE_Map_Impl::trybind (const KEY &key, + VALUE &value) +{ + return this->implementation_.trybind (key, + value); +} + +template int +ACE_Map_Impl::find (const KEY &key, + VALUE &value) +{ + return this->implementation_.find (key, + value); +} + +template int +ACE_Map_Impl::find (const KEY &key) +{ + return this->implementation_.find (key); +} + +template int +ACE_Map_Impl::unbind (const KEY &key) +{ + return this->implementation_.unbind (key); +} + +template int +ACE_Map_Impl::unbind (const KEY &key, + VALUE &value) +{ + return this->implementation_.unbind (key, + value); +} + +template size_t +ACE_Map_Impl::current_size (void) const +{ + return this->implementation_.current_size (); +} + +template size_t +ACE_Map_Impl::total_size (void) const +{ + return this->implementation_.total_size (); +} + +template void +ACE_Map_Impl::dump (void) const +{ +#if defined (ACE_HAS_DUMP) + this->implementation_.dump (); +#endif /* ACE_HAS_DUMP */ +} + +template ACE_Iterator_Impl > * +ACE_Map_Impl::begin_impl (void) +{ + ACE_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + iterator_impl (this->implementation_.begin ()), + 0); + return temp; +} + +template ACE_Iterator_Impl > * +ACE_Map_Impl::end_impl (void) +{ + ACE_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + iterator_impl (this->implementation_.end ()), + 0); + return temp; +} + +template ACE_Reverse_Iterator_Impl > * +ACE_Map_Impl::rbegin_impl (void) +{ + ACE_Reverse_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + reverse_iterator_impl (this->implementation_.rbegin ()), + 0); + return temp; +} + +template ACE_Reverse_Iterator_Impl > * +ACE_Map_Impl::rend_impl (void) +{ + ACE_Reverse_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + reverse_iterator_impl (this->implementation_.rend ()), + 0); + return temp; +} + +template +ACE_Active_Map_Manager_Iterator_Adapter::~ACE_Active_Map_Manager_Iterator_Adapter (void) +{ +} + +template ACE_Iterator_Impl * +ACE_Active_Map_Manager_Iterator_Adapter::clone (void) const +{ + ACE_Iterator_Impl *temp = 0; + ACE_NEW_RETURN (temp, + (ACE_Active_Map_Manager_Iterator_Adapter) (*this), + 0); + return temp; +} + + +template int +ACE_Active_Map_Manager_Iterator_Adapter::compare (const ACE_Iterator_Impl &rhs) const +{ + const ACE_Active_Map_Manager_Iterator_Adapter &rhs_local + = dynamic_cast &> (rhs); + + return this->implementation_ == rhs_local.implementation_; +} + +template T +ACE_Active_Map_Manager_Iterator_Adapter::dereference () const +{ + // The following syntax is necessary to work around certain broken compilers. + // In particular, please do not prefix implementation_ with this-> + return T ((*implementation_).int_id_.first (), + (*implementation_).int_id_.second ()); +} + +template void +ACE_Active_Map_Manager_Iterator_Adapter::plus_plus (void) +{ + ++this->implementation_; +} + +template void +ACE_Active_Map_Manager_Iterator_Adapter::minus_minus (void) +{ + --this->implementation_; +} + +template +ACE_Active_Map_Manager_Reverse_Iterator_Adapter::~ACE_Active_Map_Manager_Reverse_Iterator_Adapter (void) +{ +} + +template ACE_Reverse_Iterator_Impl * +ACE_Active_Map_Manager_Reverse_Iterator_Adapter::clone (void) const +{ + ACE_Reverse_Iterator_Impl *temp = 0; + ACE_NEW_RETURN (temp, + (ACE_Active_Map_Manager_Reverse_Iterator_Adapter) (*this), + 0); + return temp; +} + + +template int +ACE_Active_Map_Manager_Reverse_Iterator_Adapter::compare (const ACE_Reverse_Iterator_Impl &rhs) const +{ + const ACE_Active_Map_Manager_Reverse_Iterator_Adapter &rhs_local + = dynamic_cast &> (rhs); + + return this->implementation_ == rhs_local.implementation_; +} + +template T +ACE_Active_Map_Manager_Reverse_Iterator_Adapter::dereference () const +{ + // The following syntax is necessary to work around certain broken compilers. + // In particular, please do not prefix implementation_ with this-> + return T ((*implementation_).int_id_.first (), + (*implementation_).int_id_.second ()); +} + +template void +ACE_Active_Map_Manager_Reverse_Iterator_Adapter::plus_plus (void) +{ + ++this->implementation_; +} + +template void +ACE_Active_Map_Manager_Reverse_Iterator_Adapter::minus_minus (void) +{ + --this->implementation_; +} + +template +ACE_Active_Map_Manager_Adapter::~ACE_Active_Map_Manager_Adapter (void) +{ +} + +template int +ACE_Active_Map_Manager_Adapter::open (size_t length, + ACE_Allocator *alloc) +{ + return this->implementation_.open (length, + alloc); +} + +template int +ACE_Active_Map_Manager_Adapter::close (void) +{ + return this->implementation_.close (); +} + +template int +ACE_Active_Map_Manager_Adapter::bind (const KEY &, + const VALUE &) +{ + ACE_NOTSUP_RETURN (-1); +} + +template int +ACE_Active_Map_Manager_Adapter::bind_modify_key (const VALUE &value, + KEY &key) +{ + // Reserve a slot and create an active key. + expanded_value *internal_value = 0; + ACE_Active_Map_Manager_Key active_key; + int result = this->implementation_.bind (active_key, + internal_value); + if (result == 0) + { + // Encode the active key and the existing user key into key part + // of . + result = this->key_adapter_.encode (key, + active_key, + internal_value->first ()); + if (result == 0) + { + // Copy user value into . + internal_value->second (value); + // Copy new, modified key back to the user key. + key = internal_value->first (); + } + else + { + // In case of errors, unbind from map. + this->implementation_.unbind (active_key); + } + } + + return result; +} + +template int +ACE_Active_Map_Manager_Adapter::create_key (KEY &) +{ + ACE_NOTSUP_RETURN (-1); +} + +template int +ACE_Active_Map_Manager_Adapter::bind_create_key (const VALUE &value, + KEY &key) +{ + // Reserve a slot and create an active key. + expanded_value *internal_value = 0; + ACE_Active_Map_Manager_Key active_key; + int result = this->implementation_.bind (active_key, + internal_value); + if (result == 0) + { + // Encode the active key into key part of . + result = this->key_adapter_.encode (internal_value->first (), + active_key, + internal_value->first ()); + if (result == 0) + { + // Copy user value into . + internal_value->second (value); + // Copy new, modified key to the user key. + key = internal_value->first (); + } + else + { + // In case of errors, unbind from map. + this->implementation_.unbind (active_key); + } + } + + return result; +} + +template int +ACE_Active_Map_Manager_Adapter::bind_create_key (const VALUE &value) +{ + // Reserve a slot and create an active key. + expanded_value *internal_value = 0; + ACE_Active_Map_Manager_Key active_key; + int result = this->implementation_.bind (active_key, + internal_value); + if (result == 0) + { + // Encode the active key into key part of . + result = this->key_adapter_.encode (internal_value->first (), + active_key, + internal_value->first ()); + if (result == 0) + { + // Copy user value into . + internal_value->second (value); + } + else + { + // In case of errors, unbind from map. + this->implementation_.unbind (active_key); + } + } + + return result; +} + +template int +ACE_Active_Map_Manager_Adapter::recover_key (const KEY &modified_key, + KEY &original_key) +{ + // Ask the to help out with recovering the original + // user key, since it was the one that encode it in the first place. + return this->key_adapter_.decode (modified_key, + original_key); +} + +template int +ACE_Active_Map_Manager_Adapter::find (const KEY &key, + expanded_value *&internal_value) +{ + // Ask the to recover the active key. + ACE_Active_Map_Manager_Key active_key; + int result = this->key_adapter_.decode (key, + active_key); + if (result == 0) + { + // Find recovered active key in map. + result = this->implementation_.find (active_key, + internal_value); + } + + return result; +} + +template int +ACE_Active_Map_Manager_Adapter::find (const KEY &key, + VALUE &value) +{ + expanded_value *internal_value = 0; + int result = this->find (key, + internal_value); + + if (result == 0) + { + // Copy value. + value = internal_value->second (); + } + + return result; +} + +template int +ACE_Active_Map_Manager_Adapter::find (const KEY &key) +{ + expanded_value *internal_value = 0; + return this->find (key, + internal_value); +} + +template int +ACE_Active_Map_Manager_Adapter::rebind (const KEY &key, + const VALUE &value) +{ + expanded_value *internal_value = 0; + int result = this->find (key, + internal_value); + + if (result == 0) + { + // Reset value. + internal_value->second (value); + } + + return result; +} + +template int +ACE_Active_Map_Manager_Adapter::rebind (const KEY &key, + const VALUE &value, + VALUE &old_value) +{ + expanded_value *internal_value = 0; + int result = this->find (key, + internal_value); + + if (result == 0) + { + // Copy old value. + old_value = internal_value->second (); + + // Reset to new value. + internal_value->second (value); + } + + return result; +} + +template int +ACE_Active_Map_Manager_Adapter::rebind (const KEY &key, + const VALUE &value, + KEY &old_key, + VALUE &old_value) +{ + expanded_value *internal_value = 0; + int result = this->find (key, + internal_value); + + if (result == 0) + { + // Copy old key and value. + old_key = internal_value->first (); + old_value = internal_value->second (); + + // Reset to new value. + internal_value->second (value); + } + + return result; +} + +template int +ACE_Active_Map_Manager_Adapter::trybind (const KEY &, + VALUE &) +{ + ACE_NOTSUP_RETURN (-1); +} + +template int +ACE_Active_Map_Manager_Adapter::unbind (const KEY &key, + expanded_value *&internal_value) +{ + // Ask the to recover the active key. + ACE_Active_Map_Manager_Key active_key; + int result = this->key_adapter_.decode (key, + active_key); + if (result == 0) + { + // Unbind recovered active key from map. + result = this->implementation_.unbind (active_key, + internal_value); + } + + return result; +} + +template int +ACE_Active_Map_Manager_Adapter::unbind (const KEY &key) +{ + expanded_value *internal_value = 0; + return this->unbind (key, + internal_value); +} + +template int +ACE_Active_Map_Manager_Adapter::unbind (const KEY &key, + VALUE &value) +{ + expanded_value *internal_value = 0; + int result = this->unbind (key, + internal_value); + + if (result == 0) + { + // Copy value. + value = internal_value->second (); + } + + return result; +} + +template size_t +ACE_Active_Map_Manager_Adapter::current_size (void) const +{ + return this->implementation_.current_size (); +} + +template size_t +ACE_Active_Map_Manager_Adapter::total_size (void) const +{ + return this->implementation_.total_size (); +} + +template void +ACE_Active_Map_Manager_Adapter::dump (void) const +{ +#if defined (ACE_HAS_DUMP) + this->implementation_.dump (); +#endif /* ACE_HAS_DUMP */ +} + +template ACE_Iterator_Impl > * +ACE_Active_Map_Manager_Adapter::begin_impl (void) +{ + ACE_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + iterator_impl (this->implementation_.begin ()), + 0); + return temp; +} + +template ACE_Iterator_Impl > * +ACE_Active_Map_Manager_Adapter::end_impl (void) +{ + ACE_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + iterator_impl (this->implementation_.end ()), + 0); + return temp; +} + +template ACE_Reverse_Iterator_Impl > * +ACE_Active_Map_Manager_Adapter::rbegin_impl (void) +{ + ACE_Reverse_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + reverse_iterator_impl (this->implementation_.rbegin ()), + 0); + return temp; +} + +template ACE_Reverse_Iterator_Impl > * +ACE_Active_Map_Manager_Adapter::rend_impl (void) +{ + ACE_Reverse_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + reverse_iterator_impl (this->implementation_.rend ()), + 0); + return temp; +} + +template +ACE_Hash_Map_Manager_Ex_Iterator_Adapter::~ACE_Hash_Map_Manager_Ex_Iterator_Adapter (void) +{ +} + +template ACE_Iterator_Impl * +ACE_Hash_Map_Manager_Ex_Iterator_Adapter::clone (void) const +{ + ACE_Iterator_Impl *temp = 0; + ACE_NEW_RETURN (temp, + (ACE_Hash_Map_Manager_Ex_Iterator_Adapter) (*this), + 0); + return temp; +} + + +template int +ACE_Hash_Map_Manager_Ex_Iterator_Adapter::compare (const ACE_Iterator_Impl &rhs) const +{ + const ACE_Hash_Map_Manager_Ex_Iterator_Adapter &rhs_local + = dynamic_cast &> (rhs); + + return this->implementation_ == rhs_local.implementation_; +} + +template T +ACE_Hash_Map_Manager_Ex_Iterator_Adapter::dereference () const +{ + // The following syntax is necessary to work around certain broken compilers. + // In particular, please do not prefix implementation_ with this-> + return T ((*implementation_).ext_id_, + (*implementation_).int_id_); +} + +template void +ACE_Hash_Map_Manager_Ex_Iterator_Adapter::plus_plus (void) +{ + ++this->implementation_; +} + +template void +ACE_Hash_Map_Manager_Ex_Iterator_Adapter::minus_minus (void) +{ + --this->implementation_; +} + +template +ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter::~ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter (void) +{ +} + +template ACE_Reverse_Iterator_Impl * +ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter::clone (void) const +{ + ACE_Reverse_Iterator_Impl *temp = 0; + ACE_NEW_RETURN (temp, + (ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter) (*this), + 0); + return temp; +} + + +template int +ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter::compare (const ACE_Reverse_Iterator_Impl &rhs) const +{ + const ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter &rhs_local + = dynamic_cast &> (rhs); + + return this->implementation_ == rhs_local.implementation_; +} + +template T +ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter::dereference () const +{ + // The following syntax is necessary to work around certain broken compilers. + // In particular, please do not prefix implementation_ with this-> + return T ((*implementation_).ext_id_, + (*implementation_).int_id_); +} + +template void +ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter::plus_plus (void) +{ + ++this->implementation_; +} + +template void +ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter::minus_minus (void) +{ + --this->implementation_; +} + +template +ACE_Hash_Map_Manager_Ex_Adapter::~ACE_Hash_Map_Manager_Ex_Adapter (void) +{ +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::open (size_t length, + ACE_Allocator *alloc) +{ + return this->implementation_.open (length, + alloc); +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::close (void) +{ + return this->implementation_.close (); +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::bind (const KEY &key, + const VALUE &value) +{ + return this->implementation_.bind (key, + value); +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::bind_modify_key (const VALUE &value, + KEY &key) +{ + return this->implementation_.bind (key, + value); +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::create_key (KEY &key) +{ + // Invoke the user specified key generation functor. + return this->key_generator_ (key); +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::bind_create_key (const VALUE &value, + KEY &key) +{ + // Invoke the user specified key generation functor. + int result = this->key_generator_ (key); + + if (result == 0) + { + // Try to add. + result = this->implementation_.bind (key, + value); + } + + return result; +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::bind_create_key (const VALUE &value) +{ + KEY key; + return this->bind_create_key (value, + key); +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::recover_key (const KEY &modified_key, + KEY &original_key) +{ + original_key = modified_key; + return 0; +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::rebind (const KEY &key, + const VALUE &value) +{ + return this->implementation_.rebind (key, + value); +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::rebind (const KEY &key, + const VALUE &value, + VALUE &old_value) +{ + return this->implementation_.rebind (key, + value, + old_value); +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::rebind (const KEY &key, + const VALUE &value, + KEY &old_key, + VALUE &old_value) +{ + return this->implementation_.rebind (key, + value, + old_key, + old_value); +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::trybind (const KEY &key, + VALUE &value) +{ + return this->implementation_.trybind (key, + value); +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::find (const KEY &key, + VALUE &value) +{ + return this->implementation_.find (key, + value); +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::find (const KEY &key) +{ + return this->implementation_.find (key); +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::unbind (const KEY &key) +{ + return this->implementation_.unbind (key); +} + +template int +ACE_Hash_Map_Manager_Ex_Adapter::unbind (const KEY &key, + VALUE &value) +{ + return this->implementation_.unbind (key, + value); +} + +template size_t +ACE_Hash_Map_Manager_Ex_Adapter::current_size (void) const +{ + return this->implementation_.current_size (); +} + +template size_t +ACE_Hash_Map_Manager_Ex_Adapter::total_size (void) const +{ + return this->implementation_.total_size (); +} + +template void +ACE_Hash_Map_Manager_Ex_Adapter::dump (void) const +{ +#if defined (ACE_HAS_DUMP) + this->implementation_.dump (); +#endif /* ACE_HAS_DUMP */ +} + +template ACE_Iterator_Impl > * +ACE_Hash_Map_Manager_Ex_Adapter::begin_impl (void) +{ + ACE_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + iterator_impl (this->implementation_.begin ()), + 0); + return temp; +} + +template ACE_Iterator_Impl > * +ACE_Hash_Map_Manager_Ex_Adapter::end_impl (void) +{ + ACE_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + iterator_impl (this->implementation_.end ()), + 0); + return temp; +} + +template ACE_Reverse_Iterator_Impl > * +ACE_Hash_Map_Manager_Ex_Adapter::rbegin_impl (void) +{ + ACE_Reverse_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + reverse_iterator_impl (this->implementation_.rbegin ()), + 0); + return temp; +} + +template ACE_Reverse_Iterator_Impl > * +ACE_Hash_Map_Manager_Ex_Adapter::rend_impl (void) +{ + ACE_Reverse_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + reverse_iterator_impl (this->implementation_.rend ()), + 0); + return temp; +} + +template +ACE_Map_Manager_Iterator_Adapter::~ACE_Map_Manager_Iterator_Adapter (void) +{ +} + +template ACE_Iterator_Impl * +ACE_Map_Manager_Iterator_Adapter::clone (void) const +{ + ACE_Iterator_Impl *temp = 0; + ACE_NEW_RETURN (temp, + (ACE_Map_Manager_Iterator_Adapter) (*this), + 0); + return temp; +} + + +template int +ACE_Map_Manager_Iterator_Adapter::compare (const ACE_Iterator_Impl &rhs) const +{ + const ACE_Map_Manager_Iterator_Adapter &rhs_local + = dynamic_cast &> (rhs); + + return this->implementation_ == rhs_local.implementation_; +} + +template T +ACE_Map_Manager_Iterator_Adapter::dereference () const +{ + // The following syntax is necessary to work around certain broken compilers. + // In particular, please do not prefix implementation_ with this-> + return T ((*implementation_).ext_id_, + (*implementation_).int_id_); +} + +template void +ACE_Map_Manager_Iterator_Adapter::plus_plus (void) +{ + ++this->implementation_; +} + +template void +ACE_Map_Manager_Iterator_Adapter::minus_minus (void) +{ + --this->implementation_; +} + +template +ACE_Map_Manager_Reverse_Iterator_Adapter::~ACE_Map_Manager_Reverse_Iterator_Adapter (void) +{ +} + +template ACE_Reverse_Iterator_Impl * +ACE_Map_Manager_Reverse_Iterator_Adapter::clone (void) const +{ + ACE_Reverse_Iterator_Impl *temp = 0; + ACE_NEW_RETURN (temp, + (ACE_Map_Manager_Reverse_Iterator_Adapter) (*this), + 0); + return temp; +} + + +template int +ACE_Map_Manager_Reverse_Iterator_Adapter::compare (const ACE_Reverse_Iterator_Impl &rhs) const +{ + const ACE_Map_Manager_Reverse_Iterator_Adapter &rhs_local + = dynamic_cast &> (rhs); + + return this->implementation_ == rhs_local.implementation_; +} + +template T +ACE_Map_Manager_Reverse_Iterator_Adapter::dereference () const +{ + // The following syntax is necessary to work around certain broken compilers. + // In particular, please do not prefix implementation_ with this-> + return T ((*implementation_).ext_id_, + (*implementation_).int_id_); +} + +template void +ACE_Map_Manager_Reverse_Iterator_Adapter::plus_plus (void) +{ + ++this->implementation_; +} + +template void +ACE_Map_Manager_Reverse_Iterator_Adapter::minus_minus (void) +{ + --this->implementation_; +} + +template +ACE_Map_Manager_Adapter::~ACE_Map_Manager_Adapter (void) +{ +} + +template int +ACE_Map_Manager_Adapter::open (size_t length, + ACE_Allocator *alloc) +{ + return this->implementation_.open (length, + alloc); +} + +template int +ACE_Map_Manager_Adapter::close (void) +{ + return this->implementation_.close (); +} + +template int +ACE_Map_Manager_Adapter::bind (const KEY &key, + const VALUE &value) +{ + return this->implementation_.bind (key, + value); +} + +template int +ACE_Map_Manager_Adapter::bind_modify_key (const VALUE &value, + KEY &key) +{ + return this->implementation_.bind (key, + value); +} + +template int +ACE_Map_Manager_Adapter::create_key (KEY &key) +{ + // Invoke the user specified key generation functor. + return this->key_generator_ (key); +} + +template int +ACE_Map_Manager_Adapter::bind_create_key (const VALUE &value, + KEY &key) +{ + // Invoke the user specified key generation functor. + int result = this->key_generator_ (key); + + if (result == 0) + { + // Try to add. + result = this->implementation_.bind (key, + value); + } + + return result; +} + +template int +ACE_Map_Manager_Adapter::bind_create_key (const VALUE &value) +{ + KEY key; + return this->bind_create_key (value, + key); +} + +template int +ACE_Map_Manager_Adapter::recover_key (const KEY &modified_key, + KEY &original_key) +{ + original_key = modified_key; + return 0; +} + +template int +ACE_Map_Manager_Adapter::rebind (const KEY &key, + const VALUE &value) +{ + return this->implementation_.rebind (key, + value); +} + +template int +ACE_Map_Manager_Adapter::rebind (const KEY &key, + const VALUE &value, + VALUE &old_value) +{ + return this->implementation_.rebind (key, + value, + old_value); +} + +template int +ACE_Map_Manager_Adapter::rebind (const KEY &key, + const VALUE &value, + KEY &old_key, + VALUE &old_value) +{ + return this->implementation_.rebind (key, + value, + old_key, + old_value); +} + +template int +ACE_Map_Manager_Adapter::trybind (const KEY &key, + VALUE &value) +{ + return this->implementation_.trybind (key, + value); +} + +template int +ACE_Map_Manager_Adapter::find (const KEY &key, + VALUE &value) +{ + return this->implementation_.find (key, + value); +} + +template int +ACE_Map_Manager_Adapter::find (const KEY &key) +{ + return this->implementation_.find (key); +} + +template int +ACE_Map_Manager_Adapter::unbind (const KEY &key) +{ + return this->implementation_.unbind (key); +} + +template int +ACE_Map_Manager_Adapter::unbind (const KEY &key, + VALUE &value) +{ + return this->implementation_.unbind (key, + value); +} + +template size_t +ACE_Map_Manager_Adapter::current_size (void) const +{ + return this->implementation_.current_size (); +} + +template size_t +ACE_Map_Manager_Adapter::total_size (void) const +{ + return this->implementation_.total_size (); +} + +template void +ACE_Map_Manager_Adapter::dump (void) const +{ +#if defined (ACE_HAS_DUMP) + this->implementation_.dump (); +#endif /* ACE_HAS_DUMP */ +} + +template ACE_Iterator_Impl > * +ACE_Map_Manager_Adapter::begin_impl (void) +{ + ACE_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + iterator_impl (this->implementation_.begin ()), + 0); + return temp; +} + +template ACE_Iterator_Impl > * +ACE_Map_Manager_Adapter::end_impl (void) +{ + ACE_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + iterator_impl (this->implementation_.end ()), + 0); + return temp; +} + +template ACE_Reverse_Iterator_Impl > * +ACE_Map_Manager_Adapter::rbegin_impl (void) +{ + ACE_Reverse_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + reverse_iterator_impl (this->implementation_.rbegin ()), + 0); + return temp; +} + +template ACE_Reverse_Iterator_Impl > * +ACE_Map_Manager_Adapter::rend_impl (void) +{ + ACE_Reverse_Iterator_Impl > *temp = 0; + ACE_NEW_RETURN (temp, + reverse_iterator_impl (this->implementation_.rend ()), + 0); + return temp; +} + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_MAP_T_CPP */ -- cgit v1.2.3