Key used in the Active Object Map. More...
#include <Active_Map_Manager.h>
Classes | |
struct | key_data |
Data for the Active Object Map Key. More... | |
Public Member Functions | |
ACE_Active_Map_Manager_Key (void) | |
Default constructor. | |
ACE_Active_Map_Manager_Key (ACE_UINT32 slot_index, ACE_UINT32 slot_generation) | |
ACE_UINT32 | slot_index (void) const |
Get the slot_index. | |
void | slot_index (ACE_UINT32 i) |
Set the slot_index. | |
ACE_UINT32 | slot_generation (void) const |
Get the slot_generation number. | |
void | slot_generation (ACE_UINT32 g) |
Set the slot_generation number. | |
void | decode (const void *data) |
void | encode (void *data) const |
bool | operator== (const ACE_Active_Map_Manager_Key &rhs) const |
Compare keys. | |
bool | operator!= (const ACE_Active_Map_Manager_Key &rhs) const |
void | increment_slot_generation_count (void) |
Increment the slot_generation number. | |
Static Public Member Functions | |
static size_t | size (void) |
Size required to store information about active key. | |
Private Attributes | |
key_data | key_data_ |
Data for the Active Object Map Key. |
Key used in the Active Object Map.
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 37 of file Active_Map_Manager.h.
ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key | ( | void | ) | [inline] |
Default constructor.
Definition at line 10 of file Active_Map_Manager.inl.
{ // If you change ~0, please change ACE_Map_Manager::free_list_id() // accordingly. this->key_data_.slot_index_ = (ACE_UINT32) ~0; this->key_data_.slot_generation_ = 0; }
ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key | ( | ACE_UINT32 | slot_index, | |
ACE_UINT32 | slot_generation | |||
) | [inline] |
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 19 of file Active_Map_Manager.inl.
{ this->key_data_.slot_index_ = slot_index; this->key_data_.slot_generation_ = slot_generation; }
void ACE_Active_Map_Manager_Key::decode | ( | const void * | data | ) | [inline] |
Recover state of active key from data. User must make sure that data encoded using the encode() method.
Definition at line 78 of file Active_Map_Manager.inl.
{ // Copy the information from the user buffer into the key. ACE_OS::memcpy (&this->key_data_, data, sizeof this->key_data_); }
void ACE_Active_Map_Manager_Key::encode | ( | void * | data | ) | const [inline] |
Encode state of the active key into data. data must be as big as the value returned from <size>.
Definition at line 87 of file Active_Map_Manager.inl.
{ // Copy the key data to the user buffer. ACE_OS::memcpy (data, &this->key_data_, sizeof this->key_data_); }
void ACE_Active_Map_Manager_Key::increment_slot_generation_count | ( | void | ) | [inline] |
Increment the slot_generation number.
Definition at line 65 of file Active_Map_Manager.inl.
{ ++this->key_data_.slot_generation_; }
bool ACE_Active_Map_Manager_Key::operator!= | ( | const ACE_Active_Map_Manager_Key & | rhs | ) | const [inline] |
Definition at line 47 of file Active_Map_Manager.inl.
{ return !this->operator== (rhs); }
bool ACE_Active_Map_Manager_Key::operator== | ( | const ACE_Active_Map_Manager_Key & | rhs | ) | const [inline] |
Compare keys.
Definition at line 39 of file Active_Map_Manager.inl.
{ return this->key_data_.slot_index_ == rhs.key_data_.slot_index_ && this->key_data_.slot_generation_ == rhs.key_data_.slot_generation_; }
size_t ACE_Active_Map_Manager_Key::size | ( | void | ) | [inline, static] |
Size required to store information about active key.
Definition at line 72 of file Active_Map_Manager.inl.
{ return sizeof (ACE_UINT32) + sizeof (ACE_UINT32); }
ACE_UINT32 ACE_Active_Map_Manager_Key::slot_generation | ( | void | ) | const [inline] |
Get the slot_generation number.
Definition at line 33 of file Active_Map_Manager.inl.
{ return this->key_data_.slot_generation_; }
void ACE_Active_Map_Manager_Key::slot_generation | ( | ACE_UINT32 | g | ) | [inline] |
Set the slot_generation number.
Definition at line 59 of file Active_Map_Manager.inl.
{ this->key_data_.slot_generation_ = g; }
ACE_UINT32 ACE_Active_Map_Manager_Key::slot_index | ( | void | ) | const [inline] |
Get the slot_index.
Definition at line 27 of file Active_Map_Manager.inl.
{ return this->key_data_.slot_index_; }
void ACE_Active_Map_Manager_Key::slot_index | ( | ACE_UINT32 | i | ) | [inline] |
Set the slot_index.
Definition at line 53 of file Active_Map_Manager.inl.
{ this->key_data_.slot_index_ = i; }
Data for the Active Object Map Key.
Definition at line 103 of file Active_Map_Manager.h.