diff options
author | Michi Henning <michi@zeroc.com> | 2003-06-26 05:12:04 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2003-06-26 05:12:04 +0000 |
commit | 59248eaddcbe2db56b655176f30278c5b6938b8e (patch) | |
tree | c005216681efaf7bb13133c22e28ee3a2eaf7605 /cpp | |
parent | got rid of unnecessary _communicator member. (diff) | |
download | ice-59248eaddcbe2db56b655176f30278c5b6938b8e.tar.bz2 ice-59248eaddcbe2db56b655176f30278c5b6938b8e.tar.xz ice-59248eaddcbe2db56b655176f30278c5b6938b8e.zip |
Got rid of various unnecessary _communicator members.
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/CHANGES | 3 | ||||
-rw-r--r-- | cpp/demo/Ice/callback/CallbackI.cpp | 9 | ||||
-rw-r--r-- | cpp/demo/Ice/callback/CallbackI.h | 5 | ||||
-rw-r--r-- | cpp/demo/Ice/callback/Server.cpp | 2 | ||||
-rw-r--r-- | cpp/demo/IceBox/hello/HelloI.cpp | 9 | ||||
-rw-r--r-- | cpp/demo/IceBox/hello/HelloI.h | 6 | ||||
-rw-r--r-- | cpp/demo/IceBox/hello/HelloServiceI.cpp | 2 |
7 files changed, 9 insertions, 27 deletions
diff --git a/cpp/CHANGES b/cpp/CHANGES index 8ec6d5ba0af..e84593f2960 100644 --- a/cpp/CHANGES +++ b/cpp/CHANGES @@ -1,6 +1,9 @@ Changes since version 1.1.0 --------------------------- +- Fixed a number of incorrect property settings in the config files + for the demos. + - Added new property: Ice.Trace.Slicing. When set to a value > 0, unknown exception and class types that are sliced emit a warning. diff --git a/cpp/demo/Ice/callback/CallbackI.cpp b/cpp/demo/Ice/callback/CallbackI.cpp index c385087532f..935eee32c50 100644 --- a/cpp/demo/Ice/callback/CallbackI.cpp +++ b/cpp/demo/Ice/callback/CallbackI.cpp @@ -24,11 +24,6 @@ CallbackReceiverI::callback(const Current&) cout << "received callback" << endl; } -CallbackI::CallbackI(const Ice::CommunicatorPtr& communicator) : - _communicator(communicator) -{ -} - void CallbackI::initiateCallback(const CallbackReceiverPrx& proxy, const Current& current) { @@ -37,8 +32,8 @@ CallbackI::initiateCallback(const CallbackReceiverPrx& proxy, const Current& cur } void -CallbackI::shutdown(const Ice::Current&) +CallbackI::shutdown(const Ice::Current& c) { cout << "Shutting down..." << endl; - _communicator->shutdown(); + c.adapter->getCommunicator()->shutdown(); } diff --git a/cpp/demo/Ice/callback/CallbackI.h b/cpp/demo/Ice/callback/CallbackI.h index 9bd11697a0b..15abb3a04e3 100644 --- a/cpp/demo/Ice/callback/CallbackI.h +++ b/cpp/demo/Ice/callback/CallbackI.h @@ -28,14 +28,9 @@ class CallbackI : public Callback { public: - CallbackI(const Ice::CommunicatorPtr&); - virtual void initiateCallback(const CallbackReceiverPrx&, const Ice::Current&); virtual void shutdown(const Ice::Current&); -private: - - Ice::CommunicatorPtr _communicator; }; #endif diff --git a/cpp/demo/Ice/callback/Server.cpp b/cpp/demo/Ice/callback/Server.cpp index 87e2fc202f1..c76636468c8 100644 --- a/cpp/demo/Ice/callback/Server.cpp +++ b/cpp/demo/Ice/callback/Server.cpp @@ -37,7 +37,7 @@ CallbackServer::run(int argc, char* argv[]) { ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Callback.Server"); CallbackPrx self = CallbackPrx::uncheckedCast(adapter->createProxy(Ice::stringToIdentity("callback"))); - adapter->add(new CallbackI(communicator()), Ice::stringToIdentity("callback")); + adapter->add(new CallbackI, Ice::stringToIdentity("callback")); adapter->activate(); communicator()->waitForShutdown(); return EXIT_SUCCESS; diff --git a/cpp/demo/IceBox/hello/HelloI.cpp b/cpp/demo/IceBox/hello/HelloI.cpp index 7f9e1f1dac2..ac5499dd37c 100644 --- a/cpp/demo/IceBox/hello/HelloI.cpp +++ b/cpp/demo/IceBox/hello/HelloI.cpp @@ -17,11 +17,6 @@ using namespace std; -HelloI::HelloI(const Ice::CommunicatorPtr& communicator) : - _communicator(communicator) -{ -} - void HelloI::sayHello(const Ice::Current&) { @@ -29,8 +24,8 @@ HelloI::sayHello(const Ice::Current&) } void -HelloI::shutdown(const Ice::Current&) +HelloI::shutdown(const Ice::Current& c) { cout << "Shutting down..." << endl; - _communicator->shutdown(); + c.adapter->getCommunicator()->shutdown(); } diff --git a/cpp/demo/IceBox/hello/HelloI.h b/cpp/demo/IceBox/hello/HelloI.h index fdcb19dc4db..b8f82d21c1a 100644 --- a/cpp/demo/IceBox/hello/HelloI.h +++ b/cpp/demo/IceBox/hello/HelloI.h @@ -25,14 +25,8 @@ class HELLO_API HelloI : public Hello { public: - HelloI(const Ice::CommunicatorPtr&); - virtual void sayHello(const Ice::Current&); virtual void shutdown(const Ice::Current&); - -private: - - Ice::CommunicatorPtr _communicator; }; #endif diff --git a/cpp/demo/IceBox/hello/HelloServiceI.cpp b/cpp/demo/IceBox/hello/HelloServiceI.cpp index 90c523593b0..c4f93d562f7 100644 --- a/cpp/demo/IceBox/hello/HelloServiceI.cpp +++ b/cpp/demo/IceBox/hello/HelloServiceI.cpp @@ -46,7 +46,7 @@ HelloServiceI::start(const string& name, const ::Ice::StringSeq& args) { _adapter = communicator->createObjectAdapter(name); - ::Ice::ObjectPtr object = new HelloI(communicator); + ::Ice::ObjectPtr object = new HelloI; _adapter->add(object, ::Ice::stringToIdentity("hello")); _adapter->activate(); } |