summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>1999-07-09 21:28:58 +0000
committerSteve Huston <shuston@riverace.com>1999-07-09 21:28:58 +0000
commitcdece6e81c9dbea11b418d88bec12bac3a59fd34 (patch)
tree8d445fea98eb1351097bd5566fcf3895606518ab
parent716eb5f6bc158c153589a08895c1ed0937a6c523 (diff)
downloadATCD-cdece6e81c9dbea11b418d88bec12bac3a59fd34.tar.gz
Move hash_key class to new file, Cache_Map_Manager_Test.h to satisfy IBM C++
-rw-r--r--tests/Cache_Map_Manager_Test.cpp11
-rw-r--r--tests/Cache_Map_Manager_Test.h23
2 files changed, 24 insertions, 10 deletions
diff --git a/tests/Cache_Map_Manager_Test.cpp b/tests/Cache_Map_Manager_Test.cpp
index d3cf646a17d..3cbe6fd7e01 100644
--- a/tests/Cache_Map_Manager_Test.cpp
+++ b/tests/Cache_Map_Manager_Test.cpp
@@ -33,22 +33,13 @@
#include "ace/Pair_T.h"
#include "ace/Synch.h"
#include "ace/Get_Opt.h"
+#include "Cache_Map_Manager_Test.h" // hash_key class defined in here
#if defined(__BORLANDC__) && __BORLANDC__ >= 0x0530
USELIB("..\ace\aced.lib");
//---------------------------------------------------------------------------
#endif /* defined(__BORLANDC__) && __BORLANDC__ >= 0x0530 */
-class hash_key
-{
-public:
- u_long operator () (size_t t) const
- {
- // Simply returns t
- return t;
- }
-};
-
typedef size_t KEY;
typedef size_t VALUE;
typedef int ATTR;
diff --git a/tests/Cache_Map_Manager_Test.h b/tests/Cache_Map_Manager_Test.h
new file mode 100644
index 00000000000..54261be9d0c
--- /dev/null
+++ b/tests/Cache_Map_Manager_Test.h
@@ -0,0 +1,23 @@
+// $Id$
+
+// Define class needed for generating templates. IBM C++ requires this to
+// be in its own file for auto template instantiation.
+
+#ifndef __ACE_CACHE_MAP_MANAGER_TEST_H
+#define __ACE_CACHE_MAP_MANAGER_TEST_H
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class hash_key
+{
+public:
+ u_long operator () (size_t t) const
+ {
+ // Simply returns t
+ return t;
+ }
+};
+
+#endif /* __ACE_CACHE_MAP_MANAGER_TEST_T */