summaryrefslogtreecommitdiff
path: root/ACE/ace/Active_Map_Manager.inl
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
commitc44379cc7d9c7aa113989237ab0f56db12aa5219 (patch)
tree66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/ace/Active_Map_Manager.inl
parent3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (diff)
downloadATCD-c44379cc7d9c7aa113989237ab0f56db12aa5219.tar.gz
Repo restructuring
Diffstat (limited to 'ACE/ace/Active_Map_Manager.inl')
-rw-r--r--ACE/ace/Active_Map_Manager.inl95
1 files changed, 95 insertions, 0 deletions
diff --git a/ACE/ace/Active_Map_Manager.inl b/ACE/ace/Active_Map_Manager.inl
new file mode 100644
index 00000000000..652cf7c1f71
--- /dev/null
+++ b/ACE/ace/Active_Map_Manager.inl
@@ -0,0 +1,95 @@
+// -*- C++ -*-
+//
+// $Id$
+
+#include "ace/OS_NS_string.h"
+
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
+ACE_INLINE
+ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key (void)
+{
+ // 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_INLINE
+ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key (ACE_UINT32 slot_index,
+ ACE_UINT32 slot_generation)
+{
+ this->key_data_.slot_index_ = slot_index;
+ this->key_data_.slot_generation_ = slot_generation;
+}
+
+ACE_INLINE ACE_UINT32
+ACE_Active_Map_Manager_Key::slot_index (void) const
+{
+ return this->key_data_.slot_index_;
+}
+
+ACE_INLINE ACE_UINT32
+ACE_Active_Map_Manager_Key::slot_generation (void) const
+{
+ return this->key_data_.slot_generation_;
+}
+
+ACE_INLINE bool
+ACE_Active_Map_Manager_Key::operator== (const ACE_Active_Map_Manager_Key &rhs) const
+{
+ return
+ this->key_data_.slot_index_ == rhs.key_data_.slot_index_ &&
+ this->key_data_.slot_generation_ == rhs.key_data_.slot_generation_;
+}
+
+ACE_INLINE bool
+ACE_Active_Map_Manager_Key::operator!= (const ACE_Active_Map_Manager_Key &rhs) const
+{
+ return !this->operator== (rhs);
+}
+
+ACE_INLINE void
+ACE_Active_Map_Manager_Key::slot_index (ACE_UINT32 i)
+{
+ this->key_data_.slot_index_ = i;
+}
+
+ACE_INLINE void
+ACE_Active_Map_Manager_Key::slot_generation (ACE_UINT32 g)
+{
+ this->key_data_.slot_generation_ = g;
+}
+
+ACE_INLINE void
+ACE_Active_Map_Manager_Key::increment_slot_generation_count (void)
+{
+ ++this->key_data_.slot_generation_;
+}
+
+/* static */
+ACE_INLINE size_t
+ACE_Active_Map_Manager_Key::size (void)
+{
+ return sizeof (ACE_UINT32) + sizeof (ACE_UINT32);
+}
+
+ACE_INLINE void
+ACE_Active_Map_Manager_Key::decode (const void *data)
+{
+ // Copy the information from the user buffer into the key.
+ ACE_OS::memcpy (&this->key_data_,
+ data,
+ sizeof this->key_data_);
+}
+
+ACE_INLINE void
+ACE_Active_Map_Manager_Key::encode (void *data) const
+{
+ // Copy the key data to the user buffer.
+ ACE_OS::memcpy (data,
+ &this->key_data_,
+ sizeof this->key_data_);
+}
+
+ACE_END_VERSIONED_NAMESPACE_DECL