summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/ImR/Combined_Service
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/examples/ImR/Combined_Service')
-rw-r--r--TAO/orbsvcs/examples/ImR/Combined_Service/ImR_Combined_Service.mpc2
-rw-r--r--TAO/orbsvcs/examples/ImR/Combined_Service/combined.cpp10
-rw-r--r--TAO/orbsvcs/examples/ImR/Combined_Service/controller.cpp9
-rw-r--r--TAO/orbsvcs/examples/ImR/Combined_Service/dynserver.cpp2
-rw-r--r--TAO/orbsvcs/examples/ImR/Combined_Service/dynserver.h2
-rw-r--r--TAO/orbsvcs/examples/ImR/Combined_Service/test.cpp19
-rw-r--r--TAO/orbsvcs/examples/ImR/Combined_Service/test_server.cpp7
7 files changed, 32 insertions, 19 deletions
diff --git a/TAO/orbsvcs/examples/ImR/Combined_Service/ImR_Combined_Service.mpc b/TAO/orbsvcs/examples/ImR/Combined_Service/ImR_Combined_Service.mpc
index fc8803905f7..709b7e60370 100644
--- a/TAO/orbsvcs/examples/ImR/Combined_Service/ImR_Combined_Service.mpc
+++ b/TAO/orbsvcs/examples/ImR/Combined_Service/ImR_Combined_Service.mpc
@@ -32,6 +32,7 @@ project(*Controller) : orbsvcsexe, exceptions {
// A client that uses corba to test out basic imr functionality
project(*Test) : orbsvcsexe, exceptions {
+ exename = test
after += *IDL
source_files {
test.cpp
@@ -43,6 +44,7 @@ project(*Test) : orbsvcsexe, exceptions {
// A server to use with the imr
project(*TestServer) : orbsvcsexe, portableserver, iortable, exceptions {
+ exename = test_server
after += *IDL
// The gnuace specific portion is to prevent invalid object files from
// IDL generated files being compiled simultaneously with parallel builds.
diff --git a/TAO/orbsvcs/examples/ImR/Combined_Service/combined.cpp b/TAO/orbsvcs/examples/ImR/Combined_Service/combined.cpp
index 5864e974d00..618fb276e2f 100644
--- a/TAO/orbsvcs/examples/ImR/Combined_Service/combined.cpp
+++ b/TAO/orbsvcs/examples/ImR/Combined_Service/combined.cpp
@@ -8,7 +8,7 @@
#include "ace/Service_Config.h"
#include "ace/streams.h"
#include "ace/OS_NS_string.h"
-
+#include "ace/Argv_Type_Converter.h"
using namespace CORBA;
using namespace PortableServer;
@@ -27,7 +27,7 @@ public:
{
ACE_ASSERT(s != 0);
ACE_ASSERT(ACE_OS::strlen(s) > 0);
- return asc_.process_directive(s);
+ return asc_.process_directive(ACE_TEXT_TO_TCHAR_IN(s));
}
virtual void reconfigure() ACE_THROW_SPEC ((CORBA::SystemException))
@@ -36,14 +36,16 @@ public:
}
};
-int main (int argc, char* argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
try {
ACE_Service_Config config;
config.open(argc, argv);
- ORB_var orb = ORB_init(argc, argv);
+ ORB_var orb = ORB_init(convert.get_argc(), convert.get_ASCII_argv());
Object_var obj = orb->resolve_initial_references("RootPOA");
POA_var poa = POA::_narrow(obj.in());
diff --git a/TAO/orbsvcs/examples/ImR/Combined_Service/controller.cpp b/TAO/orbsvcs/examples/ImR/Combined_Service/controller.cpp
index 0bab1bfd6aa..8e2558f12c3 100644
--- a/TAO/orbsvcs/examples/ImR/Combined_Service/controller.cpp
+++ b/TAO/orbsvcs/examples/ImR/Combined_Service/controller.cpp
@@ -6,6 +6,7 @@
#include <ace/streams.h>
#include <ace/SString.h>
#include <ace/Log_Msg.h>
+#include "ace/Argv_Type_Converter.h"
using namespace CORBA;
@@ -39,13 +40,15 @@ namespace {
}
}
-int main(int argc, char* argv[]) {
+int ACE_TMAIN(int argc, ACE_TCHAR* argv[])
+{
+ ACE_Argv_Type_Converter convert (argc, argv);
try {
- ORB_var orb = ORB_init(argc, argv);
+ ORB_var orb = ORB_init(convert.get_argc(), convert.get_ASCII_argv());
- if (! parse_args(argc, argv)) {
+ if (! parse_args(convert.get_argc(), convert.get_ASCII_argv())) {
showusage();
return 1;
}
diff --git a/TAO/orbsvcs/examples/ImR/Combined_Service/dynserver.cpp b/TAO/orbsvcs/examples/ImR/Combined_Service/dynserver.cpp
index 8566023c945..36e08acfd2a 100644
--- a/TAO/orbsvcs/examples/ImR/Combined_Service/dynserver.cpp
+++ b/TAO/orbsvcs/examples/ImR/Combined_Service/dynserver.cpp
@@ -63,7 +63,7 @@ DynServer_Loader::DynServer_Loader(void)
}
int
-DynServer_Loader::init (int argc, ACE_TCHAR* argv[] ACE_ENV_ARG_DECL)
+DynServer_Loader::init (int argc, char* argv[] ACE_ENV_ARG_DECL)
{
try {
diff --git a/TAO/orbsvcs/examples/ImR/Combined_Service/dynserver.h b/TAO/orbsvcs/examples/ImR/Combined_Service/dynserver.h
index c222ebe531e..9bc066ca4f8 100644
--- a/TAO/orbsvcs/examples/ImR/Combined_Service/dynserver.h
+++ b/TAO/orbsvcs/examples/ImR/Combined_Service/dynserver.h
@@ -31,7 +31,7 @@ public:
// spawns a thread to run an internal orb which has activated
// a single DynServer servant.
- virtual int init (int argc, ACE_TCHAR *argv[]);
+ virtual int init (int argc, char *argv[]);
// Allows the service configurator to shutdown the orb
virtual int fini (void);
diff --git a/TAO/orbsvcs/examples/ImR/Combined_Service/test.cpp b/TAO/orbsvcs/examples/ImR/Combined_Service/test.cpp
index 0976425f762..807f4a68a0f 100644
--- a/TAO/orbsvcs/examples/ImR/Combined_Service/test.cpp
+++ b/TAO/orbsvcs/examples/ImR/Combined_Service/test.cpp
@@ -6,9 +6,12 @@
#include "ace/SString.h"
#include "ace/Log_Msg.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
+
#include <stdexcept>
#include <string>
+
#define assertTrue(CONDITION) \
if (CONDITION == false) { \
ACE_CString str ("Error : "#CONDITION" "__FILE__":"); \
@@ -19,13 +22,13 @@
using namespace CORBA;
-int
-main (int argc, char* argv[])
+int ACE_TMAIN(int argc, ACE_TCHAR* argv[])
{
- try
+ ACE_Argv_Type_Converter convert (argc, argv);
+
+ try
{
-
- ORB_var orb = ORB_init (argc, argv);
+ ORB_var orb = ORB_init(convert.get_argc(), convert.get_ASCII_argv());
Object_var obj = orb->resolve_initial_references ("Test");
test_var test = test::_narrow (obj.in ());
@@ -34,12 +37,12 @@ main (int argc, char* argv[])
Long n = test->get ();
Long m = test->get ();
assertTrue (m == n + 1);
-
+
ACE_DEBUG ((LM_DEBUG, "All tests ran successfully.\n"));
return 0;
- }
- catch (CORBA::Exception& e)
+ }
+ catch (CORBA::Exception& e)
{
ACE_PRINT_EXCEPTION (e, "test:");
}
diff --git a/TAO/orbsvcs/examples/ImR/Combined_Service/test_server.cpp b/TAO/orbsvcs/examples/ImR/Combined_Service/test_server.cpp
index a3d821fde70..d9a7fd6804f 100644
--- a/TAO/orbsvcs/examples/ImR/Combined_Service/test_server.cpp
+++ b/TAO/orbsvcs/examples/ImR/Combined_Service/test_server.cpp
@@ -9,6 +9,7 @@
#include "ace/streams.h"
#include "ace/ARGV.h"
+#include "ace/Argv_Type_Converter.h"
using namespace CORBA;
using namespace PortableServer;
@@ -38,11 +39,13 @@ POA_ptr createPersistPOA(const char* name, POA_ptr root_poa, POAManager_ptr poam
return poa._retn();
}
-int main(int argc, char* argv[]) {
+int ACE_TMAIN(int argc, ACE_TCHAR* argv[])
+{
+ ACE_Argv_Type_Converter convert (argc, argv);
try {
- ORB_var orb = ORB_init(argc, argv);
+ ORB_var orb = ORB_init(convert.get_argc(), convert.get_ASCII_argv());
Object_var obj = orb->resolve_initial_references("RootPOA");
POA_var root_poa = POA::_narrow(obj.in());