summaryrefslogtreecommitdiff
path: root/cpp/demo/IceGrid/simple/Client.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2005-09-27 13:20:42 +0000
committerBenoit Foucher <benoit@zeroc.com>2005-09-27 13:20:42 +0000
commitc34bc48eec91d5e0934bf9f0b8650044ef1d8a4e (patch)
treeb11203f59335d90c6383279385be759e85f0a92a /cpp/demo/IceGrid/simple/Client.cpp
parentAdded /Zm200 to all configurations. (diff)
downloadice-c34bc48eec91d5e0934bf9f0b8650044ef1d8a4e.tar.bz2
ice-c34bc48eec91d5e0934bf9f0b8650044ef1d8a4e.tar.xz
ice-c34bc48eec91d5e0934bf9f0b8650044ef1d8a4e.zip
Fixes
Diffstat (limited to 'cpp/demo/IceGrid/simple/Client.cpp')
-rw-r--r--cpp/demo/IceGrid/simple/Client.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/cpp/demo/IceGrid/simple/Client.cpp b/cpp/demo/IceGrid/simple/Client.cpp
index a030d7f269b..b2f9fa70503 100644
--- a/cpp/demo/IceGrid/simple/Client.cpp
+++ b/cpp/demo/IceGrid/simple/Client.cpp
@@ -46,29 +46,22 @@ HelloClient::menu()
int
HelloClient::run(int argc, char* argv[])
{
- Ice::PropertiesPtr properties = communicator()->getProperties();
-
- Ice::StringSeq args = Ice::argsToStringSeq(argc, argv);
- args = properties->parseCommandLineOptions("", args);
- Ice::stringSeqToArgs(args, argc, argv);
-
//
// First we try to connect to the object with the `hello'
// identity. If it's not registered with the registry, we
// search for an object with the ::Demo::Hello type.
//
- Ice::ObjectPrx base = communicator()->stringToProxy(properties->getPropertyWithDefault("Identity", "hello"));
- HelloPrx twoway;
+ HelloPrx hello;
try
{
- twoway = HelloPrx::checkedCast(base);
+ hello = HelloPrx::checkedCast(communicator()->stringToProxy("hello"));
}
catch(const Ice::NotRegisteredException&)
{
- IceGrid::QueryPrx query = IceGrid::QueryPrx::uncheckedCast(communicator()->stringToProxy("IceGrid/Query"));
- twoway = HelloPrx::checkedCast(query->findObjectByType("::Demo::Hello"));
+ IceGrid::QueryPrx query = IceGrid::QueryPrx::checkedCast(communicator()->stringToProxy("IceGrid/Query"));
+ hello = HelloPrx::checkedCast(query->findObjectByType("::Demo::Hello"));
}
- if(!twoway)
+ if(!hello)
{
cerr << argv[0] << ": couldn't find a `::Demo::Hello' object." << endl;
return EXIT_FAILURE;
@@ -85,11 +78,11 @@ HelloClient::run(int argc, char* argv[])
cin >> c;
if(c == 't')
{
- twoway->sayHello();
+ hello->sayHello();
}
else if(c == 's')
{
- twoway->shutdown();
+ hello->shutdown();
}
else if(c == 'x')
{