#include <Map_T.h>
Inheritance diagram for ACE_Map_Manager_Adapter:


Public Types | |
| typedef ACE_Map_Manager_Iterator_Adapter< ACE_Reference_Pair< const KEY, VALUE >, KEY, VALUE > | iterator_impl |
| typedef ACE_Map_Manager_Reverse_Iterator_Adapter< ACE_Reference_Pair< const KEY, VALUE >, KEY, VALUE > | reverse_iterator_impl |
| typedef ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex > | implementation |
Public Methods | |
| ACE_Map_Manager_Adapter (ACE_Allocator *alloc=0) | |
| Initialize with the <ACE_DEFAULT_MAP_SIZE>. More... | |
| ACE_Map_Manager_Adapter (size_t size, ACE_Allocator *alloc=0) | |
| Initialize with <size> entries. The <size> parameter is ignored by maps for which an initialize size does not make sense. More... | |
| virtual | ~ACE_Map_Manager_Adapter (void) |
| Close down and release dynamically allocated resources. More... | |
| virtual int | open (size_t length=ACE_DEFAULT_MAP_SIZE, ACE_Allocator *alloc=0) |
| Initialize a <Map> with size <length>. More... | |
| virtual int | close (void) |
| Close down a <Map> and release dynamically allocated resources. More... | |
| virtual int | bind (const KEY &key, const VALUE &value) |
| virtual int | bind_modify_key (const VALUE &value, KEY &key) |
| virtual int | create_key (KEY &key) |
| virtual int | bind_create_key (const VALUE &value, KEY &key) |
| virtual int | bind_create_key (const VALUE &value) |
| virtual int | recover_key (const KEY &modified_key, KEY &original_key) |
| Recovers the original key potentially modified by the map during <bind_modify_key>. More... | |
| virtual int | rebind (const KEY &key, const VALUE &value) |
| virtual int | rebind (const KEY &key, const VALUE &value, VALUE &old_value) |
| virtual int | rebind (const KEY &key, const VALUE &value, KEY &old_key, VALUE &old_value) |
| virtual int | trybind (const KEY &key, VALUE &value) |
| virtual int | find (const KEY &key, VALUE &value) |
| Locate <value> associated with <key>. More... | |
| virtual int | find (const KEY &key) |
| Is <key> in the map? More... | |
| virtual int | unbind (const KEY &key) |
| Remove <key> from the map. More... | |
| virtual int | unbind (const KEY &key, VALUE &value) |
| Remove <key> from the map, and return the <value> associated with <key>. More... | |
| virtual size_t | current_size (void) const |
| Return the current size of the map. More... | |
| virtual size_t | total_size (void) const |
| Return the total size of the map. More... | |
| virtual void | dump (void) const |
| Dump the state of an object. More... | |
| ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex > & | impl (void) |
| Accessor to implementation object. More... | |
| KEY_GENERATOR & | key_generator (void) |
| Accessor to key generator. More... | |
Protected Methods | |
| virtual ACE_Iterator_Impl< ACE_Reference_Pair< const KEY, VALUE > > * | begin_impl (void) |
| Return forward iterator. More... | |
| virtual ACE_Iterator_Impl< ACE_Reference_Pair< const KEY, VALUE > > * | end_impl (void) |
| virtual ACE_Reverse_Iterator_Impl< ACE_Reference_Pair< const KEY, VALUE > > * | rbegin_impl (void) |
| Return reverse iterator. More... | |
| virtual ACE_Reverse_Iterator_Impl< ACE_Reference_Pair< const KEY, VALUE > > * | rend_impl (void) |
Protected Attributes | |
| ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex > | implementation_ |
| All implementation details are forwarded to this class. More... | |
| KEY_GENERATOR | key_generator_ |
| Functor class used for generating key. More... | |
Private Methods | |
| void | operator= (const ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR > &) |
| ACE_Map_Manager_Adapter (const ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR > &) | |
Implementation to be provided by <ACE_Map_Manager>.
Definition at line 1402 of file Map_T.h.
|
|||||
|
|
|
|||||
|
|
|
|||||
|
|
|
||||||||||
|
Initialize with the <ACE_DEFAULT_MAP_SIZE>.
Definition at line 1501 of file Map_T.i.
01502 : implementation_ (alloc) 01503 { 01504 } |
|
||||||||||||||||
|
Initialize with <size> entries. The <size> parameter is ignored by maps for which an initialize size does not make sense.
Definition at line 1507 of file Map_T.i.
01509 : implementation_ (size, 01510 alloc) 01511 { 01512 } |
|
||||||||||
|
Close down and release dynamically allocated resources.
Definition at line 1515 of file Map_T.i.
01516 {
01517 }
|
|
||||||||||
|
|
|
||||||||||
|
Return forward iterator.
Implements ACE_Map. Definition at line 1674 of file Map_T.i. References ACE_NEW_RETURN.
01675 {
01676 ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *temp = 0;
01677 ACE_NEW_RETURN (temp,
01678 iterator_impl (this->implementation_.begin ()),
01679 0);
01680 return temp;
01681 }
|
|
||||||||||||||||
|
Add <key>/<value> pair to the map. If <key> is already in the map then no changes are made and 1 is returned. Returns 0 on a successful addition. This function fails for maps that do not allow user specified keys. <key> is an "in" parameter. Implements ACE_Map. Definition at line 1534 of file Map_T.i. References ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::bind, and implementation_.
01536 {
01537 return this->implementation_.bind (key,
01538 value);
01539 }
|
|
||||||||||
|
Add <value> to the map. The user does not care about the corresponding key produced by the Map. For maps that do not naturally produce keys, the map adapters will use the <KEY_GENERATOR> class to produce a key. However, the users are responsible for not jeopardizing this key production scheme by using user specified keys with keys produced by the key generator. Implements ACE_Map. Definition at line 1574 of file Map_T.i. References bind_create_key.
01575 {
01576 KEY key;
01577 return this->bind_create_key (value,
01578 key);
01579 }
|
|
||||||||||||||||
|
Add <value> to the map, and the corresponding key produced by the Map is returned through <key> which is an "out" parameter. For maps that do not naturally produce keys, the map adapters will use the <KEY_GENERATOR> class to produce a key. However, the users are responsible for not jeopardizing this key production scheme by using user specified keys with keys produced by the key generator. Implements ACE_Map. Definition at line 1557 of file Map_T.i. References ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::bind, implementation_, and key_generator_. Referenced by bind_create_key.
01559 {
01560 // Invoke the user specified key generation functor.
01561 int result = this->key_generator_ (key);
01562
01563 if (result == 0)
01564 {
01565 // Try to add.
01566 result = this->implementation_.bind (key,
01567 value);
01568 }
01569
01570 return result;
01571 }
|
|
||||||||||||||||
|
Add <key>/<value> pair to the map. <key> is an "inout" parameter and maybe modified/extended by the map to add additional information. To recover original key, call the <recover_key> method. Implements ACE_Map. Definition at line 1542 of file Map_T.i. References ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::bind, and implementation_.
01544 {
01545 return this->implementation_.bind (key,
01546 value);
01547 }
|
|
||||||||||
|
Close down a <Map> and release dynamically allocated resources.
Implements ACE_Map. Definition at line 1528 of file Map_T.i. References ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::close, and implementation_.
01529 {
01530 return this->implementation_.close ();
01531 }
|
|
||||||||||
|
Produce a key and return it through <key> which is an "out" parameter. For maps that do not naturally produce keys, the map adapters will use the <KEY_GENERATOR> class to produce a key. However, the users are responsible for not jeopardizing this key production scheme by using user specified keys with keys produced by the key generator. Implements ACE_Map. Definition at line 1550 of file Map_T.i. References key_generator_.
01551 {
01552 // Invoke the user specified key generation functor.
01553 return this->key_generator_ (key);
01554 }
|
|
||||||||||
|
Return the current size of the map.
Implements ACE_Map. Definition at line 1656 of file Map_T.i. References ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::current_size, and implementation_.
01657 {
01658 return this->implementation_.current_size ();
01659 }
|
|
||||||||||
|
Dump the state of an object.
Implements ACE_Map. Definition at line 1668 of file Map_T.i. References ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::dump, and implementation_.
01669 {
01670 this->implementation_.dump ();
01671 }
|
|
||||||||||
|
Implements ACE_Map. Definition at line 1684 of file Map_T.i. References ACE_NEW_RETURN.
01685 {
01686 ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *temp = 0;
01687 ACE_NEW_RETURN (temp,
01688 iterator_impl (this->implementation_.end ()),
01689 0);
01690 return temp;
01691 }
|
|
||||||||||
|
Is <key> in the map?
Implements ACE_Map. Definition at line 1636 of file Map_T.i. References ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::find, and implementation_.
01637 {
01638 return this->implementation_.find (key);
01639 }
|
|
||||||||||||||||
|
Locate <value> associated with <key>.
Implements ACE_Map. Definition at line 1628 of file Map_T.i. References ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::find, and implementation_.
01630 {
01631 return this->implementation_.find (key,
01632 value);
01633 }
|
|
||||||||||
|
Accessor to implementation object.
Definition at line 1714 of file Map_T.i. References implementation_.
01715 {
01716 return this->implementation_;
01717 }
|
|
||||||||||
|
Accessor to key generator.
Definition at line 1720 of file Map_T.i. References key_generator_.
01721 {
01722 return this->key_generator_;
01723 }
|
|
||||||||||||||||
|
Initialize a <Map> with size <length>.
Implements ACE_Map. Definition at line 1520 of file Map_T.i. References implementation_, and ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::open.
01522 {
01523 return this->implementation_.open (length,
01524 alloc);
01525 }
|
|
||||||||||
|
|
|
||||||||||
|
Return reverse iterator.
Implements ACE_Map. Definition at line 1694 of file Map_T.i. References ACE_NEW_RETURN.
01695 {
01696 ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *temp = 0;
01697 ACE_NEW_RETURN (temp,
01698 reverse_iterator_impl (this->implementation_.rbegin ()),
01699 0);
01700 return temp;
01701 }
|
|
||||||||||||||||||||||||
|
Reassociate <key> with <value>, storing the old key and value into the "out" parameters <old_key> and <old_value>. The function fails if <key> is not in the map for maps that do not allow user specified keys. However, for maps that allow user specified keys, if the key is not in the map, a new <key>/<value> association is created. Implements ACE_Map. Definition at line 1608 of file Map_T.i. References implementation_, and ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::rebind.
01612 {
01613 return this->implementation_.rebind (key,
01614 value,
01615 old_key,
01616 old_value);
01617 }
|
|
||||||||||||||||||||
|
Reassociate <key> with <value>, storing the old value into the "out" parameter <old_value>. The function fails if <key> is not in the map for maps that do not allow user specified keys. However, for maps that allow user specified keys, if the key is not in the map, a new <key>/<value> association is created. Implements ACE_Map. Definition at line 1598 of file Map_T.i. References implementation_, and ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::rebind.
01601 {
01602 return this->implementation_.rebind (key,
01603 value,
01604 old_value);
01605 }
|
|
||||||||||||||||
|
Reassociate <key> with <value>. The function fails if <key> is not in the map for maps that do not allow user specified keys. However, for maps that allow user specified keys, if the key is not in the map, a new <key>/<value> association is created. Implements ACE_Map. Definition at line 1590 of file Map_T.i. References implementation_, and ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::rebind.
01592 {
01593 return this->implementation_.rebind (key,
01594 value);
01595 }
|
|
||||||||||||||||
|
Recovers the original key potentially modified by the map during <bind_modify_key>.
Implements ACE_Map. Definition at line 1582 of file Map_T.i.
01584 {
01585 original_key = modified_key;
01586 return 0;
01587 }
|
|
||||||||||
|
Implements ACE_Map. Definition at line 1704 of file Map_T.i. References ACE_NEW_RETURN.
01705 {
01706 ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *temp = 0;
01707 ACE_NEW_RETURN (temp,
01708 reverse_iterator_impl (this->implementation_.rend ()),
01709 0);
01710 return temp;
01711 }
|
|
||||||||||
|
Return the total size of the map.
Implements ACE_Map. Definition at line 1662 of file Map_T.i. References implementation_, and ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::total_size.
01663 {
01664 return this->implementation_.total_size ();
01665 }
|
|
||||||||||||||||
|
Associate <key> with <value> if and only if <key> is not in the map. If <key> is already in the map, then the <value> parameter is overwritten with the existing value in the map. Returns 0 if a new <key>/<value> association is created. Returns 1 if an attempt is made to bind an existing entry. This function fails for maps that do not allow user specified keys. Implements ACE_Map. Definition at line 1620 of file Map_T.i. References implementation_, and ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::trybind.
01622 {
01623 return this->implementation_.trybind (key,
01624 value);
01625 }
|
|
||||||||||||||||
|
Remove <key> from the map, and return the <value> associated with <key>.
Implements ACE_Map. Definition at line 1648 of file Map_T.i. References implementation_, and ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::unbind.
01650 {
01651 return this->implementation_.unbind (key,
01652 value);
01653 }
|
|
||||||||||
|
Remove <key> from the map.
Implements ACE_Map. Definition at line 1642 of file Map_T.i. References implementation_, and ACE_Map_Manager< KEY, VALUE, ACE_Null_Mutex >::unbind.
01643 {
01644 return this->implementation_.unbind (key);
01645 }
|
|
|||||
|
All implementation details are forwarded to this class.
Definition at line 1566 of file Map_T.h. Referenced by bind, bind_create_key, bind_modify_key, close, current_size, dump, find, impl, open, rebind, total_size, trybind, and unbind. |
|
|||||
|
Functor class used for generating key.
Definition at line 1569 of file Map_T.h. Referenced by bind_create_key, create_key, and key_generator. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002