From 9b7668c7c92cf9cb311fe444cdddb489cd2a219d Mon Sep 17 00:00:00 2001 From: Matthew Newhook Date: Wed, 18 Mar 2015 12:58:16 -0230 Subject: Removed demos. Moved demoscript to distribution. --- cpp/demo/IceGrid/icebox/HelloI.cpp | 52 -------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 cpp/demo/IceGrid/icebox/HelloI.cpp (limited to 'cpp/demo/IceGrid/icebox/HelloI.cpp') diff --git a/cpp/demo/IceGrid/icebox/HelloI.cpp b/cpp/demo/IceGrid/icebox/HelloI.cpp deleted file mode 100644 index 1c71fde344d..00000000000 --- a/cpp/demo/IceGrid/icebox/HelloI.cpp +++ /dev/null @@ -1,52 +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 -#include - -using namespace std; - -HelloI::HelloI(const string& serviceName) : - _serviceName(serviceName) -{ -} - -void -HelloI::sayHello(const Ice::Current&) -{ -#ifdef _WIN32 - vector buf; - buf.resize(1024); - DWORD val = GetEnvironmentVariableW(L"LANG", &buf[0], static_cast(buf.size())); - string lang = (val > 0 && val < buf.size()) ? - IceUtil::wstringToString(&buf[0], IceUtil::getProcessStringConverter()) : string("en"); -#else - char* val = getenv("LANG"); - string lang = val ? string(val) : "en"; -#endif - - string greeting = "Hello, "; - if(lang == "fr") - { - greeting = "Bonjour, "; - } - else if(lang == "de") - { - greeting = "Hallo, "; - } - else if(lang == "es") - { - greeting = "Hola, "; - } - else if(lang == "it") - { - greeting = "Ciao, "; - } - cout << greeting << _serviceName << endl; -} -- cgit v1.2.3