PageRenderTime 26ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/dep/acelite/ace/Hash_Map_Manager_T.cpp

https://github.com/chucho/FaceCore
C++ | 542 lines | 416 code | 87 blank | 39 comment | 81 complexity | d8f1399b3d67470174a4933ef6a95b76 MD5 | raw file
  1. //=============================================================================
  2. /**
  3. * @file Hash_Map_Manager_T.cpp
  4. *
  5. * $Id: Hash_Map_Manager_T.cpp 84477 2009-02-16 13:30:38Z johnnyw $
  6. *
  7. * @author Douglas C. Schmidt <schmidt@cse.wustl.edu>
  8. */
  9. //=============================================================================
  10. #ifndef ACE_HASH_MAP_MANAGER_T_CPP
  11. #define ACE_HASH_MAP_MANAGER_T_CPP
  12. #include "ace/Hash_Map_Manager_T.h"
  13. #if !defined (ACE_LACKS_PRAGMA_ONCE)
  14. # pragma once
  15. #endif /* ACE_LACKS_PRAGMA_ONCE */
  16. #if !defined (__ACE_INLINE__)
  17. # include "ace/Hash_Map_Manager_T.inl"
  18. #endif /* __ACE_INLINE__ */
  19. #include "ace/Malloc_Base.h"
  20. ACE_BEGIN_VERSIONED_NAMESPACE_DECL
  21. template <class EXT_ID, class INT_ID>
  22. ACE_Hash_Map_Entry<EXT_ID, INT_ID>::ACE_Hash_Map_Entry (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next,
  23. ACE_Hash_Map_Entry<EXT_ID, INT_ID> *prev)
  24. : next_ (next),
  25. prev_ (prev)
  26. {
  27. }
  28. template <class EXT_ID, class INT_ID>
  29. ACE_Hash_Map_Entry<EXT_ID, INT_ID>::ACE_Hash_Map_Entry (const EXT_ID &ext_id,
  30. const INT_ID &int_id,
  31. ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next,
  32. ACE_Hash_Map_Entry<EXT_ID, INT_ID> *prev)
  33. : ext_id_ (ext_id),
  34. int_id_ (int_id),
  35. next_ (next),
  36. prev_ (prev)
  37. {
  38. }
  39. template <class EXT_ID, class INT_ID>
  40. ACE_Hash_Map_Entry<EXT_ID, INT_ID>::~ACE_Hash_Map_Entry (void)
  41. {
  42. }
  43. template <class EXT_ID, class INT_ID> EXT_ID &
  44. ACE_Hash_Map_Entry<EXT_ID, INT_ID>::key ()
  45. {
  46. return ext_id_;
  47. }
  48. template <class EXT_ID, class INT_ID> const EXT_ID &
  49. ACE_Hash_Map_Entry<EXT_ID, INT_ID>::key () const
  50. {
  51. return ext_id_;
  52. }
  53. template <class EXT_ID, class INT_ID> INT_ID &
  54. ACE_Hash_Map_Entry<EXT_ID, INT_ID>::item ()
  55. {
  56. return int_id_;
  57. }
  58. template <class EXT_ID, class INT_ID> const INT_ID &
  59. ACE_Hash_Map_Entry<EXT_ID, INT_ID>::item () const
  60. {
  61. return int_id_;
  62. }
  63. template <class EXT_ID, class INT_ID> void
  64. ACE_Hash_Map_Entry<EXT_ID, INT_ID>::dump (void) const
  65. {
  66. #if defined (ACE_HAS_DUMP)
  67. ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
  68. ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %d"), this->next_));
  69. ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("prev_ = %d"), this->prev_));
  70. ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
  71. #endif /* ACE_HAS_DUMP */
  72. }
  73. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> void
  74. ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump (void) const
  75. {
  76. #if defined (ACE_HAS_DUMP)
  77. ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
  78. ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("total_size_ = %d\n"), this->total_size_));
  79. ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("cur_size_ = %d\n"), this->cur_size_));
  80. this->table_allocator_->dump ();
  81. this->entry_allocator_->dump ();
  82. this->lock_.dump ();
  83. ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
  84. #endif /* ACE_HAS_DUMP */
  85. }
  86. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  87. ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::create_buckets (size_t size)
  88. {
  89. size_t bytes = size * sizeof (ACE_Hash_Map_Entry<EXT_ID, INT_ID>);
  90. void *ptr = 0;
  91. ACE_ALLOCATOR_RETURN (ptr,
  92. this->table_allocator_->malloc (bytes),
  93. -1);
  94. this->table_ = (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *) ptr;
  95. this->total_size_ = size;
  96. // Initialize each entry in the hash table to be a circular linked
  97. // list with the dummy node in the front serving as the anchor of
  98. // the list.
  99. for (size_t i = 0; i < size; i++)
  100. new (&this->table_[i]) ACE_Hash_Map_Entry<EXT_ID, INT_ID> (&this->table_[i],
  101. &this->table_[i]);
  102. return 0;
  103. }
  104. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  105. ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::open (size_t size,
  106. ACE_Allocator *table_alloc,
  107. ACE_Allocator *entry_alloc)
  108. {
  109. ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
  110. // Calling this->close_i () to ensure we release previous allocated
  111. // memory before allocating new one.
  112. this->close_i ();
  113. if (table_alloc == 0)
  114. table_alloc = ACE_Allocator::instance ();
  115. this->table_allocator_ = table_alloc;
  116. if (entry_alloc == 0)
  117. entry_alloc = table_alloc;
  118. this->entry_allocator_ = entry_alloc;
  119. // This assertion is here to help track a situation that shouldn't
  120. // happen, but did with Sun C++ 4.1 (before a change to this class
  121. // was made: it used to have an enum that was supposed to be defined
  122. // to be ACE_DEFAULT_MAP_SIZE, but instead was defined to be 0).
  123. if (size == 0)
  124. return -1;
  125. return this->create_buckets (size);
  126. }
  127. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  128. ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::close_i (void)
  129. {
  130. // Protect against "double-deletion" in case the destructor also
  131. // gets called.
  132. if (this->table_ != 0)
  133. {
  134. // Remove all the entries.
  135. this->unbind_all_i ();
  136. // Iterate through the buckets cleaning up the sentinels.
  137. for (size_t i = 0; i < this->total_size_; i++)
  138. {
  139. // Destroy the dummy entry.
  140. ACE_Hash_Map_Entry<EXT_ID, INT_ID> *entry = &this->table_[i];
  141. // The second argument results in a no-op instead of
  142. // deallocation.
  143. ACE_DES_FREE_TEMPLATE2 (entry, ACE_NOOP,
  144. ACE_Hash_Map_Entry, EXT_ID, INT_ID);
  145. }
  146. // Reset size.
  147. this->total_size_ = 0;
  148. // Free table memory.
  149. this->table_allocator_->free (this->table_);
  150. // Should be done last...
  151. this->table_ = 0;
  152. }
  153. return 0;
  154. }
  155. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  156. ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::unbind_all_i (void)
  157. {
  158. // Iterate through the entire map calling the destuctor of each
  159. // <ACE_Hash_Map_Entry>.
  160. for (size_t i = 0; i < this->total_size_; i++)
  161. {
  162. for (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *temp_ptr = this->table_[i].next_;
  163. temp_ptr != &this->table_[i];
  164. )
  165. {
  166. ACE_Hash_Map_Entry<EXT_ID, INT_ID> *hold_ptr = temp_ptr;
  167. temp_ptr = temp_ptr->next_;
  168. // Explicitly call the destructor.
  169. ACE_DES_FREE_TEMPLATE2 (hold_ptr, this->entry_allocator_->free,
  170. ACE_Hash_Map_Entry, EXT_ID, INT_ID);
  171. }
  172. // Restore the sentinel.
  173. this->table_[i].next_ = &this->table_[i];
  174. this->table_[i].prev_ = &this->table_[i];
  175. }
  176. this->cur_size_ = 0;
  177. return 0;
  178. }
  179. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  180. ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::bind_i (const EXT_ID &ext_id,
  181. const INT_ID &int_id,
  182. ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
  183. {
  184. size_t loc = 0;
  185. if (this->shared_find (ext_id, entry, loc) == -1)
  186. {
  187. void *ptr = 0;
  188. // Not found.
  189. ACE_ALLOCATOR_RETURN (ptr,
  190. this->entry_allocator_->malloc (sizeof (ACE_Hash_Map_Entry<EXT_ID, INT_ID>)),
  191. -1);
  192. entry = new (ptr) ACE_Hash_Map_Entry<EXT_ID, INT_ID> (ext_id,
  193. int_id,
  194. this->table_[loc].next_,
  195. &this->table_[loc]);
  196. this->table_[loc].next_ = entry;
  197. entry->next_->prev_ = entry;
  198. ++this->cur_size_;
  199. return 0;
  200. }
  201. else
  202. return 1;
  203. }
  204. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  205. ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::trybind_i (const EXT_ID &ext_id,
  206. INT_ID &int_id,
  207. ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
  208. {
  209. size_t loc = 0;
  210. if (this->shared_find (ext_id, entry, loc) == -1)
  211. {
  212. // Not found.
  213. void *ptr = 0;
  214. ACE_ALLOCATOR_RETURN (ptr,
  215. this->entry_allocator_->malloc (sizeof (ACE_Hash_Map_Entry<EXT_ID, INT_ID>)),
  216. -1);
  217. entry = new (ptr) ACE_Hash_Map_Entry<EXT_ID, INT_ID> (ext_id,
  218. int_id,
  219. this->table_[loc].next_,
  220. &this->table_[loc]);
  221. this->table_[loc].next_ = entry;
  222. entry->next_->prev_ = entry;
  223. ++this->cur_size_;
  224. return 0;
  225. }
  226. else
  227. return 1;
  228. }
  229. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  230. ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::unbind_i (const EXT_ID &ext_id,
  231. INT_ID &int_id)
  232. {
  233. ACE_Hash_Map_Entry<EXT_ID, INT_ID> *temp;
  234. size_t loc = 0;
  235. if (this->shared_find (ext_id, temp, loc) == -1)
  236. {
  237. errno = ENOENT;
  238. return -1;
  239. }
  240. int_id = temp->int_id_;
  241. return this->unbind_i (temp);
  242. }
  243. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  244. ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::unbind_i (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *entry)
  245. {
  246. entry->next_->prev_ = entry->prev_;
  247. entry->prev_->next_ = entry->next_;
  248. // Explicitly call the destructor.
  249. ACE_DES_FREE_TEMPLATE2 (entry, this->entry_allocator_->free,
  250. ACE_Hash_Map_Entry, EXT_ID, INT_ID);
  251. --this->cur_size_;
  252. return 0;
  253. }
  254. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  255. ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::shared_find (const EXT_ID &ext_id,
  256. ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry,
  257. size_t &loc)
  258. {
  259. if (this->total_size_ == 0)
  260. {
  261. errno = ENOENT;
  262. return -1;
  263. }
  264. loc = this->hash (ext_id) % this->total_size_;
  265. ACE_Hash_Map_Entry<EXT_ID, INT_ID> *temp = this->table_[loc].next_;
  266. while (temp != &this->table_[loc] && this->equal (temp->ext_id_, ext_id) == 0)
  267. temp = temp->next_;
  268. if (temp == &this->table_[loc])
  269. {
  270. errno = ENOENT;
  271. return -1;
  272. }
  273. else
  274. {
  275. entry = temp;
  276. return 0;
  277. }
  278. }
  279. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  280. ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
  281. const INT_ID &int_id,
  282. ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
  283. {
  284. size_t dummy = 0;
  285. if (this->shared_find (ext_id, entry, dummy) == -1)
  286. return this->bind_i (ext_id, int_id);
  287. else
  288. {
  289. entry->ext_id_ = ext_id;
  290. entry->int_id_ = int_id;
  291. return 1;
  292. }
  293. }
  294. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  295. ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
  296. const INT_ID &int_id,
  297. INT_ID &old_int_id,
  298. ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
  299. {
  300. size_t dummy = 0;
  301. if (this->shared_find (ext_id, entry, dummy) == -1)
  302. return this->bind_i (ext_id, int_id);
  303. else
  304. {
  305. old_int_id = entry->int_id_;
  306. entry->ext_id_ = ext_id;
  307. entry->int_id_ = int_id;
  308. return 1;
  309. }
  310. }
  311. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  312. ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
  313. const INT_ID &int_id,
  314. EXT_ID &old_ext_id,
  315. INT_ID &old_int_id,
  316. ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
  317. {
  318. size_t dummy = 0;
  319. if (this->shared_find (ext_id, entry, dummy) == -1)
  320. return this->bind_i (ext_id, int_id);
  321. else
  322. {
  323. old_ext_id = entry->ext_id_;
  324. old_int_id = entry->int_id_;
  325. entry->ext_id_ = ext_id;
  326. entry->int_id_ = int_id;
  327. return 1;
  328. }
  329. }
  330. // ------------------------------------------------------------
  331. ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Map_Iterator_Base_Ex)
  332. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> void
  333. ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump_i (void) const
  334. {
  335. ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump_i");
  336. ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
  337. ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("index_ = %d "), this->index_));
  338. ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %x"), this->next_));
  339. ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
  340. }
  341. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  342. ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::forward_i (void)
  343. {
  344. ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::forward_i");
  345. if (this->map_man_->table_ == 0)
  346. return -1;
  347. // Handle initial case specially.
  348. else if (this->index_ == -1)
  349. {
  350. this->index_++;
  351. return this->forward_i ();
  352. }
  353. else if (this->index_ >= static_cast<ssize_t> (this->map_man_->total_size_))
  354. return 0;
  355. this->next_ = this->next_->next_;
  356. if (this->next_ == &this->map_man_->table_[this->index_])
  357. {
  358. while (++this->index_ < static_cast<ssize_t> (this->map_man_->total_size_))
  359. {
  360. this->next_ = this->map_man_->table_[this->index_].next_;
  361. if (this->next_ != &this->map_man_->table_[this->index_])
  362. break;
  363. }
  364. }
  365. return this->index_ < static_cast<ssize_t> (this->map_man_->total_size_);
  366. }
  367. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  368. ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::reverse_i (void)
  369. {
  370. ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::reverse_i");
  371. if (this->map_man_->table_ == 0)
  372. return -1;
  373. else if (this->index_ == static_cast<ssize_t> (this->map_man_->total_size_))
  374. {
  375. --this->index_;
  376. return this->reverse_i ();
  377. }
  378. else if (this->index_ < 0)
  379. return 0;
  380. this->next_ = this->next_->prev_;
  381. if (this->next_ == &this->map_man_->table_[this->index_])
  382. {
  383. while (--this->index_ >= 0)
  384. {
  385. this->next_ = this->map_man_->table_[this->index_].prev_;
  386. if (this->next_ != &this->map_man_->table_[this->index_])
  387. break;
  388. }
  389. }
  390. return this->index_ >= 0;
  391. }
  392. // ------------------------------------------------------------
  393. ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Map_Const_Iterator_Base_Ex)
  394. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> void
  395. ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump_i (void) const
  396. {
  397. ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump_i");
  398. ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
  399. ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("index_ = %d "), this->index_));
  400. ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %x"), this->next_));
  401. ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
  402. }
  403. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  404. ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::forward_i (void)
  405. {
  406. ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::forward_i");
  407. if (this->map_man_->table_ == 0)
  408. return -1;
  409. // Handle initial case specially.
  410. else if (this->index_ == -1)
  411. {
  412. ++this->index_;
  413. return this->forward_i ();
  414. }
  415. else if (this->index_ >= (ssize_t) this->map_man_->total_size_)
  416. return 0;
  417. this->next_ = this->next_->next_;
  418. if (this->next_ == &this->map_man_->table_[this->index_])
  419. {
  420. while (++this->index_ < (ssize_t) this->map_man_->total_size_)
  421. {
  422. this->next_ = this->map_man_->table_[this->index_].next_;
  423. if (this->next_ != &this->map_man_->table_[this->index_])
  424. break;
  425. }
  426. }
  427. return this->index_ < (ssize_t) this->map_man_->total_size_;
  428. }
  429. template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
  430. ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::reverse_i (void)
  431. {
  432. ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::reverse_i");
  433. if (this->map_man_->table_ == 0)
  434. return -1;
  435. else if (this->index_ == (ssize_t) this->map_man_->total_size_)
  436. {
  437. --this->index_;
  438. return this->reverse_i ();
  439. }
  440. else if (this->index_ < 0)
  441. return 0;
  442. this->next_ = this->next_->prev_;
  443. if (this->next_ == &this->map_man_->table_[this->index_])
  444. {
  445. while (--this->index_ >= 0)
  446. {
  447. this->next_ = this->map_man_->table_[this->index_].prev_;
  448. if (this->next_ != &this->map_man_->table_[this->index_])
  449. break;
  450. }
  451. }
  452. return this->index_ >= 0;
  453. }
  454. ACE_END_VERSIONED_NAMESPACE_DECL
  455. #endif /* ACE_HASH_MAP_MANAGER_T_CPP */