summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2001-02-06 22:53:27 +0000
committerSteve Huston <shuston@riverace.com>2001-02-06 22:53:27 +0000
commit7d9e3e0157ff04accb569443d61942c07597ef8b (patch)
treea0e93f32892d31a7832e71ed44562b7db3e6800f
parent0a2e721214adbe441c6ffee4961eea72dddb2910 (diff)
downloadATCD-7d9e3e0157ff04accb569443d61942c07597ef8b.tar.gz
ChangeLogTag:Tue Feb 06 17:16:43 2001 Steve Huston <shuston@riverace.com>
-rw-r--r--tests/MEM_Stream_Test.cpp26
-rw-r--r--tests/MEM_Stream_Test.h59
2 files changed, 61 insertions, 24 deletions
diff --git a/tests/MEM_Stream_Test.cpp b/tests/MEM_Stream_Test.cpp
index d839fb25b30..f60af4d2b95 100644
--- a/tests/MEM_Stream_Test.cpp
+++ b/tests/MEM_Stream_Test.cpp
@@ -31,36 +31,14 @@ ACE_RCSID(tests, MEM_Stream_Test, "$Id$")
#if defined (ACE_HAS_THREADS)
+#include "MEM_Stream_Test.h" // Defines Echo_Handler
+
#define NO_OF_CONNECTION 3
#define NO_OF_ITERATION 100
static int opt_wfmo_reactor = 1;
static int opt_select_reactor = 1;
-class Echo_Handler : public ACE_Svc_Handler<ACE_MEM_STREAM, ACE_MT_SYNCH>
-{
- // = TITLE
- // Simple class for reading in the data and then sending it back
-public:
- Echo_Handler ();
- // virtual int open (void *);
- virtual int handle_input (ACE_HANDLE h);
- virtual int handle_close (ACE_HANDLE handle,
- ACE_Reactor_Mask close_mask);
- // The Svc_Handler callbacks.
-
-public:
- static u_short waiting_;
- // How many connections are we waiting for.
-
- static u_short connection_count_;
- // How many connections are currently open
-
-private:
- ACE_TCHAR name_[MAXPATHLEN];
- u_short connection_;
-};
-
u_short Echo_Handler::waiting_ = NO_OF_CONNECTION;
u_short Echo_Handler::connection_count_ = 0;
diff --git a/tests/MEM_Stream_Test.h b/tests/MEM_Stream_Test.h
new file mode 100644
index 00000000000..8f6ea264525
--- /dev/null
+++ b/tests/MEM_Stream_Test.h
@@ -0,0 +1,59 @@
+/* -*- C++ -*- */
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// tests
+//
+// = FILENAME
+// MEM_Stream_Test.h
+//
+// = DESCRIPTION
+// This file has the class definitions needed for template generation in
+// MEM_Stream_Test.cpp. They have to be in a separate file so AIX xlC can
+// find them at auto-instantiate time.
+//
+// = AUTHOR
+// Steve Huston <shuston@riverace.com>
+//
+// ============================================================================
+
+#ifndef ACE_TESTS_MEM_STREAM_TEST_H
+#define ACE_TESTS_MEM_STREAM_TEST_H
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/OS.h"
+#include "ace/MEM_Stream.h"
+#include "ace/Reactor.h"
+#include "ace/Svc_Handler.h"
+#include "ace/Synch.h"
+
+class Echo_Handler : public ACE_Svc_Handler<ACE_MEM_STREAM, ACE_MT_SYNCH>
+{
+ // = TITLE
+ // Simple class for reading in the data and then sending it back
+public:
+ Echo_Handler ();
+ // virtual int open (void *);
+ virtual int handle_input (ACE_HANDLE h);
+ virtual int handle_close (ACE_HANDLE handle,
+ ACE_Reactor_Mask close_mask);
+ // The Svc_Handler callbacks.
+
+public:
+ static u_short waiting_;
+ // How many connections are we waiting for.
+
+ static u_short connection_count_;
+ // How many connections are currently open
+
+private:
+ ACE_TCHAR name_[MAXPATHLEN];
+ u_short connection_;
+};
+
+#endif /* ACE_TESTS_MEM_STREAM_TEST_H */