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


Public Types | |
| typedef ACE_Map_Impl_Iterator_Adapter< ACE_TYPENAME ACE_Map< KEY, VALUE >::value_type, ITERATOR, ENTRY > | iterator_impl |
| typedef ACE_Map_Impl_Reverse_Iterator_Adapter< ACE_TYPENAME ACE_Map< KEY, VALUE >::value_type, REVERSE_ITERATOR, ENTRY > | reverse_iterator_impl |
| typedef IMPLEMENTATION | implementation |
Public Methods | |
| ACE_Map_Impl (ACE_Allocator *alloc=0) | |
| Initialize with the <ACE_DEFAULT_MAP_SIZE>. More... | |
| ACE_Map_Impl (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_Impl (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... | |
| IMPLEMENTATION & | impl (void) |
| Accessor to implementation object. 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 | |
| IMPLEMENTATION | implementation_ |
| All implementation details are forwarded to this class. More... | |
Private Methods | |
| void | operator= (const ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY > &) |
| ACE_Map_Impl (const ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY > &) | |
Implementation to be provided by <IMPLEMENTATION>.
Definition at line 539 of file Map_T.h.
|
|||||
|
|
|
|||||
|
|
|
|||||
|
|
|
||||||||||
|
Initialize with the <ACE_DEFAULT_MAP_SIZE>.
Definition at line 347 of file Map_T.i.
00348 : implementation_ (alloc) 00349 { 00350 } |
|
||||||||||||||||
|
Initialize with <size> entries. The <size> parameter is ignored by maps for which an initialize size does not make sense.
Definition at line 353 of file Map_T.i.
00355 : implementation_ (size, 00356 alloc) 00357 { 00358 } |
|
||||||||||
|
Close down and release dynamically allocated resources.
Definition at line 361 of file Map_T.i.
00362 {
00363 }
|
|
||||||||||
|
|
|
||||||||||
|
Return forward iterator.
Implements ACE_Map. Definition at line 508 of file Map_T.i. References ACE_NEW_RETURN.
00509 {
00510 ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *temp = 0;
00511 ACE_NEW_RETURN (temp,
00512 iterator_impl (this->implementation_.begin ()),
00513 0);
00514 return temp;
00515 }
|
|
||||||||||||||||
|
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 380 of file Map_T.i. References implementation_.
00382 {
00383 return this->implementation_.bind (key,
00384 value);
00385 }
|
|
||||||||||
|
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 410 of file Map_T.i. References implementation_.
00411 {
00412 return this->implementation_.bind_create_key (value);
00413 }
|
|
||||||||||||||||
|
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 402 of file Map_T.i. References implementation_.
00404 {
00405 return this->implementation_.bind_create_key (value,
00406 key);
00407 }
|
|
||||||||||||||||
|
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 388 of file Map_T.i. References implementation_.
00390 {
00391 return this->implementation_.bind_modify_key (value,
00392 key);
00393 }
|
|
||||||||||
|
Close down a <Map> and release dynamically allocated resources.
Implements ACE_Map. Definition at line 374 of file Map_T.i. References implementation_.
00375 {
00376 return this->implementation_.close ();
00377 }
|
|
||||||||||
|
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 396 of file Map_T.i. References implementation_.
00397 {
00398 return this->implementation_.create_key (key);
00399 }
|
|
||||||||||
|
Return the current size of the map.
Implements ACE_Map. Definition at line 490 of file Map_T.i. References implementation_.
00491 {
00492 return this->implementation_.current_size ();
00493 }
|
|
||||||||||
|
Dump the state of an object.
Implements ACE_Map. Definition at line 502 of file Map_T.i. References implementation_.
00503 {
00504 this->implementation_.dump ();
00505 }
|
|
||||||||||
|
Implements ACE_Map. Definition at line 518 of file Map_T.i. References ACE_NEW_RETURN.
00519 {
00520 ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *temp = 0;
00521 ACE_NEW_RETURN (temp,
00522 iterator_impl (this->implementation_.end ()),
00523 0);
00524 return temp;
00525 }
|
|
||||||||||
|
Is <key> in the map?
Implements ACE_Map. Definition at line 470 of file Map_T.i. References implementation_.
00471 {
00472 return this->implementation_.find (key);
00473 }
|
|
||||||||||||||||
|
Locate <value> associated with <key>.
Implements ACE_Map. Definition at line 462 of file Map_T.i. References implementation_.
00464 {
00465 return this->implementation_.find (key,
00466 value);
00467 }
|
|
||||||||||
|
Accessor to implementation object.
Definition at line 548 of file Map_T.i. References implementation_.
00549 {
00550 return this->implementation_;
00551 }
|
|
||||||||||||||||
|
Initialize a <Map> with size <length>.
Implements ACE_Map. Definition at line 366 of file Map_T.i. References implementation_.
00368 {
00369 return this->implementation_.open (length,
00370 alloc);
00371 }
|
|
||||||||||
|
|
|
||||||||||
|
Return reverse iterator.
Implements ACE_Map. Definition at line 528 of file Map_T.i. References ACE_NEW_RETURN.
00529 {
00530 ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *temp = 0;
00531 ACE_NEW_RETURN (temp,
00532 reverse_iterator_impl (this->implementation_.rbegin ()),
00533 0);
00534 return temp;
00535 }
|
|
||||||||||||||||||||||||
|
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 442 of file Map_T.i. References implementation_.
00446 {
00447 return this->implementation_.rebind (key,
00448 value,
00449 old_key,
00450 old_value);
00451 }
|
|
||||||||||||||||||||
|
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 432 of file Map_T.i. References implementation_.
00435 {
00436 return this->implementation_.rebind (key,
00437 value,
00438 old_value);
00439 }
|
|
||||||||||||||||
|
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 424 of file Map_T.i. References implementation_.
00426 {
00427 return this->implementation_.rebind (key,
00428 value);
00429 }
|
|
||||||||||||||||
|
Recovers the original key potentially modified by the map during <bind_modify_key>.
Implements ACE_Map. Definition at line 416 of file Map_T.i. References implementation_.
00418 {
00419 return this->implementation_.recover_key (modified_key,
00420 original_key);
00421 }
|
|
||||||||||
|
Implements ACE_Map. Definition at line 538 of file Map_T.i. References ACE_NEW_RETURN.
00539 {
00540 ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *temp = 0;
00541 ACE_NEW_RETURN (temp,
00542 reverse_iterator_impl (this->implementation_.rend ()),
00543 0);
00544 return temp;
00545 }
|
|
||||||||||
|
Return the total size of the map.
Implements ACE_Map. Definition at line 496 of file Map_T.i. References implementation_.
00497 {
00498 return this->implementation_.total_size ();
00499 }
|
|
||||||||||||||||
|
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 454 of file Map_T.i. References implementation_.
00456 {
00457 return this->implementation_.trybind (key,
00458 value);
00459 }
|
|
||||||||||||||||
|
Remove <key> from the map, and return the <value> associated with <key>.
Implements ACE_Map. Definition at line 482 of file Map_T.i. References implementation_.
00484 {
00485 return this->implementation_.unbind (key,
00486 value);
00487 }
|
|
||||||||||
|
Remove <key> from the map.
Implements ACE_Map. Definition at line 476 of file Map_T.i. References implementation_.
00477 {
00478 return this->implementation_.unbind (key);
00479 }
|
|
|||||
|
All implementation details are forwarded to this class.
Definition at line 701 of file Map_T.h. Referenced by bind, bind_create_key, bind_modify_key, close, create_key, current_size, dump, find, impl, open, rebind, recover_key, total_size, trybind, and unbind. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002