#include <Active_Map_Manager.h>
Public Methods | |
| ACE_Active_Map_Manager_Key (void) | |
| Default constructor. More... | |
| ACE_Active_Map_Manager_Key (ACE_UINT32 slot_index, ACE_UINT32 slot_generation) | |
| ACE_UINT32 | slot_index (void) const |
| Get the <slot_index>. More... | |
| void | slot_index (ACE_UINT32 i) |
| Set the <slot_index>. More... | |
| ACE_UINT32 | slot_generation (void) const |
| Get the <slot_generation> number. More... | |
| void | slot_generation (ACE_UINT32 g) |
| Set the <slot_generation> number. More... | |
| void | decode (const void *data) |
| Recover state of active key from <data>. User must make sure that <data> encoded using the <encode> method. More... | |
| void | encode (void *data) const |
| Encode state of the active key into <data>. <data> must be as big as the value returned from <size>. More... | |
| int | operator== (const ACE_Active_Map_Manager_Key &rhs) const |
| Compare keys. More... | |
| int | operator!= (const ACE_Active_Map_Manager_Key &rhs) const |
| void | increment_slot_generation_count (void) |
| Increment the <slot_generation> number. More... | |
Static Public Methods | |
| size_t | size (void) |
| Size required to store information about active key. More... | |
Private Attributes | |
| key_data | key_data_ |
| Data for the Active Object Map Key. More... | |
This key keeps information of the index and the generation count of the slot it represents. Since the index information is part of the key, lookups are super fast and predictable,
Definition at line 33 of file Active_Map_Manager.h.
|
|
Default constructor.
Definition at line 6 of file Active_Map_Manager.i. References key_data_, ACE_Active_Map_Manager_Key::key_data::slot_generation_, and ACE_Active_Map_Manager_Key::key_data::slot_index_.
00007 {
00008 // If you change ~0, please change ACE_Map_Manager::free_list_id()
00009 // accordingly.
00010 this->key_data_.slot_index_ = ~0;
00011 this->key_data_.slot_generation_ = 0;
00012 }
|
|
||||||||||||
|
Constructor given the <slot_index> and <slot_generation> number. This is useful once the user has somehow recovered the <slot_index> and <slot_generation> number from the client. Definition at line 15 of file Active_Map_Manager.i. References key_data_, slot_generation, ACE_Active_Map_Manager_Key::key_data::slot_generation_, slot_index, and ACE_Active_Map_Manager_Key::key_data::slot_index_.
00017 {
00018 this->key_data_.slot_index_ = slot_index;
00019 this->key_data_.slot_generation_ = slot_generation;
00020 }
|
|
|
Recover state of active key from <data>. User must make sure that <data> encoded using the <encode> method.
Definition at line 74 of file Active_Map_Manager.i. References ACE_OS_String::memcpy.
00075 {
00076 // Copy the information from the user buffer into the key.
00077 ACE_OS_String::memcpy (&this->key_data_,
00078 data,
00079 sizeof this->key_data_);
00080 }
|
|
|
Encode state of the active key into <data>. <data> must be as big as the value returned from <size>.
Definition at line 83 of file Active_Map_Manager.i. References ACE_OS_String::memcpy.
00084 {
00085 // Copy the key data to the user buffer.
00086 ACE_OS_String::memcpy (data,
00087 &this->key_data_,
00088 sizeof this->key_data_);
00089 }
|
|
|
Increment the <slot_generation> number.
Definition at line 61 of file Active_Map_Manager.i. References key_data_, and ACE_Active_Map_Manager_Key::key_data::slot_generation_. Referenced by ACE_Active_Map_Manager::bind.
00062 {
00063 ++this->key_data_.slot_generation_;
00064 }
|
|
|
Definition at line 43 of file Active_Map_Manager.i. References operator==.
00044 {
00045 return !this->operator== (rhs);
00046 }
|
|
|
Compare keys.
Definition at line 35 of file Active_Map_Manager.i. References key_data_, ACE_Active_Map_Manager_Key::key_data::slot_generation_, and ACE_Active_Map_Manager_Key::key_data::slot_index_. Referenced by operator!=.
00036 {
00037 return
00038 this->key_data_.slot_index_ == rhs.key_data_.slot_index_ &&
00039 this->key_data_.slot_generation_ == rhs.key_data_.slot_generation_;
00040 }
|
|
|
Size required to store information about active key.
Definition at line 68 of file Active_Map_Manager.i.
00069 {
00070 return sizeof (ACE_UINT32) + sizeof (ACE_UINT32);
00071 }
|
|
|
Set the <slot_generation> number.
Definition at line 55 of file Active_Map_Manager.i. References key_data_, and ACE_Active_Map_Manager_Key::key_data::slot_generation_.
00056 {
00057 this->key_data_.slot_generation_ = g;
00058 }
|
|
|
Get the <slot_generation> number.
Definition at line 29 of file Active_Map_Manager.i. References key_data_, and ACE_Active_Map_Manager_Key::key_data::slot_generation_. Referenced by ACE_Active_Map_Manager_Key, and ACE_Active_Map_Manager::find.
00030 {
00031 return this->key_data_.slot_generation_;
00032 }
|
|
|
Set the <slot_index>.
Definition at line 49 of file Active_Map_Manager.i. References key_data_, and ACE_Active_Map_Manager_Key::key_data::slot_index_.
00050 {
00051 this->key_data_.slot_index_ = i;
00052 }
|
|
|
Get the <slot_index>.
Definition at line 23 of file Active_Map_Manager.i. References key_data_, and ACE_Active_Map_Manager_Key::key_data::slot_index_. Referenced by ACE_Active_Map_Manager_Key, ACE_Active_Map_Manager::bind, ACE_Active_Map_Manager::find, ACE_Active_Map_Manager::rebind, and ACE_Active_Map_Manager::unbind.
00024 {
00025 return this->key_data_.slot_index_;
00026 }
|
|
|
Data for the Active Object Map Key.
Definition at line 99 of file Active_Map_Manager.h. Referenced by ACE_Active_Map_Manager_Key, increment_slot_generation_count, operator==, slot_generation, and slot_index. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002