diff options
author | naga <naga@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-27 08:30:07 +0000 |
---|---|---|
committer | naga <naga@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-27 08:30:07 +0000 |
commit | ac162e71cdad661fde9a7597673f0896cecce181 (patch) | |
tree | 1656897e6e8dff264acd60144c34ee51b952d70d | |
parent | cd67bc48044de6a17d389c9935700ff114801648 (diff) | |
download | ATCD-ac162e71cdad661fde9a7597673f0896cecce181.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/tests/POA/Generic_Servant/client.cpp | 28 |
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; } - |