00001 // -*- C++ -*- 00002 // 00003 // $Id: Active_Map_Manager.i,v 1.1.1.3 2003/02/21 18:36:32 chad Exp $ 00004 00005 ACE_INLINE 00006 ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key (void) 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 } 00013 00014 ACE_INLINE 00015 ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key (ACE_UINT32 slot_index, 00016 ACE_UINT32 slot_generation) 00017 { 00018 this->key_data_.slot_index_ = slot_index; 00019 this->key_data_.slot_generation_ = slot_generation; 00020 } 00021 00022 ACE_INLINE ACE_UINT32 00023 ACE_Active_Map_Manager_Key::slot_index (void) const 00024 { 00025 return this->key_data_.slot_index_; 00026 } 00027 00028 ACE_INLINE ACE_UINT32 00029 ACE_Active_Map_Manager_Key::slot_generation (void) const 00030 { 00031 return this->key_data_.slot_generation_; 00032 } 00033 00034 ACE_INLINE int 00035 ACE_Active_Map_Manager_Key::operator== (const ACE_Active_Map_Manager_Key &rhs) const 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 } 00041 00042 ACE_INLINE int 00043 ACE_Active_Map_Manager_Key::operator!= (const ACE_Active_Map_Manager_Key &rhs) const 00044 { 00045 return !this->operator== (rhs); 00046 } 00047 00048 ACE_INLINE void 00049 ACE_Active_Map_Manager_Key::slot_index (ACE_UINT32 i) 00050 { 00051 this->key_data_.slot_index_ = i; 00052 } 00053 00054 ACE_INLINE void 00055 ACE_Active_Map_Manager_Key::slot_generation (ACE_UINT32 g) 00056 { 00057 this->key_data_.slot_generation_ = g; 00058 } 00059 00060 ACE_INLINE void 00061 ACE_Active_Map_Manager_Key::increment_slot_generation_count (void) 00062 { 00063 ++this->key_data_.slot_generation_; 00064 } 00065 00066 /* static */ 00067 ACE_INLINE size_t 00068 ACE_Active_Map_Manager_Key::size (void) 00069 { 00070 return sizeof (ACE_UINT32) + sizeof (ACE_UINT32); 00071 } 00072 00073 ACE_INLINE void 00074 ACE_Active_Map_Manager_Key::decode (const void *data) 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 } 00081 00082 ACE_INLINE void 00083 ACE_Active_Map_Manager_Key::encode (void *data) const 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 }
1.2.14 written by Dimitri van Heesch,
© 1997-2002