2 #include "ace/OS_NS_string.h"
4 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
7 ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key ()
9 // If you change ~0, please change ACE_Map_Manager::free_list_id()
11 this->key_data_.slot_index_ = (ACE_UINT32) ~0;
12 this->key_data_.slot_generation_ = 0;
16 ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key (ACE_UINT32 slot_index,
17 ACE_UINT32 slot_generation)
19 this->key_data_.slot_index_ = slot_index;
20 this->key_data_.slot_generation_ = slot_generation;
24 ACE_Active_Map_Manager_Key::slot_index () const
26 return this->key_data_.slot_index_;
30 ACE_Active_Map_Manager_Key::slot_generation () const
32 return this->key_data_.slot_generation_;
36 ACE_Active_Map_Manager_Key::operator== (const ACE_Active_Map_Manager_Key &rhs) const
39 this->key_data_.slot_index_ == rhs.key_data_.slot_index_ &&
40 this->key_data_.slot_generation_ == rhs.key_data_.slot_generation_;
44 ACE_Active_Map_Manager_Key::operator!= (const ACE_Active_Map_Manager_Key &rhs) const
46 return !this->operator== (rhs);
50 ACE_Active_Map_Manager_Key::slot_index (ACE_UINT32 i)
52 this->key_data_.slot_index_ = i;
56 ACE_Active_Map_Manager_Key::slot_generation (ACE_UINT32 g)
58 this->key_data_.slot_generation_ = g;
62 ACE_Active_Map_Manager_Key::increment_slot_generation_count ()
64 ++this->key_data_.slot_generation_;
69 ACE_Active_Map_Manager_Key::size ()
71 return sizeof (ACE_UINT32) + sizeof (ACE_UINT32);
75 ACE_Active_Map_Manager_Key::decode (const void *data)
77 // Copy the information from the user buffer into the key.
78 ACE_OS::memcpy (&this->key_data_,
80 sizeof this->key_data_);
84 ACE_Active_Map_Manager_Key::encode (void *data) const
86 // Copy the key data to the user buffer.
89 sizeof this->key_data_);
92 ACE_END_VERSIONED_NAMESPACE_DECL