Active_Map_Manager.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Active_Map_Manager.inl,v 4.2 2005/10/28 16:14:51 ossama Exp
00004 
00005 #include "ace/OS_NS_string.h"
00006 
00007 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00008 
00009 ACE_INLINE
00010 ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key (void)
00011 {
00012   // If you change ~0, please change ACE_Map_Manager::free_list_id()
00013   // accordingly.
00014   this->key_data_.slot_index_ = (ACE_UINT32) ~0;
00015   this->key_data_.slot_generation_ = 0;
00016 }
00017 
00018 ACE_INLINE
00019 ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key (ACE_UINT32 slot_index,
00020                                                         ACE_UINT32 slot_generation)
00021 {
00022   this->key_data_.slot_index_ = slot_index;
00023   this->key_data_.slot_generation_ = slot_generation;
00024 }
00025 
00026 ACE_INLINE ACE_UINT32
00027 ACE_Active_Map_Manager_Key::slot_index (void) const
00028 {
00029   return this->key_data_.slot_index_;
00030 }
00031 
00032 ACE_INLINE ACE_UINT32
00033 ACE_Active_Map_Manager_Key::slot_generation (void) const
00034 {
00035   return this->key_data_.slot_generation_;
00036 }
00037 
00038 ACE_INLINE bool
00039 ACE_Active_Map_Manager_Key::operator== (const ACE_Active_Map_Manager_Key &rhs) const
00040 {
00041   return
00042     this->key_data_.slot_index_ == rhs.key_data_.slot_index_ &&
00043     this->key_data_.slot_generation_ == rhs.key_data_.slot_generation_;
00044 }
00045 
00046 ACE_INLINE bool
00047 ACE_Active_Map_Manager_Key::operator!= (const ACE_Active_Map_Manager_Key &rhs) const
00048 {
00049   return !this->operator== (rhs);
00050 }
00051 
00052 ACE_INLINE void
00053 ACE_Active_Map_Manager_Key::slot_index (ACE_UINT32 i)
00054 {
00055   this->key_data_.slot_index_ = i;
00056 }
00057 
00058 ACE_INLINE void
00059 ACE_Active_Map_Manager_Key::slot_generation (ACE_UINT32 g)
00060 {
00061   this->key_data_.slot_generation_ = g;
00062 }
00063 
00064 ACE_INLINE void
00065 ACE_Active_Map_Manager_Key::increment_slot_generation_count (void)
00066 {
00067   ++this->key_data_.slot_generation_;
00068 }
00069 
00070 /* static */
00071 ACE_INLINE size_t
00072 ACE_Active_Map_Manager_Key::size (void)
00073 {
00074   return sizeof (ACE_UINT32) + sizeof (ACE_UINT32);
00075 }
00076 
00077 ACE_INLINE void
00078 ACE_Active_Map_Manager_Key::decode (const void *data)
00079 {
00080   // Copy the information from the user buffer into the key.
00081   ACE_OS::memcpy (&this->key_data_,
00082                   data,
00083                   sizeof this->key_data_);
00084 }
00085 
00086 ACE_INLINE void
00087 ACE_Active_Map_Manager_Key::encode (void *data) const
00088 {
00089   // Copy the key data to the user buffer.
00090   ACE_OS::memcpy (data,
00091                   &this->key_data_,
00092                   sizeof this->key_data_);
00093 }
00094 
00095 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 09:41:45 2006 for ACE by doxygen 1.3.6