summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/Notify/ThreadPool/Supplier_Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/examples/Notify/ThreadPool/Supplier_Client.cpp')
-rw-r--r--TAO/orbsvcs/examples/Notify/ThreadPool/Supplier_Client.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/TAO/orbsvcs/examples/Notify/ThreadPool/Supplier_Client.cpp b/TAO/orbsvcs/examples/Notify/ThreadPool/Supplier_Client.cpp
index fb8dcf0c8ad..9ff3ca8bd3e 100644
--- a/TAO/orbsvcs/examples/Notify/ThreadPool/Supplier_Client.cpp
+++ b/TAO/orbsvcs/examples/Notify/ThreadPool/Supplier_Client.cpp
@@ -10,6 +10,7 @@
#include "orbsvcs/NotifyExtC.h"
#include "orbsvcs/CosNamingC.h"
#include "ace/OS_NS_errno.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (Notify, TAO_Notify_ThreadPool_Supplier_Client, "$Id$")
@@ -30,13 +31,13 @@ TAO_Notify_ThreadPool_Supplier_Client::~TAO_Notify_ThreadPool_Supplier_Client ()
int
TAO_Notify_ThreadPool_Supplier_Client::parse_args (int argc, char *argv[])
{
- ACE_Arg_Shifter arg_shifter (argc, argv);
+ ACE_TArg_Shifter<char> arg_shifter (argc, argv);
- const ACE_TCHAR *current_arg = 0;
+ const char *current_arg = 0;
while (arg_shifter.is_anything_left ())
{
- if ((current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-Consumers")))) // Number of consumers that we need to send an event to.
+ if ((current_arg = arg_shifter.get_the_parameter ("-Consumers"))) // Number of consumers that we need to send an event to.
{
if (current_arg != 0)
{
@@ -45,17 +46,17 @@ TAO_Notify_ThreadPool_Supplier_Client::parse_args (int argc, char *argv[])
arg_shifter.consume_arg ();
}
- else if ((current_arg = arg_shifter.get_the_parameter(ACE_TEXT("-EventChannel_ThreadPool")))) // Specify a threadpool.
+ else if ((current_arg = arg_shifter.get_the_parameter("-EventChannel_ThreadPool"))) // Specify a threadpool.
{
this->ec_thread_count_ = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
}
- else if ((current_arg = arg_shifter.get_the_parameter(ACE_TEXT("-ProxyConsumer_ThreadPool")))) // Specify a threadpool.
+ else if ((current_arg = arg_shifter.get_the_parameter("-ProxyConsumer_ThreadPool"))) // Specify a threadpool.
{
this->proxy_consumer_thread_count_= ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
}
- else if ((current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-IORoutput")))) // The file to output the supplier ior to.
+ else if ((current_arg = arg_shifter.get_the_parameter ("-IORoutput"))) // The file to output the supplier ior to.
{
if (current_arg != 0)
{
@@ -64,7 +65,7 @@ TAO_Notify_ThreadPool_Supplier_Client::parse_args (int argc, char *argv[])
arg_shifter.consume_arg ();
}
- else if ((current_arg = arg_shifter.get_the_parameter(ACE_TEXT("-MaxEvents")))) // Max Events
+ else if ((current_arg = arg_shifter.get_the_parameter("-MaxEvents"))) // Max Events
{
this->max_events_ = ACE_OS::atoi (arg_shifter.get_current ());
@@ -210,13 +211,14 @@ TAO_Notify_ThreadPool_Supplier_Client::svc (void)
}
int
-main (int argc, char *argv [])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
ACE_TRY_NEW_ENV
{
// Initialize an ORB
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(),
""
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -233,7 +235,7 @@ main (int argc, char *argv [])
/* Create a Client */
TAO_Notify_ThreadPool_Supplier_Client client (orb_objects);
- if (client.parse_args (argc, argv) != 0)
+ if (client.parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
{
ACE_DEBUG ((LM_DEBUG, "Supplier_Client::Error parsing options\n"));
return -1;