diff options
author | Matthew Newhook <matthew@zeroc.com> | 2015-03-18 12:58:16 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2015-03-18 12:58:16 -0230 |
commit | 9b7668c7c92cf9cb311fe444cdddb489cd2a219d (patch) | |
tree | 5016567c58c81f5654e9d01935e199c6bf4761d2 /cpp/demo/Manual/printer/Server.cpp | |
parent | VS add-in & build updates: (diff) | |
download | ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.bz2 ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.xz ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.zip |
Removed demos.
Moved demoscript to distribution.
Diffstat (limited to 'cpp/demo/Manual/printer/Server.cpp')
-rw-r--r-- | cpp/demo/Manual/printer/Server.cpp | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/cpp/demo/Manual/printer/Server.cpp b/cpp/demo/Manual/printer/Server.cpp deleted file mode 100644 index 13007ba775a..00000000000 --- a/cpp/demo/Manual/printer/Server.cpp +++ /dev/null @@ -1,68 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Ice.h> -#include <Printer.h> - -using namespace std; -using namespace Demo; - -class PrinterI : public Printer -{ -public: - - virtual void printString(const string &, const Ice::Current&); -}; - -void -PrinterI:: -printString(const string &s, const Ice::Current&) -{ - cout << s << endl; -} - -int -main(int argc, char* argv[]) -{ - int status = 0; - Ice::CommunicatorPtr ic; - try - { - ic = Ice::initialize(argc, argv); - Ice::ObjectAdapterPtr adapter = - ic->createObjectAdapterWithEndpoints("SimplePrinterAdapter", "default -h localhost -p 10000"); - Ice::ObjectPtr object = new PrinterI; - adapter->add(object, ic->stringToIdentity("SimplePrinter")); - adapter->activate(); - ic->waitForShutdown(); - } - catch(const Ice::Exception& e) - { - cerr << e << endl; - status = 1; - } - catch(const char* msg) - { - cerr << msg << endl; - status = 1; - } - if(ic) - { - try - { - ic->destroy(); - } - catch(const Ice::Exception& e) - { - cerr << e << endl; - status = 1; - } - } - return status; -} |