summaryrefslogtreecommitdiff
path: root/ace/Active_Map_Manager.h
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-23 12:04:27 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-23 12:04:27 +0000
commite9904f13828378317f57150034d9ceccf86b62f9 (patch)
tree018d8bd882f5c484fc5d29b03e65d55cdeaa092c /ace/Active_Map_Manager.h
parent972642245aea9c803541ce0390dec403dbc92f16 (diff)
downloadATCD-e9904f13828378317f57150034d9ceccf86b62f9.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/Active_Map_Manager.h')
-rw-r--r--ace/Active_Map_Manager.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/ace/Active_Map_Manager.h b/ace/Active_Map_Manager.h
new file mode 100644
index 00000000000..f87dcacb2ee
--- /dev/null
+++ b/ace/Active_Map_Manager.h
@@ -0,0 +1,78 @@
+/* -*- C++ -*- */
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// ace
+//
+// = FILENAME
+// Active_Map_Manager.h
+//
+// = AUTHOR
+// Irfan Pyarali
+//
+// ============================================================================
+
+#ifndef ACE_ACTIVE_MAP_MANAGER_H
+#define ACE_ACTIVE_MAP_MANAGER_H
+
+#include "ace/OS.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class ACE_Export ACE_Active_Map_Manager_Key
+{
+ // = TITLE
+ // Key used in the Active Object Map.
+ //
+ // = DESCRIPTION
+ // 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,
+public:
+ ACE_Active_Map_Manager_Key (void);
+ // Default constructor.
+
+ ACE_Active_Map_Manager_Key (u_long index,
+ u_long generation);
+ // Constructor given the index and generation number. This is
+ // useful once the user has somehow recovered the index and
+ // generation number from the client.
+
+ u_long index (void) const;
+ // Get the index.
+
+ u_long generation (void) const;
+ // Get the generation number.
+
+ // = These really should be protected but because of template
+ // friends, they are not.
+
+ void index (u_long i);
+ // Set the index.
+
+ void generation (u_long g);
+ // Set the generation number.
+
+ void increment_generation_count (void);
+ // Increment the generation number.
+
+private:
+ u_long index_;
+ // Index in the active map.
+
+ u_long generation_;
+ // Generation number of <index_> slot in the active map.
+};
+
+// Include the templates here.
+#include "ace/Active_Map_Manager_T.h"
+
+#if defined (__ACE_INLINE__)
+#include "ace/Active_Map_Manager.i"
+#endif /* __ACE_INLINE__ */
+
+#endif /* ACE_ACTIVE_MAP_MANAGER_H */