diff options
Diffstat (limited to 'TAO/examples/Quoter')
-rw-r--r-- | TAO/examples/Quoter/Factory_Finder.cpp | 8 | ||||
-rw-r--r-- | TAO/examples/Quoter/Generic_Factory.cpp | 10 | ||||
-rw-r--r-- | TAO/examples/Quoter/Quoter.mpc | 4 | ||||
-rw-r--r-- | TAO/examples/Quoter/client.cpp | 12 | ||||
-rw-r--r-- | TAO/examples/Quoter/server.cpp | 8 |
5 files changed, 27 insertions, 15 deletions
diff --git a/TAO/examples/Quoter/Factory_Finder.cpp b/TAO/examples/Quoter/Factory_Finder.cpp index f8b7c4a070e..8c3afbbbffe 100644 --- a/TAO/examples/Quoter/Factory_Finder.cpp +++ b/TAO/examples/Quoter/Factory_Finder.cpp @@ -15,6 +15,7 @@ // ============================================================================ #include "Factory_Finder.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (Quoter, @@ -189,7 +190,7 @@ Quoter_Factory_Finder_Server::run (ACE_ENV_SINGLE_ARG_DECL) u_int Quoter_Factory_Finder_Server::parse_args (void) { - ACE_Get_Opt get_opt (this->argc_, this->argv_, "?d:"); + ACE_Get_Arg_Opt<char> get_opt (this->argc_, this->argv_, "?d:"); int opt; int exit_code = 0; @@ -220,13 +221,14 @@ Quoter_Factory_Finder_Server::parse_args (void) // function main int -main (int argc, char *argv []) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { + ACE_Argv_Type_Converter convert (argc, argv); Quoter_Factory_Finder_Server quoter_Factory_Finder_Server; ACE_TRY_NEW_ENV { - int result = quoter_Factory_Finder_Server.init (argc, argv ACE_ENV_ARG_PARAMETER); + int result = quoter_Factory_Finder_Server.init (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result == -1) diff --git a/TAO/examples/Quoter/Generic_Factory.cpp b/TAO/examples/Quoter/Generic_Factory.cpp index eb1bfe506ab..fca74893051 100644 --- a/TAO/examples/Quoter/Generic_Factory.cpp +++ b/TAO/examples/Quoter/Generic_Factory.cpp @@ -16,6 +16,7 @@ #include "Generic_Factory.h" #include "orbsvcs/LifeCycleServiceC.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (Quoter, Generic_Factory, @@ -243,7 +244,7 @@ Quoter_Generic_Factory_Server::run (ACE_ENV_SINGLE_ARG_DECL) u_int Quoter_Generic_Factory_Server::parse_args (void) { - ACE_Get_Opt get_opt (this->argc_, this->argv_, "l?d:"); + ACE_Get_Arg_Opt<char> get_opt (this->argc_, this->argv_, "l?d:"); int opt; int exit_code = 0; @@ -278,14 +279,15 @@ Quoter_Generic_Factory_Server::parse_args (void) // function main int -main (int argc, char *argv []) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { + ACE_Argv_Type_Converter convert (argc, argv); Quoter_Generic_Factory_Server quoter_Generic_Factory_Server; ACE_TRY_NEW_ENV { - if (quoter_Generic_Factory_Server.init (argc, - argv + if (quoter_Generic_Factory_Server.init (convert.get_argc(), + convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER) == -1) return 1; else diff --git a/TAO/examples/Quoter/Quoter.mpc b/TAO/examples/Quoter/Quoter.mpc index a5ed3d19def..159c242befc 100644 --- a/TAO/examples/Quoter/Quoter.mpc +++ b/TAO/examples/Quoter/Quoter.mpc @@ -9,6 +9,7 @@ project(*IDL): taoidldefaults { } project(*server): namingexe, lifecycle, minimum_corba, utils { + exename = server after += *IDL Source_Files { server.cpp @@ -21,6 +22,7 @@ project(*server): namingexe, lifecycle, minimum_corba, utils { } project(*client): namingexe, lifecycle, minimum_corba { + exename = client after += *IDL Source_Files { client.cpp @@ -31,6 +33,7 @@ project(*client): namingexe, lifecycle, minimum_corba { } project(*Factory Finder): namingexe, lifecycle, minimum_corba, utils { + exename = Factory_Finder after += *IDL Source_Files { Factory_Finder.cpp @@ -43,6 +46,7 @@ project(*Factory Finder): namingexe, lifecycle, minimum_corba, utils { } project(*Generic Factory): namingexe, lifecycle, minimum_corba, utils { + exename = Generic_Factory after += *IDL Source_Files { Generic_Factory.cpp diff --git a/TAO/examples/Quoter/client.cpp b/TAO/examples/Quoter/client.cpp index 7dec1d90a22..1d3482cacd6 100644 --- a/TAO/examples/Quoter/client.cpp +++ b/TAO/examples/Quoter/client.cpp @@ -1,6 +1,7 @@ // $Id$ #include "ace/Read_Buffer.h" +#include "ace/Argv_Type_Converter.h" #include "orbsvcs/CosNamingC.h" @@ -42,7 +43,7 @@ Quoter_Client::Quoter_Client (void) int Quoter_Client::parse_args (void) { - ACE_Get_Opt get_opts (argc_, argv_, "n:d:lx"); + ACE_Get_Arg_Opt<char> get_opts (argc_, argv_, "n:d:lx"); int opt; int exit_code = 0; @@ -372,21 +373,22 @@ Quoter_Client::init (int argc, char **argv) // This function runs the test. int -main (int argc, char **argv) +ACE_TMAIN (int argc, ACE_TCHAR **argv) { + ACE_Argv_Type_Converter convert (argc, argv); ACE_Thread_Manager thr_mgr; int i; int threads = 1; for (i = 0; i < argc; i++) - if (ACE_OS::strcmp (argv[i], "-n") == 0) - threads = ACE_OS::atoi(argv[i + 1]); + if (ACE_OS::strcmp (convert.get_ASCII_argv()[i], "-n") == 0) + threads = ACE_OS::atoi(convert.get_ASCII_argv()[i + 1]); Quoter_Task **clients = new Quoter_Task*[threads]; for (i = 0; i < threads; i++) - clients[i] = new Quoter_Task (argc, argv); + clients[i] = new Quoter_Task (convert.get_argc(), convert.get_ASCII_argv()); for (i = 0; i < threads; i++) diff --git a/TAO/examples/Quoter/server.cpp b/TAO/examples/Quoter/server.cpp index 973111c3e7e..7b8d054358b 100644 --- a/TAO/examples/Quoter/server.cpp +++ b/TAO/examples/Quoter/server.cpp @@ -15,6 +15,7 @@ #include "server.h" #include "tao/ORB_Core.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID(Quoter, server, "$Id$") @@ -28,7 +29,7 @@ Quoter_Server::Quoter_Server (void) int Quoter_Server::parse_args (void) { - ACE_Get_Opt get_opts (argc_, argv_, "d:n:"); + ACE_Get_Arg_Opt<char> get_opts (argc_, argv_, "d:n:"); int c; while ((c = get_opts ()) != -1) @@ -259,13 +260,14 @@ Quoter_Server::~Quoter_Server (void) } int -main (int argc, char *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { + ACE_Argv_Type_Converter convert (argc, argv); Quoter_Server quoter_server; ACE_TRY_NEW_ENV { - int result = quoter_server.init (argc, argv ACE_ENV_ARG_PARAMETER); + int result = quoter_server.init (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result == -1) |