summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>1998-10-13 23:04:42 +0000
committerSteve Huston <shuston@riverace.com>1998-10-13 23:04:42 +0000
commit111115e70634337205ea5c18dbe9ea0366da42c9 (patch)
tree8f403a3385bceada7c1243edf1ecf49b8b9af302
parentcc364c35368ec619b9149547825599f55f40b3d0 (diff)
downloadATCD-111115e70634337205ea5c18dbe9ea0366da42c9.tar.gz
Split Acceptor_Handler out to a .h file to satisfy AIX xlC's template
instantiation.
-rw-r--r--tests/Thread_Pool_Reactor_Test.cpp18
-rw-r--r--tests/Thread_Pool_Reactor_Test.h42
2 files changed, 45 insertions, 15 deletions
diff --git a/tests/Thread_Pool_Reactor_Test.cpp b/tests/Thread_Pool_Reactor_Test.cpp
index e7686e46a87..3b3c92c5fdc 100644
--- a/tests/Thread_Pool_Reactor_Test.cpp
+++ b/tests/Thread_Pool_Reactor_Test.cpp
@@ -39,6 +39,7 @@
// ============================================================================
#include "tests/test_config.h"
+#include "tests/Thread_Pool_Reactor_Test.h"
#include "ace/Get_Opt.h"
#include "ace/SOCK_Connector.h"
#include "ace/SOCK_Acceptor.h"
@@ -46,6 +47,8 @@
#include "ace/Thread_Manager.h"
#include "ace/TP_Reactor.h"
+typedef ACE_Strategy_Acceptor <Acceptor_Handler, ACE_SOCK_ACCEPTOR> ACCEPTOR;
+
ACE_RCSID(tests, Atomic_Op_Test, "$Id$")
#if defined(__BORLANDC__) && __BORLANDC__ >= 0x0530
@@ -102,21 +105,6 @@ parse_arg (int argc, ASYS_TCHAR *argv[])
}
}
-class Acceptor_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH>
-{
- // = TITLE
- // This class is the Svc_Handler used by <Acceptor>.
-public:
- Acceptor_Handler (ACE_Thread_Manager *tm = 0);
- // The default constructor makes sure the right reactor is used.
-
-protected:
- virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE);
- virtual int handle_close (ACE_HANDLE fd, ACE_Reactor_Mask = 0);
-};
-
-typedef ACE_Strategy_Acceptor <Acceptor_Handler, ACE_SOCK_ACCEPTOR> ACCEPTOR;
-
Acceptor_Handler::Acceptor_Handler (ACE_Thread_Manager *thr_mgr)
: ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH> (thr_mgr)
{
diff --git a/tests/Thread_Pool_Reactor_Test.h b/tests/Thread_Pool_Reactor_Test.h
new file mode 100644
index 00000000000..1e3e3609a2b
--- /dev/null
+++ b/tests/Thread_Pool_Reactor_Test.h
@@ -0,0 +1,42 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// tests
+//
+// = FILENAME
+// Thread_Pool_Reactor_Test.h
+//
+// = DESCRIPTION
+// This class gets its own header file to work around AIX C++
+// compiler "features" related to template instantiation... It is
+// only used by Thread_Pool_Reactor_Test.cpp.
+//
+// = AUTHOR
+// Irfan Pyarali <irfan@cs.wustl.edu>
+// Nanbor Wang <nanbor@cs.wustl.edu>
+//
+// ============================================================================
+
+#ifndef ACE_TESTS_THREAD_POOL_REACTOR_TEST_H
+#define ACE_TESTS_THREAD_POOL_REACTOR_TEST_H
+
+#include "ace/SOCK_Stream.h"
+#include "ace/Svc_Handler.h"
+#include "ace/Synch.h"
+
+class Acceptor_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH>
+{
+ // = TITLE
+ // This class is the Svc_Handler used by <Acceptor>.
+public:
+ Acceptor_Handler (ACE_Thread_Manager *tm = 0);
+ // The default constructor makes sure the right reactor is used.
+
+protected:
+ virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE);
+ virtual int handle_close (ACE_HANDLE fd, ACE_Reactor_Mask = 0);
+};
+
+#endif /* ACE_TESTS_THREAD_POOL_REACTOR_TEST_H */