summaryrefslogtreecommitdiff
path: root/TAO/tests/Xt_Stopwatch
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2001-12-08 21:59:30 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2001-12-08 21:59:30 +0000
commitb11770b30f8b58d20fe2d61846bfa3fc5354ee7e (patch)
tree6939cf1ed0a80ce8a3224d33f3d23c0e1b9a517f /TAO/tests/Xt_Stopwatch
parent8fd5b8293423d91c699711bce0f3551cb8c20a69 (diff)
downloadATCD-b11770b30f8b58d20fe2d61846bfa3fc5354ee7e.tar.gz
Merged corba-env-clean branch.
Diffstat (limited to 'TAO/tests/Xt_Stopwatch')
-rw-r--r--TAO/tests/Xt_Stopwatch/Client.h4
-rw-r--r--TAO/tests/Xt_Stopwatch/Control.cpp1
-rw-r--r--TAO/tests/Xt_Stopwatch/client.cpp26
-rw-r--r--TAO/tests/Xt_Stopwatch/server.cpp46
-rw-r--r--TAO/tests/Xt_Stopwatch/test_i.cpp6
-rw-r--r--TAO/tests/Xt_Stopwatch/test_i.h6
6 files changed, 45 insertions, 44 deletions
diff --git a/TAO/tests/Xt_Stopwatch/Client.h b/TAO/tests/Xt_Stopwatch/Client.h
index 983eecd6295..0d116185253 100644
--- a/TAO/tests/Xt_Stopwatch/Client.h
+++ b/TAO/tests/Xt_Stopwatch/Client.h
@@ -48,8 +48,8 @@ public:
void add_callback (Control &);
// Adds the callbacks to the GUI underneath.....
- void parse_args (int argc, char *argv[],
- CORBA::Environment &ACE_TRY_ENV);
+ void parse_args (int argc, char *argv[]
+ TAO_ENV_ARG_DECL);
private:
CORBA::ORB_var orb_;
diff --git a/TAO/tests/Xt_Stopwatch/Control.cpp b/TAO/tests/Xt_Stopwatch/Control.cpp
index 755765b0073..9e7745c2f24 100644
--- a/TAO/tests/Xt_Stopwatch/Control.cpp
+++ b/TAO/tests/Xt_Stopwatch/Control.cpp
@@ -1,4 +1,5 @@
// $Id$
+
#include "Control.h"
#if defined (ACE_HAS_XT)
diff --git a/TAO/tests/Xt_Stopwatch/client.cpp b/TAO/tests/Xt_Stopwatch/client.cpp
index 2c513e36a9c..b81d13c6c98 100644
--- a/TAO/tests/Xt_Stopwatch/client.cpp
+++ b/TAO/tests/Xt_Stopwatch/client.cpp
@@ -7,7 +7,7 @@ ACE_RCSID(Xt_Stopwatch, client, "$Id$")
#if !defined (ACE_HAS_XT)
-int
+int
main (int, char *[])
{
ACE_ERROR ((LM_INFO,
@@ -38,17 +38,17 @@ main (int argc, char *argv[])
Control control (toplevel);
- ACE_DECLARE_NEW_CORBA_ENV;
+ TAO_ENV_DECLARE_NEW_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV);
+ CORBA::ORB_init (argc, argv, "" TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
Client client (orb.in ());
- client.parse_args (argc, argv, ACE_TRY_ENV);
+ client.parse_args (argc, argv TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
client.add_callback (control);
@@ -60,7 +60,7 @@ main (int argc, char *argv[])
}
ACE_CATCHANY
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Catched exception:");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Caught exception:");
return 1;
}
ACE_ENDTRY;
@@ -78,8 +78,8 @@ Client::~Client (void)
void
Client::parse_args (int argc,
- char *argv[],
- CORBA::Environment &ACE_TRY_ENV)
+ char *argv[]
+ TAO_ENV_ARG_DECL)
{
const char *ior = "file://test.ior";
@@ -102,11 +102,11 @@ Client::parse_args (int argc,
}
CORBA::Object_var object =
- this->orb_->string_to_object (ior, ACE_TRY_ENV);
+ this->orb_->string_to_object (ior TAO_ENV_ARG_PARAMETER);
ACE_CHECK;
this->server_ =
- Stopwatch::_narrow (object.in (), ACE_TRY_ENV);
+ Stopwatch::_narrow (object.in () TAO_ENV_ARG_PARAMETER);
ACE_CHECK;
if (CORBA::is_nil(this->server_.in ()))
@@ -157,10 +157,10 @@ Client::stop_callback (Widget /*widget*/,
void
Client::start_hook (void)
{
- ACE_DECLARE_NEW_CORBA_ENV;
+ TAO_ENV_DECLARE_NEW_ENV;
ACE_TRY
{
- this->server_->start (ACE_TRY_ENV);
+ this->server_->start (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -175,10 +175,10 @@ Client::start_hook (void)
void
Client::stop_hook (void)
{
- ACE_DECLARE_NEW_CORBA_ENV;
+ TAO_ENV_DECLARE_NEW_ENV;
ACE_TRY
{
- this->server_->stop (ACE_TRY_ENV);
+ this->server_->stop (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
diff --git a/TAO/tests/Xt_Stopwatch/server.cpp b/TAO/tests/Xt_Stopwatch/server.cpp
index e7c69d49af1..0086ad471bd 100644
--- a/TAO/tests/Xt_Stopwatch/server.cpp
+++ b/TAO/tests/Xt_Stopwatch/server.cpp
@@ -7,7 +7,7 @@ ACE_RCSID(Xt_Stopwatch, server, "$Id$")
#if !defined (ACE_HAS_XT)
-int
+int
main (int, char *[])
{
ACE_ERROR ((LM_INFO,
@@ -34,14 +34,14 @@ parse_args (int argc, char *argv[])
switch (c)
{
case 'o':
- ior_output_file = get_opts.optarg;
- break;
+ ior_output_file = get_opts.optarg;
+ break;
case '?':
default:
ACE_ERROR_RETURN ((LM_ERROR,
"usage: %s "
- "-o <iorfile>"
+ "-o <iorfile>"
"\n",
argv [0]),
-1);
@@ -72,16 +72,16 @@ main (int argc, char *argv[])
Stopwatch_display stopwatch (toplevel);
- ACE_DECLARE_NEW_CORBA_ENV;
+ TAO_ENV_DECLARE_NEW_ENV;
ACE_TRY
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV);
+ CORBA::ORB_init (argc, argv, "" TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV);
+ orb->resolve_initial_references ("RootPOA" TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
if (CORBA::is_nil (poa_object.in ()))
@@ -90,26 +90,26 @@ main (int argc, char *argv[])
1);
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in (), ACE_TRY_ENV);
+ PortableServer::POA::_narrow (poa_object.in () TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_TRY_ENV);
+ root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
stopwatch.manage ();
- // Make a timer class
+ // Make a timer class
Timer_imp timer (app, 100, &stopwatch);
Stopwatch_imp server_impl (orb.in (), &timer);
Stopwatch_var server =
- server_impl._this (ACE_TRY_ENV);
+ server_impl._this (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::String_var ior =
- orb->object_to_string (server.in (), ACE_TRY_ENV);
+ orb->object_to_string (server.in () TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
@@ -117,26 +117,26 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
+ FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s",
+ ior_output_file),
+ 1);
+ ACE_OS::fprintf (output_file, "%s", ior.in ());
+ ACE_OS::fclose (output_file);
}
- poa_manager->activate (ACE_TRY_ENV);
+ poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
-
+
XtRealizeWidget (toplevel);
XtAppMainLoop (app);
}
ACE_CATCHANY
{
ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Catched exception:");
+ "Caught exception:");
return 1;
}
ACE_ENDTRY;
diff --git a/TAO/tests/Xt_Stopwatch/test_i.cpp b/TAO/tests/Xt_Stopwatch/test_i.cpp
index 21acce664fb..4b42f8473db 100644
--- a/TAO/tests/Xt_Stopwatch/test_i.cpp
+++ b/TAO/tests/Xt_Stopwatch/test_i.cpp
@@ -17,21 +17,21 @@ Stopwatch_imp::Stopwatch_imp (CORBA::ORB_ptr orb, Timer_imp *timer)
}
void
-Stopwatch_imp::start (CORBA::Environment&)
+Stopwatch_imp::start (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
this->timer_->start ();
}
void
-Stopwatch_imp::stop (CORBA::Environment&)
+Stopwatch_imp::stop (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
this->timer_->stop ();
}
void
-Stopwatch_imp::shutdown (CORBA::Environment&)
+Stopwatch_imp::shutdown (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
this->orb_->shutdown (0);
diff --git a/TAO/tests/Xt_Stopwatch/test_i.h b/TAO/tests/Xt_Stopwatch/test_i.h
index e3faf1830d1..550d3c2390d 100644
--- a/TAO/tests/Xt_Stopwatch/test_i.h
+++ b/TAO/tests/Xt_Stopwatch/test_i.h
@@ -34,13 +34,13 @@ public:
// ctor
// = The Simple_Server methods.
- void start (CORBA::Environment&)
+ void start (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException));
- void stop (CORBA::Environment&)
+ void stop (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException));
- void shutdown (CORBA::Environment&)
+ void shutdown (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException));
private: