summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaga <naga@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-27 08:30:07 +0000
committernaga <naga@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-27 08:30:07 +0000
commitac162e71cdad661fde9a7597673f0896cecce181 (patch)
tree1656897e6e8dff264acd60144c34ee51b952d70d
parentcd67bc48044de6a17d389c9935700ff114801648 (diff)
downloadATCD-ac162e71cdad661fde9a7597673f0896cecce181.tar.gz
*** empty log message ***
-rw-r--r--TAO/tests/POA/Generic_Servant/client.cpp28
1 files changed, 24 insertions, 4 deletions
diff --git a/TAO/tests/POA/Generic_Servant/client.cpp b/TAO/tests/POA/Generic_Servant/client.cpp
index 2d8f5ae42d4..1d988f86bea 100644
--- a/TAO/tests/POA/Generic_Servant/client.cpp
+++ b/TAO/tests/POA/Generic_Servant/client.cpp
@@ -1,3 +1,19 @@
+// $Id$
+//
+//===============================================================================
+//
+//
+// = FILENAME
+// client.cpp
+//
+// = DESCRIPTION
+// This is a simple foo client implementation
+//
+// = AUTHOR
+// Irfan Pyarali
+//
+//==================================================================================
+
#include "ace/streams.h"
#include "ace/Get_Opt.h"
#include "FooC.h"
@@ -29,16 +45,17 @@ parse_args (int argc, char **argv)
if (ior == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Please specify the IOR for the servant"), -1);
-
+
// Indicates successful parsing of command line.
return 0;
}
-int
+int
main (int argc, char **argv)
{
CORBA::Environment env;
+ // Initialize the ORB
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0, env);
if (env.exception () != 0)
{
@@ -48,6 +65,7 @@ main (int argc, char **argv)
parse_args (argc, argv);
+ // Get an object reference from the argument string
CORBA::Object_var object = orb->string_to_object (ior, env);
if (env.exception () != 0)
{
@@ -55,6 +73,7 @@ main (int argc, char **argv)
return -1;
}
+ // Try to narrow the object reference to a Foo reference
Foo_var foo = Foo::_narrow (object.in (), env);
if (env.exception () != 0)
{
@@ -62,15 +81,16 @@ main (int argc, char **argv)
return -1;
}
+ // Invoke the doit method of the foo reference
CORBA::Long result = foo->doit (env);
if (env.exception () != 0)
{
env.print_exception ("Foo::doit");
return -1;
}
-
+
+ // Print the result of doit () method of the foo reference
cout << result << endl;
return 0;
}
-