From b3fa58c34461a964f76dd557b3511ac31840bfc9 Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Wed, 26 Jun 2024 12:22:29 -0400 Subject: [PATCH] Remove IceUtilInternal namespace in C++ (#2350) --- ...reTransportClientAuthenticationOptions.cpp | 2 +- ...reTransportServerAuthenticationOptions.cpp | 2 +- cpp/src/Glacier2/Glacier2Router.cpp | 9 +- cpp/src/Glacier2/Glacier2Router.rc | 2 +- cpp/src/Glacier2/ProxyVerifier.cpp | 3 +- .../CryptPermissionsVerifier.rc | 2 +- .../CryptPermissionsVerifierI.cpp | 6 +- cpp/src/Glacier2Lib/Glacier2.rc | 2 +- cpp/src/Ice/ConnectionFactory.cpp | 2 +- cpp/src/Ice/ConnectionI.cpp | 2 +- cpp/src/{IceUtil => Ice}/ConsoleUtil.cpp | 20 ++-- cpp/src/{IceUtil => Ice}/ConsoleUtil.h | 6 +- cpp/src/{IceUtil => Ice}/DisableWarnings.h | 4 +- cpp/src/{IceUtil => Ice}/FileUtil.cpp | 70 ++++++------ cpp/src/{IceUtil => Ice}/FileUtil.h | 6 +- cpp/src/Ice/Ice.rc | 2 +- cpp/src/Ice/IconvStringConverter.cpp | 1 - cpp/src/Ice/InputStream.cpp | 2 +- cpp/src/Ice/Instance.cpp | 17 ++- cpp/src/Ice/LocatorInfo.cpp | 2 +- cpp/src/Ice/LoggerI.cpp | 13 ++- cpp/src/Ice/LoggerUtil.cpp | 4 +- cpp/src/Ice/Makefile.mk | 5 +- cpp/src/Ice/Network.cpp | 6 +- cpp/src/Ice/ObjectAdapterI.cpp | 3 +- cpp/src/{IceUtil => Ice}/Options.cpp | 70 ++++++------ cpp/src/{IceUtil => Ice}/Options.h | 6 +- cpp/src/Ice/OutgoingResponse.cpp | 6 +- cpp/src/{IceUtil => Ice}/OutputUtil.cpp | 100 +++++++++--------- cpp/src/{IceUtil => Ice}/OutputUtil.h | 6 +- cpp/src/Ice/PluginManagerI.cpp | 6 +- cpp/src/Ice/Properties.cpp | 4 +- cpp/src/{IceUtil => Ice}/Random.cpp | 4 +- cpp/src/{IceUtil => Ice}/Random.h | 6 +- cpp/src/Ice/Reference.cpp | 4 +- cpp/src/{IceUtil => Ice}/ResourceConfig.h | 4 +- cpp/src/Ice/SSL/OpenSSLEngine.cpp | 2 +- cpp/src/Ice/SSL/OpenSSLEngine.h | 2 +- cpp/src/Ice/SSL/SSLEngine.cpp | 1 - cpp/src/Ice/SSL/SSLUtil.cpp | 14 +-- cpp/src/Ice/SSL/SchannelEngine.cpp | 8 +- cpp/src/Ice/SSL/SecureTransportEngine.cpp | 9 +- .../Ice/SSL/SecureTransportTransceiverI.cpp | 2 +- cpp/src/Ice/SSL/SecureTransportUtil.cpp | 8 +- cpp/src/{IceUtil => Ice}/ScannerConfig.h | 4 +- cpp/src/Ice/Service.cpp | 3 +- .../{IceUtil/Exception.h => Ice/StackTrace.h} | 6 +- cpp/src/Ice/StringConverter.cpp | 2 +- cpp/src/Ice/Timer.cpp | 3 +- cpp/src/Ice/UUID.cpp | 4 +- cpp/src/{IceUtil => Ice}/UndefSysMacros.h | 4 +- cpp/src/Ice/UtilException.cpp | 6 +- cpp/src/Ice/WSTransceiver.cpp | 6 +- cpp/src/Ice/msbuild/ice/ice.vcxproj | 21 ++-- cpp/src/Ice/msbuild/ice/ice.vcxproj.filters | 45 +++----- cpp/src/IceBT/TransceiverI.cpp | 2 +- cpp/src/IceBox/Admin.cpp | 9 +- cpp/src/IceBox/IceBox.rc | 2 +- cpp/src/IceBox/IceBoxAdmin.rc | 2 +- cpp/src/IceBox/IceBoxExe.rc | 2 +- cpp/src/IceBox/IceBoxService.cpp | 6 +- cpp/src/IceBox/ServiceManagerI.cpp | 10 +- cpp/src/IceBridge/IceBridge.cpp | 6 +- cpp/src/IceBridge/IceBridge.rc | 2 +- cpp/src/IceDB/IceDB.h | 4 +- cpp/src/IceDB/IceDB.rc | 2 +- cpp/src/IceDiscovery/IceDiscovery.rc | 2 +- cpp/src/IceDiscovery/LocatorI.cpp | 4 +- cpp/src/IceGrid/Activator.cpp | 7 +- cpp/src/IceGrid/AdapterCache.cpp | 8 +- cpp/src/IceGrid/AllocatableObjectCache.cpp | 4 +- cpp/src/IceGrid/Client.cpp | 23 ++-- cpp/src/IceGrid/Database.cpp | 6 +- cpp/src/IceGrid/Database.h | 4 +- cpp/src/IceGrid/DescriptorHelper.cpp | 3 +- cpp/src/IceGrid/DescriptorHelper.h | 30 +++--- cpp/src/IceGrid/FileCache.cpp | 6 +- cpp/src/IceGrid/FileUserAccountMapperI.cpp | 4 +- cpp/src/IceGrid/IceGridAdmin.rc | 2 +- cpp/src/IceGrid/IceGridNode.cpp | 7 +- cpp/src/IceGrid/IceGridNode.rc | 2 +- cpp/src/IceGrid/IceGridRegistry.cpp | 12 +-- cpp/src/IceGrid/IceGridRegistry.rc | 2 +- cpp/src/IceGrid/InternalRegistryI.cpp | 2 +- cpp/src/IceGrid/NodeI.cpp | 6 +- cpp/src/IceGrid/ObjectCache.cpp | 2 +- cpp/src/IceGrid/Parser.cpp | 27 +++-- cpp/src/IceGrid/PlatformInfo.cpp | 6 +- cpp/src/IceGrid/RegistryI.cpp | 4 +- cpp/src/IceGrid/Scanner.cpp | 2 +- cpp/src/IceGrid/Scanner.l | 2 +- cpp/src/IceGrid/ServerCache.cpp | 2 +- cpp/src/IceGrid/ServerI.cpp | 18 ++-- cpp/src/IceGrid/Util.cpp | 20 ++-- cpp/src/IceGrid/Util.h | 2 +- cpp/src/IceGridLib/IceGrid.rc | 2 +- .../IceLocatorDiscovery.rc | 2 +- cpp/src/IceStorm/Admin.cpp | 11 +- cpp/src/IceStorm/IceStormAdmin.rc | 2 +- cpp/src/IceStorm/IceStormDB.cpp | 29 +++-- cpp/src/IceStorm/IceStormDB.rc | 2 +- cpp/src/IceStorm/IceStormService.rc | 2 +- cpp/src/IceStorm/Instance.h | 2 +- cpp/src/IceStorm/Parser.cpp | 5 +- cpp/src/IceStorm/Scanner.cpp | 2 +- cpp/src/IceStorm/Scanner.l | 2 +- cpp/src/IceStormLib/IceStorm.rc | 2 +- cpp/src/IceUtil/Makefile.mk | 13 ++- .../IceUtil/msbuild/iceutil/iceutil.vcxproj | 32 +++--- .../msbuild/iceutil/iceutil.vcxproj.filters | 32 +++--- cpp/src/IceXML/IceXML.rc | 2 +- cpp/src/IceXML/Parser.cpp | 4 +- cpp/src/Slice/FileTracker.cpp | 10 +- cpp/src/Slice/Preprocessor.cpp | 17 ++- cpp/src/Slice/Scanner.cpp | 2 +- cpp/src/Slice/Scanner.l | 2 +- cpp/src/Slice/SliceUtil.cpp | 16 +-- cpp/src/Slice/StringLiteralUtil.cpp | 1 - cpp/src/Slice/Util.h | 4 +- cpp/src/ice2slice/Gen.cpp | 4 +- cpp/src/ice2slice/Gen.h | 6 +- cpp/src/ice2slice/Ice2Slice.rc | 2 +- cpp/src/ice2slice/Main.cpp | 18 ++-- cpp/src/icegriddb/IceGridDB.cpp | 33 +++--- cpp/src/icegriddb/IceGridDB.rc | 2 +- .../iceserviceinstall/IceServiceInstall.rc | 2 +- cpp/src/iceserviceinstall/Install.cpp | 11 +- .../iceserviceinstall/ServiceInstaller.cpp | 12 +-- cpp/src/slice2cpp/CPlusPlusUtil.cpp | 6 +- cpp/src/slice2cpp/CPlusPlusUtil.h | 21 ++-- cpp/src/slice2cpp/Gen.cpp | 20 ++-- cpp/src/slice2cpp/Gen.h | 38 +++---- cpp/src/slice2cpp/Main.cpp | 30 +++--- cpp/src/slice2cpp/Slice2Cpp.rc | 2 +- cpp/src/slice2cs/CsUtil.cpp | 2 +- cpp/src/slice2cs/CsUtil.h | 12 +-- cpp/src/slice2cs/Gen.cpp | 17 ++- cpp/src/slice2cs/Gen.h | 20 ++-- cpp/src/slice2cs/Main.cpp | 20 ++-- cpp/src/slice2cs/Slice2Cs.rc | 2 +- cpp/src/slice2java/Gen.cpp | 2 +- cpp/src/slice2java/Gen.h | 64 +++++------ cpp/src/slice2java/JavaUtil.cpp | 12 +-- cpp/src/slice2java/JavaUtil.h | 14 +-- cpp/src/slice2java/Main.cpp | 22 ++-- cpp/src/slice2java/Slice2Java.rc | 2 +- cpp/src/slice2js/Gen.cpp | 22 ++-- cpp/src/slice2js/Gen.h | 18 ++-- cpp/src/slice2js/JsUtil.cpp | 1 - cpp/src/slice2js/JsUtil.h | 6 +- cpp/src/slice2js/Main.cpp | 20 ++-- cpp/src/slice2js/Slice2Js.rc | 2 +- cpp/src/slice2matlab/Main.cpp | 87 ++++++++------- cpp/src/slice2matlab/Slice2Matlab.rc | 2 +- cpp/src/slice2php/Main.cpp | 28 ++--- cpp/src/slice2php/Slice2PHP.rc | 2 +- cpp/src/slice2py/Main.cpp | 4 +- cpp/src/slice2py/Python.cpp | 54 +++++----- cpp/src/slice2py/PythonUtil.cpp | 5 +- cpp/src/slice2py/PythonUtil.h | 6 +- cpp/src/slice2py/Slice2Py.rc | 2 +- cpp/src/slice2rb/Main.cpp | 4 +- cpp/src/slice2rb/Ruby.cpp | 22 ++-- cpp/src/slice2rb/RubyUtil.cpp | 8 +- cpp/src/slice2rb/RubyUtil.h | 6 +- cpp/src/slice2rb/Slice2Rb.rc | 2 +- cpp/src/slice2swift/Gen.cpp | 16 +-- cpp/src/slice2swift/Gen.h | 26 ++--- cpp/src/slice2swift/Main.cpp | 20 ++-- cpp/src/slice2swift/Slice2Swift.rc | 2 +- cpp/src/slice2swift/SwiftUtil.cpp | 55 +++++----- cpp/src/slice2swift/SwiftUtil.h | 50 ++++----- cpp/test/Ice/ami/AllTests.cpp | 4 +- cpp/test/Ice/background/AllTests.cpp | 4 +- cpp/test/Ice/binding/AllTests.cpp | 22 ++-- cpp/test/Ice/executor/AllTests.cpp | 4 +- cpp/test/Ice/hash/Client.cpp | 6 +- cpp/test/Ice/hold/AllTests.cpp | 6 +- cpp/test/Ice/invoke/Server.cpp | 6 +- cpp/test/Ice/optional/TestAMDI.cpp | 1 - cpp/test/Ice/optional/TestI.cpp | 1 - cpp/test/IceGrid/deployer/Server.cpp | 2 +- cpp/test/IceStorm/federation2/Publisher.cpp | 6 +- cpp/test/IceStorm/rep1/Publisher.cpp | 6 +- cpp/test/IceStorm/rep1/Sub.cpp | 8 +- cpp/test/IceStorm/rep1/Subscriber.cpp | 8 +- cpp/test/IceStorm/stress/Publisher.cpp | 8 +- cpp/test/IceStorm/stress/Subscriber.cpp | 16 +-- cpp/test/IceUtil/stacktrace/Client.cpp | 8 +- cpp/test/IceUtil/timer/Client.cpp | 4 +- cpp/test/IceUtil/uuid/Client.cpp | 6 +- matlab/src/ice.rc | 2 +- php/src/Communicator.cpp | 8 +- php/src/Types.cpp | 28 ++--- php/src/Types.h | 24 ++--- python/modules/IcePy/Communicator.cpp | 2 +- python/modules/IcePy/IcePy.rc | 2 +- python/modules/IcePy/PropertiesAdmin.cpp | 2 +- python/modules/IcePy/Proxy.cpp | 2 +- python/modules/IcePy/Slice.cpp | 26 ++--- python/modules/IcePy/Types.cpp | 32 +++--- python/modules/IcePy/Types.h | 28 ++--- python/modules/IcePy/Util.cpp | 2 +- ruby/src/IceRuby/Proxy.cpp | 2 +- ruby/src/IceRuby/Slice.cpp | 22 ++-- ruby/src/IceRuby/Types.cpp | 34 +++--- ruby/src/IceRuby/Types.h | 26 ++--- 207 files changed, 1095 insertions(+), 1162 deletions(-) rename cpp/src/{IceUtil => Ice}/ConsoleUtil.cpp (85%) rename cpp/src/{IceUtil => Ice}/ConsoleUtil.h (94%) rename cpp/src/{IceUtil => Ice}/DisableWarnings.h (93%) rename cpp/src/{IceUtil => Ice}/FileUtil.cpp (82%) rename cpp/src/{IceUtil => Ice}/FileUtil.h (97%) rename cpp/src/{IceUtil => Ice}/Options.cpp (92%) rename cpp/src/{IceUtil => Ice}/Options.h (97%) rename cpp/src/{IceUtil => Ice}/OutputUtil.cpp (73%) rename cpp/src/{IceUtil => Ice}/OutputUtil.h (98%) rename cpp/src/{IceUtil => Ice}/Random.cpp (87%) rename cpp/src/{IceUtil => Ice}/Random.h (84%) rename cpp/src/{IceUtil => Ice}/ResourceConfig.h (88%) rename cpp/src/{IceUtil => Ice}/ScannerConfig.h (94%) rename cpp/src/{IceUtil/Exception.h => Ice/StackTrace.h} (77%) rename cpp/src/{IceUtil => Ice}/UndefSysMacros.h (90%) diff --git a/cpp/doxygen/examples/Ice/SSL/SecureTransportClientAuthenticationOptions.cpp b/cpp/doxygen/examples/Ice/SSL/SecureTransportClientAuthenticationOptions.cpp index 3454d9064d8..020ae40490b 100644 --- a/cpp/doxygen/examples/Ice/SSL/SecureTransportClientAuthenticationOptions.cpp +++ b/cpp/doxygen/examples/Ice/SSL/SecureTransportClientAuthenticationOptions.cpp @@ -4,7 +4,7 @@ #include // Disable deprecation warnings from SecureTransport APIs -#include "../../src/IceUtil/DisableWarnings.h" +#include "../../src/Ice/DisableWarnings.h" #if defined(ICE_USE_SECURE_TRANSPORT) diff --git a/cpp/doxygen/examples/Ice/SSL/SecureTransportServerAuthenticationOptions.cpp b/cpp/doxygen/examples/Ice/SSL/SecureTransportServerAuthenticationOptions.cpp index af98afb0ef0..09b3fa3c1cd 100644 --- a/cpp/doxygen/examples/Ice/SSL/SecureTransportServerAuthenticationOptions.cpp +++ b/cpp/doxygen/examples/Ice/SSL/SecureTransportServerAuthenticationOptions.cpp @@ -4,7 +4,7 @@ #include // Disable deprecation warnings from SecureTransport APIs -#include "../../src/IceUtil/DisableWarnings.h" +#include "../../src/Ice/DisableWarnings.h" #if defined(ICE_USE_SECURE_TRANSPORT) void diff --git a/cpp/src/Glacier2/Glacier2Router.cpp b/cpp/src/Glacier2/Glacier2Router.cpp index 0bb18c87798..4dfa35fd52c 100644 --- a/cpp/src/Glacier2/Glacier2Router.cpp +++ b/cpp/src/Glacier2/Glacier2Router.cpp @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" #include "Glacier2/NullPermissionsVerifier.h" #include "Glacier2/Session.h" #include "Ice/Ice.h" @@ -15,7 +15,6 @@ using namespace std; using namespace Ice; using namespace Glacier2; using namespace IceInternal; -using namespace IceUtilInternal; namespace { @@ -92,7 +91,7 @@ RouterService::start(int argc, char* argv[], int& status) { bool nowarn; - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); opts.addOpt("", "nowarn"); @@ -102,7 +101,7 @@ RouterService::start(int argc, char* argv[], int& status) { args = opts.parse(argc, argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { error(e.reason); usage(argv[0]); diff --git a/cpp/src/Glacier2/Glacier2Router.rc b/cpp/src/Glacier2/Glacier2Router.rc index 03e7628c855..61124690bea 100644 --- a/cpp/src/Glacier2/Glacier2Router.rc +++ b/cpp/src/Glacier2/Glacier2Router.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "glacier2router\0" #define ICE_ORIGINALFILENAME "glacier2router.exe\0" diff --git a/cpp/src/Glacier2/ProxyVerifier.cpp b/cpp/src/Glacier2/ProxyVerifier.cpp index e3dbfaf01a1..a9be40815ed 100644 --- a/cpp/src/Glacier2/ProxyVerifier.cpp +++ b/cpp/src/Glacier2/ProxyVerifier.cpp @@ -3,7 +3,7 @@ // #include "ProxyVerifier.h" -#include "../IceUtil/ConsoleUtil.h" +#include "../Ice/ConsoleUtil.h" #include #include @@ -12,7 +12,6 @@ using namespace std; using namespace Ice; using namespace IceInternal; -using namespace IceUtilInternal; // // TODO: Some of the address matching helper classes can probably be diff --git a/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifier.rc b/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifier.rc index 1afdc4531f2..6368f30f85c 100644 --- a/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifier.rc +++ b/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifier.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME ICE_LIBNAME("glacier2cryptpermissionsverifier") "\0" #define ICE_ORIGINALFILENAME ICE_LIBNAME("glacier2cryptpermissionsverifier") ".dll\0" diff --git a/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifierI.cpp b/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifierI.cpp index 3e66a7acb52..48c50e630f2 100644 --- a/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifierI.cpp +++ b/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifierI.cpp @@ -5,7 +5,7 @@ #include "Glacier2/PermissionsVerifier.h" #include "Ice/Ice.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "Ice/StringUtil.h" #include @@ -25,7 +25,7 @@ #endif // Disable deprecation warnings from CommonCrypto APIs -#include "../IceUtil/DisableWarnings.h" +#include "../Ice/DisableWarnings.h" using namespace std; using namespace Ice; @@ -68,7 +68,7 @@ namespace map retrievePasswordMap(const string& file) { - ifstream passwordFile(IceUtilInternal::streamFilename(file).c_str()); + ifstream passwordFile(IceInternal::streamFilename(file).c_str()); if (!passwordFile) { string err = IceInternal::lastErrorToString(); diff --git a/cpp/src/Glacier2Lib/Glacier2.rc b/cpp/src/Glacier2Lib/Glacier2.rc index 2ae0ea4713d..ce93d4edd50 100644 --- a/cpp/src/Glacier2Lib/Glacier2.rc +++ b/cpp/src/Glacier2Lib/Glacier2.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME ICE_LIBNAME("glacier2") "\0" #define ICE_ORIGINALFILENAME ICE_LIBNAME("glacier2") ".dll\0" diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 292d510dbb8..2f8a22ec833 100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -3,7 +3,6 @@ // #include "ConnectionFactory.h" -#include "../IceUtil/Random.h" #include "Acceptor.h" #include "CommunicatorFlushBatchAsync.h" #include "ConnectionI.h" @@ -16,6 +15,7 @@ #include "Ice/Properties.h" #include "Instance.h" #include "ObjectAdapterI.h" // For getThreadPool(). +#include "Random.h" #include "Reference.h" #include "RouterInfo.h" #include "ThreadPool.h" diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp index c09e822df20..41944624748 100644 --- a/cpp/src/Ice/ConnectionI.cpp +++ b/cpp/src/Ice/ConnectionI.cpp @@ -3,10 +3,10 @@ // #include "ConnectionI.h" -#include "../IceUtil/DisableWarnings.h" #include "BatchRequestQueue.h" #include "CheckIdentity.h" #include "DefaultsAndOverrides.h" +#include "DisableWarnings.h" #include "Endian.h" #include "EndpointI.h" #include "Ice/IncomingRequest.h" diff --git a/cpp/src/IceUtil/ConsoleUtil.cpp b/cpp/src/Ice/ConsoleUtil.cpp similarity index 85% rename from cpp/src/IceUtil/ConsoleUtil.cpp rename to cpp/src/Ice/ConsoleUtil.cpp index 40c8661c5e9..84f44c33a8a 100644 --- a/cpp/src/IceUtil/ConsoleUtil.cpp +++ b/cpp/src/Ice/ConsoleUtil.cpp @@ -12,7 +12,7 @@ #include #include -using namespace IceUtilInternal; +using namespace IceInternal; using namespace std; #if defined(_WIN32) @@ -24,7 +24,7 @@ namespace } const ConsoleUtil& -IceUtilInternal::getConsoleUtil() +IceInternal::getConsoleUtil() { lock_guard sync(consoleMutex); if (consoleUtil == 0) @@ -34,8 +34,8 @@ IceUtilInternal::getConsoleUtil() return *consoleUtil; } -ConsoleOut IceUtilInternal::consoleOut; -ConsoleErr IceUtilInternal::consoleErr; +ConsoleOut IceInternal::consoleOut; +ConsoleErr IceInternal::consoleErr; ConsoleUtil::ConsoleUtil() : _converter(Ice::getProcessStringConverter()), @@ -91,7 +91,7 @@ ConsoleUtil::error(const string& message) const } ConsoleOut& -IceUtilInternal::endl(ConsoleOut& out) +IceInternal::endl(ConsoleOut& out) { fprintf_s(stdout, "\n"); fflush(stdout); @@ -99,7 +99,7 @@ IceUtilInternal::endl(ConsoleOut& out) } ConsoleOut& -IceUtilInternal::flush(ConsoleOut& out) +IceInternal::flush(ConsoleOut& out) { fflush(stdout); return out; @@ -113,7 +113,7 @@ ConsoleOut::operator<<(ConsoleOut& (*pf)(ConsoleOut&)) } ConsoleErr& -IceUtilInternal::endl(ConsoleErr& err) +IceInternal::endl(ConsoleErr& err) { fprintf_s(stderr, "\n"); fflush(stderr); @@ -121,7 +121,7 @@ IceUtilInternal::endl(ConsoleErr& err) } ConsoleErr& -IceUtilInternal::flush(ConsoleErr& err) +IceInternal::flush(ConsoleErr& err) { fflush(stderr); return err; @@ -134,6 +134,6 @@ ConsoleErr::operator<<(ConsoleErr& (*pf)(ConsoleErr&)) return *this; } #else -std::ostream& IceUtilInternal::consoleOut = cout; -std::ostream& IceUtilInternal::consoleErr = cerr; +std::ostream& IceInternal::consoleOut = cout; +std::ostream& IceInternal::consoleErr = cerr; #endif diff --git a/cpp/src/IceUtil/ConsoleUtil.h b/cpp/src/Ice/ConsoleUtil.h similarity index 94% rename from cpp/src/IceUtil/ConsoleUtil.h rename to cpp/src/Ice/ConsoleUtil.h index f247756a513..5e229b32576 100644 --- a/cpp/src/IceUtil/ConsoleUtil.h +++ b/cpp/src/Ice/ConsoleUtil.h @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#ifndef ICE_UTIL_CONSOLE_UTIL_H -#define ICE_UTIL_CONSOLE_UTIL_H +#ifndef ICE_CONSOLE_UTIL_H +#define ICE_CONSOLE_UTIL_H #include "Ice/Config.h" #include "Ice/StringConverter.h" @@ -11,7 +11,7 @@ #include #include -namespace IceUtilInternal +namespace IceInternal { #if defined(_WIN32) diff --git a/cpp/src/IceUtil/DisableWarnings.h b/cpp/src/Ice/DisableWarnings.h similarity index 93% rename from cpp/src/IceUtil/DisableWarnings.h rename to cpp/src/Ice/DisableWarnings.h index 905aba6be7d..0e1fb2c34c8 100644 --- a/cpp/src/IceUtil/DisableWarnings.h +++ b/cpp/src/Ice/DisableWarnings.h @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#ifndef ICE_UTIL_DISABLEWARNINGS_H -#define ICE_UTIL_DISABLEWARNINGS_H +#ifndef ICE_DISABLEWARNINGS_H +#define ICE_DISABLEWARNINGS_H // // This header file disables various compiler warnings that we don't want. diff --git a/cpp/src/IceUtil/FileUtil.cpp b/cpp/src/Ice/FileUtil.cpp similarity index 82% rename from cpp/src/IceUtil/FileUtil.cpp rename to cpp/src/Ice/FileUtil.cpp index 6fb91b00dfe..c74f1dd6506 100644 --- a/cpp/src/IceUtil/FileUtil.cpp +++ b/cpp/src/Ice/FileUtil.cpp @@ -22,7 +22,7 @@ using namespace std; -namespace IceUtilInternal +namespace IceInternal { #ifdef _WIN32 const string pathsep = ";"; @@ -37,7 +37,7 @@ namespace IceUtilInternal // Determine if path is an absolute path // bool -IceUtilInternal::isAbsolutePath(const string& path) +IceInternal::isAbsolutePath(const string& path) { size_t i = 0; size_t size = path.size(); @@ -78,10 +78,10 @@ IceUtilInternal::isAbsolutePath(const string& path) // Determine if a directory exists. // bool -IceUtilInternal::directoryExists(const string& path) +IceInternal::directoryExists(const string& path) { - IceUtilInternal::structstat st; - if (IceUtilInternal::stat(path, &st) != 0 || !S_ISDIR(st.st_mode)) + IceInternal::structstat st; + if (IceInternal::stat(path, &st) != 0 || !S_ISDIR(st.st_mode)) { return false; } @@ -92,7 +92,7 @@ IceUtilInternal::directoryExists(const string& path) // Determine if a directory exists and is empty. // bool -IceUtilInternal::isEmptyDirectory(const string& path) +IceInternal::isEmptyDirectory(const string& path) { #ifdef _WIN32 return PathIsDirectoryEmptyW(stringToWstring(path, Ice::getProcessStringConverter()).c_str()); @@ -125,10 +125,10 @@ IceUtilInternal::isEmptyDirectory(const string& path) // Determine if a regular file exists. // bool -IceUtilInternal::fileExists(const string& path) +IceInternal::fileExists(const string& path) { - IceUtilInternal::structstat st; - if (IceUtilInternal::stat(path, &st) != 0 || !S_ISREG(st.st_mode)) + IceInternal::structstat st; + if (IceInternal::stat(path, &st) != 0 || !S_ISREG(st.st_mode)) { return false; } @@ -136,7 +136,7 @@ IceUtilInternal::fileExists(const string& path) } FILE* -IceUtilInternal::freopen(const std::string& path, const std::string& mode, FILE* stream) +IceInternal::freopen(const std::string& path, const std::string& mode, FILE* stream) { #ifdef _LARGEFILE64_SOURCE return freopen64(path.c_str(), mode.c_str(), stream); @@ -160,7 +160,7 @@ IceUtilInternal::freopen(const std::string& path, const std::string& mode, FILE* // Stat // int -IceUtilInternal::stat(const string& path, structstat* buffer) +IceInternal::stat(const string& path, structstat* buffer) { // // Don't need to use a wide string converter, the wide string is directly passed @@ -170,13 +170,13 @@ IceUtilInternal::stat(const string& path, structstat* buffer) } int -IceUtilInternal::remove(const string& path) +IceInternal::remove(const string& path) { return ::_wremove(stringToWstring(path, Ice::getProcessStringConverter()).c_str()); } int -IceUtilInternal::rename(const string& from, const string& to) +IceInternal::rename(const string& from, const string& to) { // // Don't need to use a wide string converter, the wide strings are directly passed @@ -187,7 +187,7 @@ IceUtilInternal::rename(const string& from, const string& to) } int -IceUtilInternal::rmdir(const string& path) +IceInternal::rmdir(const string& path) { // // Don't need to use a wide string converter, the wide string is directly passed @@ -197,7 +197,7 @@ IceUtilInternal::rmdir(const string& path) } int -IceUtilInternal::mkdir(const string& path, int) +IceInternal::mkdir(const string& path, int) { // // Don't need to use a wide string converter, the wide string is directly passed @@ -207,7 +207,7 @@ IceUtilInternal::mkdir(const string& path, int) } FILE* -IceUtilInternal::fopen(const string& path, const string& mode) +IceInternal::fopen(const string& path, const string& mode) { // // Don't need to use a wide string converter, the wide strings are directly passed @@ -218,7 +218,7 @@ IceUtilInternal::fopen(const string& path, const string& mode) } int -IceUtilInternal::open(const string& path, int flags) +IceInternal::open(const string& path, int flags) { // // Don't need to use a wide string converter, the wide string is directly passed @@ -235,7 +235,7 @@ IceUtilInternal::open(const string& path, int flags) } int -IceUtilInternal::getcwd(string& cwd) +IceInternal::getcwd(string& cwd) { // // Don't need to use a wide string converter, the wide string come @@ -251,7 +251,7 @@ IceUtilInternal::getcwd(string& cwd) } int -IceUtilInternal::unlink(const string& path) +IceInternal::unlink(const string& path) { // // Don't need to use a wide string converter, the wide string is directly passed @@ -261,7 +261,7 @@ IceUtilInternal::unlink(const string& path) } int -IceUtilInternal::close(int fd) +IceInternal::close(int fd) { # ifdef _WIN32 return _close(fd); @@ -270,7 +270,7 @@ IceUtilInternal::close(int fd) # endif } -IceUtilInternal::FileLock::FileLock(const std::string& path) : _fd(INVALID_HANDLE_VALUE), _path(path) +IceInternal::FileLock::FileLock(const std::string& path) : _fd(INVALID_HANDLE_VALUE), _path(path) { // // Don't need to use a wide string converter, the wide string is directly passed @@ -314,7 +314,7 @@ IceUtilInternal::FileLock::FileLock(const std::string& path) : _fd(INVALID_HANDL // } -IceUtilInternal::FileLock::~FileLock() +IceInternal::FileLock::~FileLock() { assert(_fd != INVALID_HANDLE_VALUE); CloseHandle(_fd); @@ -322,7 +322,7 @@ IceUtilInternal::FileLock::~FileLock() } wstring -IceUtilInternal::streamFilename(const string& filename) +IceInternal::streamFilename(const string& filename) { return stringToWstring(filename, Ice::getProcessStringConverter()); } @@ -333,43 +333,43 @@ IceUtilInternal::streamFilename(const string& filename) // Stat // int -IceUtilInternal::stat(const string& path, structstat* buffer) +IceInternal::stat(const string& path, structstat* buffer) { return ::stat(path.c_str(), buffer); } int -IceUtilInternal::remove(const string& path) +IceInternal::remove(const string& path) { return ::remove(path.c_str()); } int -IceUtilInternal::rename(const string& from, const string& to) +IceInternal::rename(const string& from, const string& to) { return ::rename(from.c_str(), to.c_str()); } int -IceUtilInternal::rmdir(const string& path) +IceInternal::rmdir(const string& path) { return ::rmdir(path.c_str()); } int -IceUtilInternal::mkdir(const string& path, int perm) +IceInternal::mkdir(const string& path, int perm) { return ::mkdir(path.c_str(), static_cast(perm)); } FILE* -IceUtilInternal::fopen(const string& path, const string& mode) +IceInternal::fopen(const string& path, const string& mode) { return ::fopen(path.c_str(), mode.c_str()); } int -IceUtilInternal::open(const string& path, int flags) +IceInternal::open(const string& path, int flags) { if (flags & O_CREAT) { @@ -383,7 +383,7 @@ IceUtilInternal::open(const string& path, int flags) } int -IceUtilInternal::getcwd(string& cwd) +IceInternal::getcwd(string& cwd) { char cwdbuf[PATH_MAX]; if (::getcwd(cwdbuf, PATH_MAX) == nullptr) @@ -395,18 +395,18 @@ IceUtilInternal::getcwd(string& cwd) } int -IceUtilInternal::unlink(const string& path) +IceInternal::unlink(const string& path) { return ::unlink(path.c_str()); } int -IceUtilInternal::close(int fd) +IceInternal::close(int fd) { return ::close(fd); } -IceUtilInternal::FileLock::FileLock(const std::string& path) : _fd(-1), _path(path) +IceInternal::FileLock::FileLock(const std::string& path) : _fd(-1), _path(path) { _fd = ::open(path.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); if (_fd < 0) @@ -452,7 +452,7 @@ IceUtilInternal::FileLock::FileLock(const std::string& path) : _fd(-1), _path(pa } } -IceUtilInternal::FileLock::~FileLock() +IceInternal::FileLock::~FileLock() { assert(_fd > -1); ::close(_fd); diff --git a/cpp/src/IceUtil/FileUtil.h b/cpp/src/Ice/FileUtil.h similarity index 97% rename from cpp/src/IceUtil/FileUtil.h rename to cpp/src/Ice/FileUtil.h index fdf72c2d179..67f40ea2f66 100644 --- a/cpp/src/IceUtil/FileUtil.h +++ b/cpp/src/Ice/FileUtil.h @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#ifndef ICE_UTIL_FILE_UTIL_H -#define ICE_UTIL_FILE_UTIL_H +#ifndef ICE_FILE_UTIL_H +#define ICE_FILE_UTIL_H #include "Ice/Config.h" @@ -19,7 +19,7 @@ #include #include -namespace IceUtilInternal +namespace IceInternal { extern const ICE_API std::string pathsep; extern const ICE_API std::string separator; diff --git a/cpp/src/Ice/Ice.rc b/cpp/src/Ice/Ice.rc index ebdc098046b..c5c728a2fae 100644 --- a/cpp/src/Ice/Ice.rc +++ b/cpp/src/Ice/Ice.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "ResourceConfig.h" #define ICE_INTERNALNAME ICE_LIBNAME("ice") "\0" #define ICE_ORIGINALFILENAME ICE_LIBNAME("ice") ".dll\0" diff --git a/cpp/src/Ice/IconvStringConverter.cpp b/cpp/src/Ice/IconvStringConverter.cpp index e667a12f22a..59a15b69da5 100644 --- a/cpp/src/Ice/IconvStringConverter.cpp +++ b/cpp/src/Ice/IconvStringConverter.cpp @@ -8,7 +8,6 @@ using namespace std; using namespace Ice; -using namespace Ice; IconvInitializationException::IconvInitializationException(const char* file, int line, string reason) noexcept : LocalException(file, line), diff --git a/cpp/src/Ice/InputStream.cpp b/cpp/src/Ice/InputStream.cpp index cfabc639e68..551258afca4 100644 --- a/cpp/src/Ice/InputStream.cpp +++ b/cpp/src/Ice/InputStream.cpp @@ -3,8 +3,8 @@ // #include "Ice/InputStream.h" -#include "../IceUtil/DisableWarnings.h" #include "DefaultsAndOverrides.h" +#include "DisableWarnings.h" #include "Ice/LocalException.h" #include "Ice/LoggerUtil.h" #include "Ice/Object.h" diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index 0868498560d..31d0d7a7580 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -3,13 +3,13 @@ // #include "Instance.h" -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/DisableWarnings.h" -#include "../IceUtil/FileUtil.h" #include "CheckIdentity.h" #include "ConnectionFactory.h" +#include "ConsoleUtil.h" #include "DefaultsAndOverrides.h" +#include "DisableWarnings.h" #include "EndpointFactoryManager.h" +#include "FileUtil.h" #include "IPEndpointI.h" // For EndpointHostResolver #include "Ice/Communicator.h" #include "Ice/Exception.h" @@ -76,9 +76,8 @@ using namespace std; using namespace Ice; using namespace IceInternal; -using namespace IceUtilInternal; -namespace IceUtilInternal +namespace IceInternal { extern bool nullHandleAbort; extern bool printStackTraces; @@ -936,7 +935,7 @@ IceInternal::Instance::initialize(const Ice::CommunicatorPtr& communicator) if (stdOutFilename != "") { - FILE* file = IceUtilInternal::freopen(stdOutFilename, "a", stdout); + FILE* file = IceInternal::freopen(stdOutFilename, "a", stdout); if (file == 0) { throw FileException(__FILE__, __LINE__, stdOutFilename); @@ -945,7 +944,7 @@ IceInternal::Instance::initialize(const Ice::CommunicatorPtr& communicator) if (stdErrFilename != "") { - FILE* file = IceUtilInternal::freopen(stdErrFilename, "a", stderr); + FILE* file = IceInternal::freopen(stdErrFilename, "a", stderr); if (file == 0) { throw FileException(__FILE__, __LINE__, stdErrFilename); @@ -955,12 +954,12 @@ IceInternal::Instance::initialize(const Ice::CommunicatorPtr& communicator) #ifdef NDEBUG if (_initData.properties->getIcePropertyAsInt("Ice.PrintStackTraces") > 0) { - IceUtilInternal::printStackTraces = true; + IceInternal::printStackTraces = true; } #else if (_initData.properties->getPropertyAsIntWithDefault("Ice.PrintStackTraces", 1) == 0) { - IceUtilInternal::printStackTraces = false; + IceInternal::printStackTraces = false; } #endif diff --git a/cpp/src/Ice/LocatorInfo.cpp b/cpp/src/Ice/LocatorInfo.cpp index ff2265a5049..efb3cdcb962 100644 --- a/cpp/src/Ice/LocatorInfo.cpp +++ b/cpp/src/Ice/LocatorInfo.cpp @@ -3,7 +3,7 @@ // #include "LocatorInfo.h" -#include "../IceUtil/DisableWarnings.h" +#include "DisableWarnings.h" #include "EndpointI.h" #include "Ice/Comparable.h" #include "Ice/LocalException.h" diff --git a/cpp/src/Ice/LoggerI.cpp b/cpp/src/Ice/LoggerI.cpp index ad421df7147..2a3a66bd1c1 100644 --- a/cpp/src/Ice/LoggerI.cpp +++ b/cpp/src/Ice/LoggerI.cpp @@ -3,8 +3,8 @@ // #include "LoggerI.h" -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/FileUtil.h" +#include "ConsoleUtil.h" +#include "FileUtil.h" #include "Ice/LocalException.h" #include "Ice/StringUtil.h" #include "TimeUtil.h" @@ -16,7 +16,6 @@ using namespace std; using namespace Ice; using namespace IceInternal; -using namespace IceUtilInternal; namespace { @@ -40,7 +39,7 @@ Ice::LoggerI::LoggerI(const string& prefix, const string& file, bool convert, si if (!file.empty()) { _file = file; - _out.open(IceUtilInternal::streamFilename(file).c_str(), fstream::out | fstream::app); + _out.open(IceInternal::streamFilename(file).c_str(), fstream::out | fstream::app); if (!_out.is_open()) { throw InitializationException(__FILE__, __LINE__, "FileLogger: cannot open " + _file); @@ -162,7 +161,7 @@ Ice::LoggerI::write(const string& message, bool indent) { oss << "." << ext; } - if (IceUtilInternal::fileExists(oss.str())) + if (IceInternal::fileExists(oss.str())) { id++; continue; @@ -171,9 +170,9 @@ Ice::LoggerI::write(const string& message, bool indent) break; } - int err = IceUtilInternal::rename(_file, archive); + int err = IceInternal::rename(_file, archive); - _out.open(IceUtilInternal::streamFilename(_file).c_str(), fstream::out | fstream::app); + _out.open(IceInternal::streamFilename(_file).c_str(), fstream::out | fstream::app); if (err) { diff --git a/cpp/src/Ice/LoggerUtil.cpp b/cpp/src/Ice/LoggerUtil.cpp index e89fce72dcc..f8a13d1dc3c 100644 --- a/cpp/src/Ice/LoggerUtil.cpp +++ b/cpp/src/Ice/LoggerUtil.cpp @@ -11,7 +11,7 @@ using namespace std; -namespace IceUtilInternal +namespace IceInternal { extern bool printStackTraces; } @@ -38,7 +38,7 @@ Ice::operator<<(Ice::LoggerOutputBase& out, ios_base& (*val)(ios_base&)) Ice::LoggerOutputBase& Ice::loggerInsert(Ice::LoggerOutputBase& out, const Ice::Exception& ex) { - if (IceUtilInternal::printStackTraces) + if (IceInternal::printStackTraces) { out._stream() << ex.what() << '\n' << ex.ice_stackTrace(); } diff --git a/cpp/src/Ice/Makefile.mk b/cpp/src/Ice/Makefile.mk index fe785bbfdf0..4fffd79a01c 100644 --- a/cpp/src/Ice/Makefile.mk +++ b/cpp/src/Ice/Makefile.mk @@ -10,12 +10,11 @@ Ice_ldflags = $(iconv_ldflags) Ice_sliceflags := --include-dir Ice Ice_libs := bz2 -Ice_extra_sources := $(wildcard src/IceUtil/*.cpp) ifeq ($(os),Darwin) -Ice_extra_sources += $(filter-out src/Ice/SSL/OpenSSL%.cpp src/Ice/SSL/Schannel%.cpp, $(wildcard src/Ice/SSL/*.cpp)) +Ice_extra_sources := $(filter-out src/Ice/SSL/OpenSSL%.cpp src/Ice/SSL/Schannel%.cpp, $(wildcard src/Ice/SSL/*.cpp)) else -Ice_extra_sources += $(filter-out src/Ice/SSL/SecureTransport%.cpp src/Ice/SSL/Schannel%.cpp, $(wildcard src/Ice/SSL/*.cpp)) +Ice_extra_sources := $(filter-out src/Ice/SSL/SecureTransport%.cpp src/Ice/SSL/Schannel%.cpp, $(wildcard src/Ice/SSL/*.cpp)) endif Ice_excludes = src/Ice/DLLMain.cpp diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index 21048ad56ee..9854c3e1a9e 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -12,8 +12,7 @@ # include #endif -#include "../IceUtil/DisableWarnings.h" -#include "../IceUtil/Random.h" +#include "DisableWarnings.h" #include "Ice/Buffer.h" #include "Ice/LocalException.h" #include "Ice/LoggerUtil.h" // For setTcpBufSize @@ -23,6 +22,7 @@ #include "Network.h" #include "NetworkProxy.h" #include "ProtocolInstance.h" // For setTcpBufSize +#include "Random.h" #include #include @@ -70,7 +70,7 @@ namespace { if (selType == Ice::EndpointSelectionType::Random) { - IceUtilInternal::shuffle(addrs.begin(), addrs.end()); + IceInternal::shuffle(addrs.begin(), addrs.end()); } if (protocol == EnableBoth) diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp index d9bac3b6d82..b7dc56502b2 100644 --- a/cpp/src/Ice/ObjectAdapterI.cpp +++ b/cpp/src/Ice/ObjectAdapterI.cpp @@ -3,9 +3,9 @@ // #include "ObjectAdapterI.h" -#include "../IceUtil/ConsoleUtil.h" #include "CheckIdentity.h" #include "ConnectionFactory.h" +#include "ConsoleUtil.h" #include "DefaultsAndOverrides.h" #include "EndpointFactoryManager.h" #include "EndpointI.h" @@ -42,7 +42,6 @@ using namespace std; using namespace Ice; using namespace IceInternal; -using namespace IceUtilInternal; namespace { diff --git a/cpp/src/IceUtil/Options.cpp b/cpp/src/Ice/Options.cpp similarity index 92% rename from cpp/src/IceUtil/Options.cpp rename to cpp/src/Ice/Options.cpp index 7014c7e5fea..5ccdb10b135 100644 --- a/cpp/src/IceUtil/Options.cpp +++ b/cpp/src/Ice/Options.cpp @@ -12,20 +12,20 @@ using namespace std; -IceUtilInternal::APIException::APIException(const char* file, int line, string r) noexcept +IceInternal::APIException::APIException(const char* file, int line, string r) noexcept : Ice::LocalException(file, line), reason(std::move(r)) { } const char* -IceUtilInternal::APIException::ice_id() const noexcept +IceInternal::APIException::ice_id() const noexcept { - return "::IceUtilInternal::APIException"; + return "::IceInternal::APIException"; } void -IceUtilInternal::APIException::ice_print(ostream& out) const +IceInternal::APIException::ice_print(ostream& out) const { Exception::ice_print(out); if (!reason.empty()) @@ -35,26 +35,26 @@ IceUtilInternal::APIException::ice_print(ostream& out) const } ostream& -IceUtilInternal::operator<<(ostream& out, const IceUtilInternal::APIException& ex) +IceInternal::operator<<(ostream& out, const IceInternal::APIException& ex) { ex.ice_print(out); return out; } -IceUtilInternal::BadOptException::BadOptException(const char* file, int line, string r) noexcept +IceInternal::BadOptException::BadOptException(const char* file, int line, string r) noexcept : Ice::LocalException(file, line), reason(std::move(r)) { } const char* -IceUtilInternal::BadOptException::ice_id() const noexcept +IceInternal::BadOptException::ice_id() const noexcept { - return "::IceUtilInternal::BadOptException"; + return "::IceInternal::BadOptException"; } void -IceUtilInternal::BadOptException::ice_print(ostream& out) const +IceInternal::BadOptException::ice_print(ostream& out) const { Exception::ice_print(out); if (!reason.empty()) @@ -64,16 +64,16 @@ IceUtilInternal::BadOptException::ice_print(ostream& out) const } ostream& -IceUtilInternal::operator<<(ostream& out, const IceUtilInternal::BadOptException& ex) +IceInternal::operator<<(ostream& out, const IceInternal::BadOptException& ex) { ex.ice_print(out); return out; } -IceUtilInternal::Options::Options() : parseCalled(false) {} +IceInternal::Options::Options() : parseCalled(false) {} void -IceUtilInternal::Options::checkArgs(const string& shortOpt, const string& longOpt, bool needArg, const string& dflt) +IceInternal::Options::checkArgs(const string& shortOpt, const string& longOpt, bool needArg, const string& dflt) { if (shortOpt.empty() && longOpt.empty()) { @@ -130,7 +130,7 @@ IceUtilInternal::Options::checkArgs(const string& shortOpt, const string& longOp } void -IceUtilInternal::Options::addOpt(const string& shortOpt, const string& longOpt, ArgType at, string dflt, RepeatType rt) +IceInternal::Options::addOpt(const string& shortOpt, const string& longOpt, ArgType at, string dflt, RepeatType rt) { if (parseCalled) { @@ -149,8 +149,8 @@ IceUtilInternal::Options::addOpt(const string& shortOpt, const string& longOpt, // quotes removed. // -IceUtilInternal::Options::StringVector -IceUtilInternal::Options::split(const string& line) +IceInternal::Options::StringVector +IceInternal::Options::split(const string& line) { const string IFS = " \t\n"; // Internal Field Separator. @@ -552,8 +552,8 @@ IceUtilInternal::Options::split(const string& line) // of the executable. // -IceUtilInternal::Options::StringVector -IceUtilInternal::Options::parse(const StringVector& args) +IceInternal::Options::StringVector +IceInternal::Options::parse(const StringVector& args) { if (parseCalled) { @@ -727,8 +727,8 @@ IceUtilInternal::Options::parse(const StringVector& args) // arguments as the return value. // -IceUtilInternal::Options::StringVector -IceUtilInternal::Options::parse(int argc, const char* const argv[]) +IceInternal::Options::StringVector +IceInternal::Options::parse(int argc, const char* const argv[]) { StringVector vec; for (int i = 0; i < argc; ++i) @@ -739,7 +739,7 @@ IceUtilInternal::Options::parse(int argc, const char* const argv[]) } bool -IceUtilInternal::Options::isSet(const string& opt) const +IceInternal::Options::isSet(const string& opt) const { if (!parseCalled) { @@ -751,7 +751,7 @@ IceUtilInternal::Options::isSet(const string& opt) const } string -IceUtilInternal::Options::optArg(const string& opt) const +IceInternal::Options::optArg(const string& opt) const { if (!parseCalled) { @@ -780,8 +780,8 @@ IceUtilInternal::Options::optArg(const string& opt) const return p->second->val; } -IceUtilInternal::Options::StringVector -IceUtilInternal::Options::argVec(const string& opt) const +IceInternal::Options::StringVector +IceInternal::Options::argVec(const string& opt) const { if (!parseCalled) { @@ -806,7 +806,7 @@ IceUtilInternal::Options::argVec(const string& opt) const } void -IceUtilInternal::Options::addValidOpt( +IceInternal::Options::addValidOpt( const string& shortOpt, const string& longOpt, ArgType at, @@ -852,8 +852,8 @@ IceUtilInternal::Options::addValidOpt( } } -IceUtilInternal::Options::ValidOpts::iterator -IceUtilInternal::Options::checkOpt(const string& opt, LengthType lt) +IceInternal::Options::ValidOpts::iterator +IceInternal::Options::checkOpt(const string& opt, LengthType lt) { ValidOpts::iterator pos = _validOpts.find(opt); if (pos == _validOpts.end()) @@ -871,7 +871,7 @@ IceUtilInternal::Options::checkOpt(const string& opt, LengthType lt) } void -IceUtilInternal::Options::setOpt(const string& opt1, const string& opt2, const string& val, RepeatType rt) +IceInternal::Options::setOpt(const string& opt1, const string& opt2, const string& val, RepeatType rt) { // // opt1 and opt2 (short and long opt) can't both be empty. @@ -891,7 +891,7 @@ IceUtilInternal::Options::setOpt(const string& opt1, const string& opt2, const s } void -IceUtilInternal::Options::setNonRepeatingOpt(const string& opt, const string& val) +IceInternal::Options::setNonRepeatingOpt(const string& opt, const string& val) { if (opt.empty()) { @@ -916,7 +916,7 @@ IceUtilInternal::Options::setNonRepeatingOpt(const string& opt, const string& va } void -IceUtilInternal::Options::setRepeatingOpt(const string& opt, const string& val) +IceInternal::Options::setRepeatingOpt(const string& opt, const string& val) { if (opt.empty()) { @@ -974,8 +974,8 @@ IceUtilInternal::Options::setRepeatingOpt(const string& opt, const string& val) } } -IceUtilInternal::Options::ValidOpts::const_iterator -IceUtilInternal::Options::checkOptIsValid(const string& opt) const +IceInternal::Options::ValidOpts::const_iterator +IceInternal::Options::checkOptIsValid(const string& opt) const { ValidOpts::const_iterator pos = _validOpts.find(opt); if (pos == _validOpts.end()) @@ -988,8 +988,8 @@ IceUtilInternal::Options::checkOptIsValid(const string& opt) const return pos; } -IceUtilInternal::Options::ValidOpts::const_iterator -IceUtilInternal::Options::checkOptHasArg(const string& opt) const +IceInternal::Options::ValidOpts::const_iterator +IceInternal::Options::checkOptHasArg(const string& opt) const { ValidOpts::const_iterator pos = checkOptIsValid(opt); if (pos->second->arg == NoArg) @@ -1007,7 +1007,7 @@ IceUtilInternal::Options::checkOptHasArg(const string& opt) const } void -IceUtilInternal::Options::updateSynonyms(const ::std::string& shortOpt, const ::std::string& longOpt) +IceInternal::Options::updateSynonyms(const ::std::string& shortOpt, const ::std::string& longOpt) { if (!shortOpt.empty() && !longOpt.empty()) { @@ -1017,7 +1017,7 @@ IceUtilInternal::Options::updateSynonyms(const ::std::string& shortOpt, const :: } string -IceUtilInternal::Options::getSynonym(const ::std::string& optName) const +IceInternal::Options::getSynonym(const ::std::string& optName) const { Synonyms::const_iterator pos = _synonyms.find(optName); return pos != _synonyms.end() ? pos->second : string(""); diff --git a/cpp/src/IceUtil/Options.h b/cpp/src/Ice/Options.h similarity index 97% rename from cpp/src/IceUtil/Options.h rename to cpp/src/Ice/Options.h index c9073f4f0c6..9d2aba0f1db 100644 --- a/cpp/src/IceUtil/Options.h +++ b/cpp/src/Ice/Options.h @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#ifndef ICE_UTIL_OPTIONS_H -#define ICE_UTIL_OPTIONS_H +#ifndef ICE_OPTIONS_H +#define ICE_OPTIONS_H #include "Ice/Config.h" #include "Ice/Exception.h" @@ -12,7 +12,7 @@ #include #include -namespace IceUtilInternal +namespace IceInternal { class ICE_API APIException : public Ice::LocalException { diff --git a/cpp/src/Ice/OutgoingResponse.cpp b/cpp/src/Ice/OutgoingResponse.cpp index b389aaa27ee..a3d56f1f013 100644 --- a/cpp/src/Ice/OutgoingResponse.cpp +++ b/cpp/src/Ice/OutgoingResponse.cpp @@ -12,7 +12,7 @@ using namespace std; using namespace Ice; using namespace IceInternal; -namespace IceUtilInternal +namespace IceInternal { extern bool printStackTraces; } @@ -134,7 +134,7 @@ namespace replyStatus = ReplyStatus::UnknownLocalException; ostringstream str; str << ex; - if (IceUtilInternal::printStackTraces) + if (IceInternal::printStackTraces) { str << '\n' << ex.ice_stackTrace(); } @@ -146,7 +146,7 @@ namespace replyStatus = ReplyStatus::UnknownException; ostringstream str; str << ex; - if (IceUtilInternal::printStackTraces) + if (IceInternal::printStackTraces) { str << '\n' << ex.ice_stackTrace(); } diff --git a/cpp/src/IceUtil/OutputUtil.cpp b/cpp/src/Ice/OutputUtil.cpp similarity index 73% rename from cpp/src/IceUtil/OutputUtil.cpp rename to cpp/src/Ice/OutputUtil.cpp index 04f2227a219..8c4bc7349be 100644 --- a/cpp/src/IceUtil/OutputUtil.cpp +++ b/cpp/src/Ice/OutputUtil.cpp @@ -8,9 +8,9 @@ #include using namespace std; -using namespace IceUtilInternal; +using namespace IceInternal; -namespace IceUtilInternal +namespace IceInternal { NextLine nl; StartBlock sb; @@ -29,7 +29,7 @@ namespace IceUtilInternal // OutputBase // ---------------------------------------------------------------------- -IceUtilInternal::OutputBase::OutputBase() +IceInternal::OutputBase::OutputBase() : _out(_fout), _pos(0), _indent(0), @@ -39,7 +39,7 @@ IceUtilInternal::OutputBase::OutputBase() { } -IceUtilInternal::OutputBase::OutputBase(ostream& os) +IceInternal::OutputBase::OutputBase(ostream& os) : _out(os), _pos(0), _indent(0), @@ -49,7 +49,7 @@ IceUtilInternal::OutputBase::OutputBase(ostream& os) { } -IceUtilInternal::OutputBase::OutputBase(const string& s) +IceInternal::OutputBase::OutputBase(const string& s) : _out(_fout), _pos(0), _indent(0), @@ -60,21 +60,21 @@ IceUtilInternal::OutputBase::OutputBase(const string& s) open(s); } -IceUtilInternal::OutputBase::~OutputBase() {} +IceInternal::OutputBase::~OutputBase() {} void -IceUtilInternal::OutputBase::open(const string& s) +IceInternal::OutputBase::open(const string& s) { // // Remove any existing file first. This prevents file name // mismatches on case-insensitive OSs. // - IceUtilInternal::unlink(s); - _fout.open(IceUtilInternal::streamFilename(s).c_str()); + IceInternal::unlink(s); + _fout.open(IceInternal::streamFilename(s).c_str()); } void -IceUtilInternal::OutputBase::close() +IceInternal::OutputBase::close() { if (_fout.is_open()) { @@ -83,13 +83,13 @@ IceUtilInternal::OutputBase::close() } bool -IceUtilInternal::OutputBase::isOpen() +IceInternal::OutputBase::isOpen() { return _fout.is_open(); } void -IceUtilInternal::OutputBase::print(const string& s) +IceInternal::OutputBase::print(const string& s) { size_t len = s.size(); for (unsigned int i = 0; i < len; ++i) @@ -107,34 +107,34 @@ IceUtilInternal::OutputBase::print(const string& s) } void -IceUtilInternal::OutputBase::inc() +IceInternal::OutputBase::inc() { _indent += _indentSize; } void -IceUtilInternal::OutputBase::dec() +IceInternal::OutputBase::dec() { assert(_indent >= _indentSize); _indent -= _indentSize; } void -IceUtilInternal::OutputBase::useCurrentPosAsIndent() +IceInternal::OutputBase::useCurrentPosAsIndent() { _indentSave.push(_indent); _indent = _pos; } void -IceUtilInternal::OutputBase::zeroIndent() +IceInternal::OutputBase::zeroIndent() { _indentSave.push(_indent); _indent = 0; } void -IceUtilInternal::OutputBase::restoreIndent() +IceInternal::OutputBase::restoreIndent() { assert(!_indentSave.empty()); _indent = _indentSave.top(); @@ -142,25 +142,25 @@ IceUtilInternal::OutputBase::restoreIndent() } int -IceUtilInternal::OutputBase::currIndent() +IceInternal::OutputBase::currIndent() { return _indent; } void -IceUtilInternal::OutputBase::setIndent(int indentSize) +IceInternal::OutputBase::setIndent(int indentSize) { _indentSize = indentSize; } void -IceUtilInternal::OutputBase::setUseTab(bool useTab) +IceInternal::OutputBase::setUseTab(bool useTab) { _useTab = useTab; } void -IceUtilInternal::OutputBase::newline() +IceInternal::OutputBase::newline() { _out << '\n'; _pos = 0; @@ -198,7 +198,7 @@ IceUtilInternal::OutputBase::newline() } void -IceUtilInternal::OutputBase::separator() +IceInternal::OutputBase::separator() { if (_separator) { @@ -207,7 +207,7 @@ IceUtilInternal::OutputBase::separator() } bool -IceUtilInternal::OutputBase::operator!() const +IceInternal::OutputBase::operator!() const { return !_out; } @@ -216,7 +216,7 @@ IceUtilInternal::OutputBase::operator!() const // Output // ---------------------------------------------------------------------- -IceUtilInternal::Output::Output(bool breakBeforeBlock, bool shortEmptyBlock) +IceInternal::Output::Output(bool breakBeforeBlock, bool shortEmptyBlock) : OutputBase(), _blockStart("{"), _blockEnd("}"), @@ -227,7 +227,7 @@ IceUtilInternal::Output::Output(bool breakBeforeBlock, bool shortEmptyBlock) { } -IceUtilInternal::Output::Output(ostream& os, bool breakBeforeBlock, bool shortEmptyBlock) +IceInternal::Output::Output(ostream& os, bool breakBeforeBlock, bool shortEmptyBlock) : OutputBase(os), _blockStart("{"), _blockEnd("}"), @@ -238,7 +238,7 @@ IceUtilInternal::Output::Output(ostream& os, bool breakBeforeBlock, bool shortEm { } -IceUtilInternal::Output::Output(const char* s, bool breakBeforeBlock, bool shortEmptyBlock) +IceInternal::Output::Output(const char* s, bool breakBeforeBlock, bool shortEmptyBlock) : OutputBase(s), _blockStart("{"), _blockEnd("}"), @@ -250,7 +250,7 @@ IceUtilInternal::Output::Output(const char* s, bool breakBeforeBlock, bool short } void -IceUtilInternal::Output::print(const string& s) +IceInternal::Output::print(const string& s) { _emptyBlock = false; if (_par >= 0) @@ -264,7 +264,7 @@ IceUtilInternal::Output::print(const string& s) } void -IceUtilInternal::Output::sb() +IceInternal::Output::sb() { if (_blockStart.length()) { @@ -285,7 +285,7 @@ IceUtilInternal::Output::sb() } void -IceUtilInternal::Output::eb() +IceInternal::Output::eb() { dec(); if (_emptyBlock && _shortEmptyBlock) @@ -308,7 +308,7 @@ IceUtilInternal::Output::eb() } void -IceUtilInternal::Output::spar(char c) +IceInternal::Output::spar(char c) { _emptyBlock = false; _out << c; @@ -316,14 +316,14 @@ IceUtilInternal::Output::spar(char c) } void -IceUtilInternal::Output::epar(char c) +IceInternal::Output::epar(char c) { _par = -1; _out << c; } Output& -IceUtilInternal::operator<<(Output& out, ios_base& (*val)(ios_base&)) +IceInternal::operator<<(Output& out, ios_base& (*val)(ios_base&)) { ostringstream s; s << val; @@ -335,14 +335,14 @@ IceUtilInternal::operator<<(Output& out, ios_base& (*val)(ios_base&)) // XMLOutput // ---------------------------------------------------------------------- -IceUtilInternal::XMLOutput::XMLOutput() : OutputBase(), _se(false), _text(false), _escape(false) {} +IceInternal::XMLOutput::XMLOutput() : OutputBase(), _se(false), _text(false), _escape(false) {} -IceUtilInternal::XMLOutput::XMLOutput(ostream& os) : OutputBase(os), _se(false), _text(false), _escape(false) {} +IceInternal::XMLOutput::XMLOutput(ostream& os) : OutputBase(os), _se(false), _text(false), _escape(false) {} -IceUtilInternal::XMLOutput::XMLOutput(const char* s) : OutputBase(s), _se(false), _text(false), _escape(false) {} +IceInternal::XMLOutput::XMLOutput(const char* s) : OutputBase(s), _se(false), _text(false), _escape(false) {} void -IceUtilInternal::XMLOutput::print(const string& s) +IceInternal::XMLOutput::print(const string& s) { if (_se) { @@ -362,7 +362,7 @@ IceUtilInternal::XMLOutput::print(const string& s) } void -IceUtilInternal::XMLOutput::newline() +IceInternal::XMLOutput::newline() { if (_se) { @@ -373,7 +373,7 @@ IceUtilInternal::XMLOutput::newline() } void -IceUtilInternal::XMLOutput::startElement(const string& element) +IceInternal::XMLOutput::startElement(const string& element) { newline(); @@ -409,7 +409,7 @@ IceUtilInternal::XMLOutput::startElement(const string& element) } void -IceUtilInternal::XMLOutput::endElement() +IceInternal::XMLOutput::endElement() { string element = _elementStack.top(); _elementStack.pop(); @@ -434,7 +434,7 @@ IceUtilInternal::XMLOutput::endElement() } void -IceUtilInternal::XMLOutput::attr(const string& name, const string& value) +IceInternal::XMLOutput::attr(const string& name, const string& value) { // // Precondition: Attributes can only be attached to elements. @@ -444,19 +444,19 @@ IceUtilInternal::XMLOutput::attr(const string& name, const string& value) } void -IceUtilInternal::XMLOutput::startEscapes() +IceInternal::XMLOutput::startEscapes() { _escape = true; } void -IceUtilInternal::XMLOutput::endEscapes() +IceInternal::XMLOutput::endEscapes() { _escape = false; } string -IceUtilInternal::XMLOutput::currentElement() const +IceInternal::XMLOutput::currentElement() const { if (_elementStack.size() > 0) { @@ -469,7 +469,7 @@ IceUtilInternal::XMLOutput::currentElement() const } string -IceUtilInternal::XMLOutput::escape(const string& input) const +IceInternal::XMLOutput::escape(const string& input) const { string v = input; @@ -529,7 +529,7 @@ IceUtilInternal::XMLOutput::escape(const string& input) const } XMLOutput& -IceUtilInternal::operator<<(XMLOutput& out, ios_base& (*val)(ios_base&)) +IceInternal::operator<<(XMLOutput& out, ios_base& (*val)(ios_base&)) { ostringstream s; s << val; @@ -537,24 +537,24 @@ IceUtilInternal::operator<<(XMLOutput& out, ios_base& (*val)(ios_base&)) return out; } -IceUtilInternal::StartElement::StartElement(const string& name) : _name(name) {} +IceInternal::StartElement::StartElement(const string& name) : _name(name) {} const string& -IceUtilInternal::StartElement::getName() const +IceInternal::StartElement::getName() const { return _name; } -IceUtilInternal::Attribute::Attribute(const string& name, const string& value) : _name(name), _value(value) {} +IceInternal::Attribute::Attribute(const string& name, const string& value) : _name(name), _value(value) {} const string& -IceUtilInternal::Attribute::getName() const +IceInternal::Attribute::getName() const { return _name; } const string& -IceUtilInternal::Attribute::getValue() const +IceInternal::Attribute::getValue() const { return _value; } diff --git a/cpp/src/IceUtil/OutputUtil.h b/cpp/src/Ice/OutputUtil.h similarity index 98% rename from cpp/src/IceUtil/OutputUtil.h rename to cpp/src/Ice/OutputUtil.h index 41c52c9468f..d869efdc43b 100644 --- a/cpp/src/IceUtil/OutputUtil.h +++ b/cpp/src/Ice/OutputUtil.h @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#ifndef ICE_UTIL_OUTPUT_UTIL_H -#define ICE_UTIL_OUTPUT_UTIL_H +#ifndef ICE_OUTPUT_UTIL_H +#define ICE_OUTPUT_UTIL_H #include "Ice/Config.h" #include @@ -12,7 +12,7 @@ #include #include -namespace IceUtilInternal +namespace IceInternal { // ---------------------------------------------------------------------- // OutputBase diff --git a/cpp/src/Ice/PluginManagerI.cpp b/cpp/src/Ice/PluginManagerI.cpp index e203c01d4d1..09ae04d26f8 100644 --- a/cpp/src/Ice/PluginManagerI.cpp +++ b/cpp/src/Ice/PluginManagerI.cpp @@ -3,13 +3,13 @@ // #include "PluginManagerI.h" -#include "../IceUtil/Options.h" #include "DynamicLibrary.h" #include "Ice/Communicator.h" #include "Ice/LocalException.h" #include "Ice/LoggerUtil.h" #include "Ice/Properties.h" #include "Instance.h" +#include "Options.h" using namespace std; using namespace Ice; @@ -380,9 +380,9 @@ Ice::PluginManagerI::loadPlugin(const string& name, const string& pluginSpec, St // try { - args = IceUtilInternal::Options::split(pluginSpec); + args = IceInternal::Options::split(pluginSpec); } - catch (const IceUtilInternal::BadOptException& ex) + catch (const IceInternal::BadOptException& ex) { throw PluginInitializationException( __FILE__, diff --git a/cpp/src/Ice/Properties.cpp b/cpp/src/Ice/Properties.cpp index 63ee3ae692a..916e702d154 100644 --- a/cpp/src/Ice/Properties.cpp +++ b/cpp/src/Ice/Properties.cpp @@ -3,7 +3,7 @@ // #include "Ice/Properties.h" -#include "../IceUtil/FileUtil.h" +#include "FileUtil.h" #include "Ice/Initialize.h" #include "Ice/LocalException.h" #include "Ice/Logger.h" @@ -556,7 +556,7 @@ Ice::Properties::load(string_view file) else #endif { - ifstream in(IceUtilInternal::streamFilename(string{file}).c_str()); + ifstream in(IceInternal::streamFilename(string{file}).c_str()); if (!in) { throw FileException(__FILE__, __LINE__, string{file}); diff --git a/cpp/src/IceUtil/Random.cpp b/cpp/src/Ice/Random.cpp similarity index 87% rename from cpp/src/IceUtil/Random.cpp rename to cpp/src/Ice/Random.cpp index 26dd6fa9320..ac007d5f8c1 100644 --- a/cpp/src/IceUtil/Random.cpp +++ b/cpp/src/Ice/Random.cpp @@ -9,7 +9,7 @@ using namespace std; void -IceUtilInternal::generateRandom(char* buffer, size_t size) +IceInternal::generateRandom(char* buffer, size_t size) { // We use the random_device directly here to get cryptographic random numbers when possible. thread_local static std::random_device rd; @@ -21,7 +21,7 @@ IceUtilInternal::generateRandom(char* buffer, size_t size) } unsigned int -IceUtilInternal::random(unsigned int limit) +IceInternal::random(unsigned int limit) { assert(limit > 0); thread_local static std::random_device rd; diff --git a/cpp/src/IceUtil/Random.h b/cpp/src/Ice/Random.h similarity index 84% rename from cpp/src/IceUtil/Random.h rename to cpp/src/Ice/Random.h index f091bb2365d..4d86f75ef5e 100644 --- a/cpp/src/IceUtil/Random.h +++ b/cpp/src/Ice/Random.h @@ -2,14 +2,14 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#ifndef ICE_UTIL_RANDOM_H -#define ICE_UTIL_RANDOM_H +#ifndef ICE_RANDOM_H +#define ICE_RANDOM_H #include "Ice/Config.h" #include #include -namespace IceUtilInternal +namespace IceInternal { ICE_API void generateRandom(char*, size_t); ICE_API unsigned int random(unsigned int = 0); diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp index 2c95b999f37..152db4108ac 100644 --- a/cpp/src/Ice/Reference.cpp +++ b/cpp/src/Ice/Reference.cpp @@ -3,7 +3,6 @@ // #include "Reference.h" -#include "../IceUtil/Random.h" #include "CollocatedRequestHandler.h" #include "ConnectRequestHandler.h" #include "ConnectionFactory.h" @@ -23,6 +22,7 @@ #include "LocatorInfo.h" #include "ObjectAdapterFactory.h" #include "OpaqueEndpointI.h" +#include "Random.h" #include "ReferenceFactory.h" #include "RouterInfo.h" #include "TraceLevels.h" @@ -1683,7 +1683,7 @@ IceInternal::RoutableReference::filterEndpoints(const vector& allE { case EndpointSelectionType::Random: { - IceUtilInternal::shuffle(endpoints.begin(), endpoints.end()); + IceInternal::shuffle(endpoints.begin(), endpoints.end()); break; } case EndpointSelectionType::Ordered: diff --git a/cpp/src/IceUtil/ResourceConfig.h b/cpp/src/Ice/ResourceConfig.h similarity index 88% rename from cpp/src/IceUtil/ResourceConfig.h rename to cpp/src/Ice/ResourceConfig.h index 4d31ce7c61a..b33c74ff297 100644 --- a/cpp/src/IceUtil/ResourceConfig.h +++ b/cpp/src/Ice/ResourceConfig.h @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#ifndef ICE_UTIL_RESOURCE_CONFIG_H -#define ICE_UTIL_RESOURCE_CONFIG_H +#ifndef ICE_RESOURCE_CONFIG_H +#define ICE_RESOURCE_CONFIG_H #include "winver.h" diff --git a/cpp/src/Ice/SSL/OpenSSLEngine.cpp b/cpp/src/Ice/SSL/OpenSSLEngine.cpp index cb44b54d30d..88aac1ceef7 100644 --- a/cpp/src/Ice/SSL/OpenSSLEngine.cpp +++ b/cpp/src/Ice/SSL/OpenSSLEngine.cpp @@ -3,7 +3,7 @@ // #include "OpenSSLEngine.h" -#include "../../IceUtil/FileUtil.h" +#include "../FileUtil.h" #include "Ice/Communicator.h" #include "Ice/Config.h" #include "Ice/LocalException.h" diff --git a/cpp/src/Ice/SSL/OpenSSLEngine.h b/cpp/src/Ice/SSL/OpenSSLEngine.h index f2deae96fc0..7a0a693bd97 100644 --- a/cpp/src/Ice/SSL/OpenSSLEngine.h +++ b/cpp/src/Ice/SSL/OpenSSLEngine.h @@ -5,8 +5,8 @@ #ifndef ICESSL_OPENSSL_ENGINE_H #define ICESSL_OPENSSL_ENGINE_H -#include "../Ice/InstanceF.h" #include "Ice/BuiltinSequences.h" +#include "Ice/InstanceF.h" #include "Ice/SSL/ClientAuthenticationOptions.h" #include "Ice/SSL/ServerAuthenticationOptions.h" #include "SSLEngine.h" diff --git a/cpp/src/Ice/SSL/SSLEngine.cpp b/cpp/src/Ice/SSL/SSLEngine.cpp index 9c52df38b48..946d0bb79c1 100644 --- a/cpp/src/Ice/SSL/SSLEngine.cpp +++ b/cpp/src/Ice/SSL/SSLEngine.cpp @@ -17,7 +17,6 @@ using namespace std; using namespace Ice; -using namespace Ice; using namespace Ice::SSL; Ice::SSL::SSLEngine::SSLEngine(const IceInternal::InstancePtr& instance) diff --git a/cpp/src/Ice/SSL/SSLUtil.cpp b/cpp/src/Ice/SSL/SSLUtil.cpp index 1c3bf4b0696..37f603f5e66 100644 --- a/cpp/src/Ice/SSL/SSLUtil.cpp +++ b/cpp/src/Ice/SSL/SSLUtil.cpp @@ -3,8 +3,8 @@ // #include "SSLUtil.h" -#include "../../IceUtil/FileUtil.h" #include "../Base64.h" +#include "../FileUtil.h" #include "../Network.h" #include "../UniqueRef.h" #include "DistinguishedName.h" @@ -77,7 +77,7 @@ Ice::SSL::parseBytes(const string& arg, vector& buffer) void Ice::SSL::readFile(const string& file, vector& buffer) { - ifstream is(IceUtilInternal::streamFilename(file).c_str(), ios::in | ios::binary); + ifstream is(IceInternal::streamFilename(file).c_str(), ios::in | ios::binary); if (!is.good()) { throw CertificateReadException(__FILE__, __LINE__, "error opening file " + file); @@ -112,7 +112,7 @@ Ice::SSL::checkPath(const string& path, const string& defaultDir, bool dir, stri if (CFURLGetFileSystemRepresentation(url.get(), true, filePath, sizeof(filePath))) { string tmp = string(reinterpret_cast(filePath)); - if ((dir && IceUtilInternal::directoryExists(tmp)) || (!dir && IceUtilInternal::fileExists(tmp))) + if ((dir && IceInternal::directoryExists(tmp)) || (!dir && IceInternal::fileExists(tmp))) { resolved = tmp; return true; @@ -120,9 +120,9 @@ Ice::SSL::checkPath(const string& path, const string& defaultDir, bool dir, stri } } #endif - if (IceUtilInternal::isAbsolutePath(path)) + if (IceInternal::isAbsolutePath(path)) { - if ((dir && IceUtilInternal::directoryExists(path)) || (!dir && IceUtilInternal::fileExists(path))) + if ((dir && IceInternal::directoryExists(path)) || (!dir && IceInternal::fileExists(path))) { resolved = path; return true; @@ -136,14 +136,14 @@ Ice::SSL::checkPath(const string& path, const string& defaultDir, bool dir, stri string tmp; if (!defaultDir.empty()) { - tmp = defaultDir + IceUtilInternal::separator + path; + tmp = defaultDir + IceInternal::separator + path; } else { tmp = path; } - if ((dir && IceUtilInternal::directoryExists(tmp)) || (!dir && IceUtilInternal::fileExists(tmp))) + if ((dir && IceInternal::directoryExists(tmp)) || (!dir && IceInternal::fileExists(tmp))) { resolved = tmp; return true; diff --git a/cpp/src/Ice/SSL/SchannelEngine.cpp b/cpp/src/Ice/SSL/SchannelEngine.cpp index d535dab0366..524292a935c 100644 --- a/cpp/src/Ice/SSL/SchannelEngine.cpp +++ b/cpp/src/Ice/SSL/SchannelEngine.cpp @@ -3,7 +3,7 @@ // #include "SchannelEngine.h" -#include "../../IceUtil/FileUtil.h" +#include "../FileUtil.h" #include "DistinguishedName.h" #include "Ice/Communicator.h" #include "Ice/LocalException.h" @@ -33,9 +33,7 @@ const int ICESSL_CALG_ECDH_EPHEM = 0x0000AE06; using namespace std; using namespace Ice; -using namespace Ice; using namespace IceInternal; -using namespace IceUtilInternal; using namespace Ice::SSL; namespace @@ -822,7 +820,7 @@ Schannel::SSLEngine::initialize() if (!certFileValue.empty()) { vector certFiles; - if (!splitString(certFileValue, IceUtilInternal::pathsep, certFiles) || certFiles.size() > 2) + if (!splitString(certFileValue, IceInternal::pathsep, certFiles) || certFiles.size() > 2) { throw InitializationException( __FILE__, @@ -833,7 +831,7 @@ Schannel::SSLEngine::initialize() vector keyFiles; if (!keyFile.empty()) { - if (!splitString(keyFile, IceUtilInternal::pathsep, keyFiles) || keyFiles.size() > 2) + if (!splitString(keyFile, IceInternal::pathsep, keyFiles) || keyFiles.size() > 2) { throw InitializationException( __FILE__, diff --git a/cpp/src/Ice/SSL/SecureTransportEngine.cpp b/cpp/src/Ice/SSL/SecureTransportEngine.cpp index 48d7f0db94d..11e07165b4e 100644 --- a/cpp/src/Ice/SSL/SecureTransportEngine.cpp +++ b/cpp/src/Ice/SSL/SecureTransportEngine.cpp @@ -3,7 +3,7 @@ // #include "SecureTransportEngine.h" -#include "../../IceUtil/FileUtil.h" +#include "../FileUtil.h" #include "../Instance.h" #include "../TraceLevels.h" #include "Ice/Config.h" @@ -20,11 +20,10 @@ #include "SecureTransportUtil.h" // Disable deprecation warnings from SecureTransport APIs -#include "../../IceUtil/DisableWarnings.h" +#include "../DisableWarnings.h" using namespace std; using namespace Ice; -using namespace Ice; using namespace Ice::SSL; using namespace IceInternal; using namespace Ice::SSL::SecureTransport; @@ -621,7 +620,7 @@ SecureTransport::SSLEngine::initialize() if (!certFile.empty()) { vector files; - if (!IceInternal::splitString(certFile, IceUtilInternal::pathsep, files) || files.size() > 2) + if (!IceInternal::splitString(certFile, IceInternal::pathsep, files) || files.size() > 2) { throw InitializationException( __FILE__, @@ -633,7 +632,7 @@ SecureTransport::SSLEngine::initialize() string keyFile = properties->getIceProperty("IceSSL.KeyFile"); if (!keyFile.empty()) { - if (!IceInternal::splitString(keyFile, IceUtilInternal::pathsep, keyFiles) || keyFiles.size() > 2) + if (!IceInternal::splitString(keyFile, IceInternal::pathsep, keyFiles) || keyFiles.size() > 2) { throw InitializationException( __FILE__, diff --git a/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp b/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp index 6b3baee5ce9..7bcfd2629c4 100644 --- a/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +++ b/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp @@ -13,7 +13,7 @@ #include // Disable deprecation warnings from SecureTransport APIs -#include "../../IceUtil/DisableWarnings.h" +#include "../DisableWarnings.h" using namespace std; using namespace Ice; diff --git a/cpp/src/Ice/SSL/SecureTransportUtil.cpp b/cpp/src/Ice/SSL/SecureTransportUtil.cpp index 0b8baf81ec4..a39b9144697 100644 --- a/cpp/src/Ice/SSL/SecureTransportUtil.cpp +++ b/cpp/src/Ice/SSL/SecureTransportUtil.cpp @@ -3,8 +3,8 @@ // #include "SecureTransportUtil.h" -#include "../../IceUtil/FileUtil.h" #include "../Base64.h" +#include "../FileUtil.h" #include "../UniqueRef.h" #include "DistinguishedName.h" #include "Ice/LocalException.h" @@ -31,7 +31,7 @@ namespace { CFMutableDataRef readCertFile(const string& file) { - ifstream is(IceUtilInternal::streamFilename(file).c_str(), ios::in | ios::binary); + ifstream is(IceInternal::streamFilename(file).c_str(), ios::in | ios::binary); if (!is.good()) { throw CertificateReadException(__FILE__, __LINE__, "error opening file " + file); @@ -337,10 +337,10 @@ namespace // // KeyChain path is relative to the current working directory. // - if (!IceUtilInternal::isAbsolutePath(keychainPath)) + if (!IceInternal::isAbsolutePath(keychainPath)) { string cwd; - if (IceUtilInternal::getcwd(cwd) == 0) + if (IceInternal::getcwd(cwd) == 0) { keychainPath = string(cwd) + '/' + keychainPath; } diff --git a/cpp/src/IceUtil/ScannerConfig.h b/cpp/src/Ice/ScannerConfig.h similarity index 94% rename from cpp/src/IceUtil/ScannerConfig.h rename to cpp/src/Ice/ScannerConfig.h index 0008e25c99d..9b4d9da2aa8 100644 --- a/cpp/src/IceUtil/ScannerConfig.h +++ b/cpp/src/Ice/ScannerConfig.h @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#ifndef ICE_UTIL_SCANNER_CONFIG_H -#define ICE_UTIL_SCANNER_CONFIG_H +#ifndef ICE_SCANNER_CONFIG_H +#define ICE_SCANNER_CONFIG_H #include "Ice/Config.h" // Required by generated Scanners. diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp index 586a0f30be4..bd32c48e132 100644 --- a/cpp/src/Ice/Service.cpp +++ b/cpp/src/Ice/Service.cpp @@ -3,8 +3,8 @@ // #include "Ice/Service.h" -#include "../IceUtil/ConsoleUtil.h" #include "ArgVector.h" +#include "ConsoleUtil.h" #include "Ice/StringUtil.h" #include "LoggerI.h" @@ -24,7 +24,6 @@ using namespace std; using namespace Ice; using namespace IceInternal; -using namespace IceUtilInternal; Ice::Service* Ice::Service::_instance = 0; static CtrlCHandler* _ctrlCHandler = 0; diff --git a/cpp/src/IceUtil/Exception.h b/cpp/src/Ice/StackTrace.h similarity index 77% rename from cpp/src/IceUtil/Exception.h rename to cpp/src/Ice/StackTrace.h index 8fce94343d6..4d97937ba13 100644 --- a/cpp/src/IceUtil/Exception.h +++ b/cpp/src/Ice/StackTrace.h @@ -2,12 +2,12 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#ifndef ICE_UTIL_EXCEPTION_H -#define ICE_UTIL_EXCEPTION_H +#ifndef ICE_STACK_TRACE_H +#define ICE_STACK_TRACE_H #include "Ice/Config.h" -namespace IceUtilInternal +namespace IceInternal { enum StackTraceImpl { diff --git a/cpp/src/Ice/StringConverter.cpp b/cpp/src/Ice/StringConverter.cpp index 19c05262383..838b3f7eee8 100644 --- a/cpp/src/Ice/StringConverter.cpp +++ b/cpp/src/Ice/StringConverter.cpp @@ -7,7 +7,7 @@ #if defined(_MSC_VER) && (_MSVC_LANG >= 201703L) # define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING #elif (__cplusplus >= 201703L) -# include "../IceUtil/DisableWarnings.h" +# include "DisableWarnings.h" #endif #include "Ice/Exception.h" diff --git a/cpp/src/Ice/Timer.cpp b/cpp/src/Ice/Timer.cpp index 267690ba404..3404a6ddc5f 100644 --- a/cpp/src/Ice/Timer.cpp +++ b/cpp/src/Ice/Timer.cpp @@ -3,13 +3,12 @@ // #include "Ice/Timer.h" -#include "../IceUtil/ConsoleUtil.h" +#include "ConsoleUtil.h" #include "Ice/Exception.h" using namespace std; using namespace Ice; using namespace IceInternal; -using namespace IceUtilInternal; TimerTask::~TimerTask() { diff --git a/cpp/src/Ice/UUID.cpp b/cpp/src/Ice/UUID.cpp index 66f3a7c7edf..736a5070047 100644 --- a/cpp/src/Ice/UUID.cpp +++ b/cpp/src/Ice/UUID.cpp @@ -7,7 +7,7 @@ // We use a high quality random number generator // (std::random_device) to generate "version 4" UUIDs, as described in // http://www.ietf.org/internet-drafts/draft-mealling-uuid-urn-00.txt -#include "../IceUtil/Random.h" +#include "Random.h" using namespace std; @@ -54,7 +54,7 @@ Ice::generateUUID() // Get a random sequence of bytes. char* buffer = reinterpret_cast(&uuid); - IceUtilInternal::generateRandom(buffer, sizeof(UUID)); + IceInternal::generateRandom(buffer, sizeof(UUID)); // Adjust the bits that say "version 4" UUID uuid.timeHighAndVersion[0] &= 0x0F; diff --git a/cpp/src/IceUtil/UndefSysMacros.h b/cpp/src/Ice/UndefSysMacros.h similarity index 90% rename from cpp/src/IceUtil/UndefSysMacros.h rename to cpp/src/Ice/UndefSysMacros.h index bd49857e400..b7a3bba77a6 100644 --- a/cpp/src/IceUtil/UndefSysMacros.h +++ b/cpp/src/Ice/UndefSysMacros.h @@ -6,8 +6,8 @@ \hideincludedbygraph */ -#ifndef ICE_UTIL_UNDEF_SYS_MACROS_H -#define ICE_UTIL_UNDEF_SYS_MACROS_H +#ifndef ICE_UNDEF_SYS_MACROS_H +#define ICE_UNDEF_SYS_MACROS_H // // This header includes macros that can end up being dragged into diff --git a/cpp/src/Ice/UtilException.cpp b/cpp/src/Ice/UtilException.cpp index 928e791b1ab..7bf9ab40107 100644 --- a/cpp/src/Ice/UtilException.cpp +++ b/cpp/src/Ice/UtilException.cpp @@ -22,9 +22,9 @@ # define __STDC_LIMIT_MACROS #endif -#include "../IceUtil/Exception.h" #include "Ice/Exception.h" #include "Ice/StringUtil.h" +#include "StackTrace.h" #ifdef _WIN32 # include @@ -73,7 +73,7 @@ using namespace std; -namespace IceUtilInternal +namespace IceInternal { #ifdef NDEBUG bool ICE_API printStackTraces = false; @@ -310,7 +310,7 @@ namespace { vector stackFrames; - if (!IceUtilInternal::printStackTraces) + if (!IceInternal::printStackTraces) { return stackFrames; } diff --git a/cpp/src/Ice/WSTransceiver.cpp b/cpp/src/Ice/WSTransceiver.cpp index c4d964a10b1..c9fc41c13ff 100644 --- a/cpp/src/Ice/WSTransceiver.cpp +++ b/cpp/src/Ice/WSTransceiver.cpp @@ -3,7 +3,6 @@ // #include "WSTransceiver.h" -#include "../IceUtil/Random.h" #include "Base64.h" #include "Endian.h" #include "HttpParser.h" @@ -16,6 +15,7 @@ #include "Ice/SHA1.h" #include "Ice/StringUtil.h" #include "ProtocolInstance.h" +#include "Random.h" #include #include @@ -193,7 +193,7 @@ IceInternal::WSTransceiver::initialize(Buffer& readBuffer, Buffer& writeBuffer) // encoded with Base64. // vector key(16); - IceUtilInternal::generateRandom(reinterpret_cast(&key[0]), key.size()); + IceInternal::generateRandom(reinterpret_cast(&key[0]), key.size()); _key = IceInternal::Base64::encode(key); out << _key << "\r\n\r\n"; // EOM @@ -1714,7 +1714,7 @@ IceInternal::WSTransceiver::prepareWriteHeader(uint8_t opCode, IceInternal::Buff // and apply the mask. // _writeBuffer.b[1] |= byte{FLAG_MASKED}; - IceUtilInternal::generateRandom(reinterpret_cast(_writeMask), sizeof(_writeMask)); + IceInternal::generateRandom(reinterpret_cast(_writeMask), sizeof(_writeMask)); memcpy(_writeBuffer.i, _writeMask, sizeof(_writeMask)); _writeBuffer.i += sizeof(_writeMask); } diff --git a/cpp/src/Ice/msbuild/ice/ice.vcxproj b/cpp/src/Ice/msbuild/ice/ice.vcxproj index 129bd479edd..c543d6b0eb5 100644 --- a/cpp/src/Ice/msbuild/ice/ice.vcxproj +++ b/cpp/src/Ice/msbuild/ice/ice.vcxproj @@ -500,12 +500,12 @@ true ..\..\..\..\..\slice\Ice\Version.ice - + - - - - + + + + @@ -911,7 +911,6 @@ ..\..\..\..\..\slice\Ice\Version.ice - @@ -921,7 +920,6 @@ - @@ -934,13 +932,11 @@ - - @@ -958,7 +954,6 @@ - @@ -968,20 +963,19 @@ - - + @@ -997,6 +991,7 @@ + @@ -1016,4 +1011,4 @@ - + \ No newline at end of file diff --git a/cpp/src/Ice/msbuild/ice/ice.vcxproj.filters b/cpp/src/Ice/msbuild/ice/ice.vcxproj.filters index e3e0c525553..b7e266345b5 100644 --- a/cpp/src/Ice/msbuild/ice/ice.vcxproj.filters +++ b/cpp/src/Ice/msbuild/ice/ice.vcxproj.filters @@ -213,22 +213,22 @@ Source Files\x64\Release - + Source Files Source Files - + Source Files - + Source Files - + Source Files - + Source Files @@ -742,9 +742,6 @@ Header Files\x64\Release - - Source Files - Header Files\Win32\Debug @@ -784,9 +781,6 @@ Header Files - - Header Files - Header Files @@ -814,9 +808,6 @@ Header Files - - Header Files - Header Files @@ -853,9 +844,6 @@ Header Files - - Header Files - Header Files @@ -871,9 +859,6 @@ Header Files - - Header Files - Header Files @@ -928,9 +913,6 @@ Header Files - - Header Files - Header Files @@ -958,9 +940,6 @@ Header Files - - Header Files - Header Files @@ -979,9 +958,6 @@ Header Files - - Header Files - Header Files @@ -1042,6 +1018,15 @@ Source Files\SSL + + Header Files + + + Header Files + + + Header Files + @@ -1084,4 +1069,4 @@ Slice Files - + \ No newline at end of file diff --git a/cpp/src/IceBT/TransceiverI.cpp b/cpp/src/IceBT/TransceiverI.cpp index 9503f7c60d0..1499ac56a58 100644 --- a/cpp/src/IceBT/TransceiverI.cpp +++ b/cpp/src/IceBT/TransceiverI.cpp @@ -11,7 +11,7 @@ #include "Ice/Connection.h" #include "Ice/LocalException.h" -#include "../IceUtil/DisableWarnings.h" +#include "../Ice/DisableWarnings.h" using namespace std; using namespace Ice; diff --git a/cpp/src/IceBox/Admin.cpp b/cpp/src/IceBox/Admin.cpp index 1bc6d7952ee..fa6c2a2a3fb 100644 --- a/cpp/src/IceBox/Admin.cpp +++ b/cpp/src/IceBox/Admin.cpp @@ -2,14 +2,13 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" #include "Ice/Ice.h" #include "IceBox/IceBox.h" using namespace std; using namespace IceInternal; -using namespace IceUtilInternal; int run(const Ice::StringSeq&); @@ -66,7 +65,7 @@ usage(const string& name) int run(const Ice::StringSeq& args) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); @@ -75,7 +74,7 @@ run(const Ice::StringSeq& args) { commands = opts.parse(args); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << e.reason << endl; usage(args[0]); diff --git a/cpp/src/IceBox/IceBox.rc b/cpp/src/IceBox/IceBox.rc index ecc17934621..e66231b0e52 100644 --- a/cpp/src/IceBox/IceBox.rc +++ b/cpp/src/IceBox/IceBox.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME ICE_LIBNAME("icebox") "\0" #define ICE_ORIGINALFILENAME ICE_LIBNAME("icebox") ".dll\0" diff --git a/cpp/src/IceBox/IceBoxAdmin.rc b/cpp/src/IceBox/IceBoxAdmin.rc index 9da7f9885fa..768d665f566 100644 --- a/cpp/src/IceBox/IceBoxAdmin.rc +++ b/cpp/src/IceBox/IceBoxAdmin.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "iceboxadmin\0" #define ICE_ORIGINALFILENAME "iceboxadmin.exe\0" diff --git a/cpp/src/IceBox/IceBoxExe.rc b/cpp/src/IceBox/IceBoxExe.rc index c9a62950cd3..6f3efe39d46 100644 --- a/cpp/src/IceBox/IceBoxExe.rc +++ b/cpp/src/IceBox/IceBoxExe.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "icebox\0" #define ICE_ORIGINALFILENAME "icebox.exe\0" diff --git a/cpp/src/IceBox/IceBoxService.cpp b/cpp/src/IceBox/IceBoxService.cpp index d82ddd78a9f..457c20caf25 100644 --- a/cpp/src/IceBox/IceBoxService.cpp +++ b/cpp/src/IceBox/IceBoxService.cpp @@ -3,7 +3,7 @@ // #include "Ice/Ice.h" -#include "../IceUtil/Options.h" +#include "../Ice/Options.h" #include "ServiceManagerI.h" using namespace std; @@ -53,7 +53,7 @@ IceBox::IceBoxService::start(int argc, char* argv[], int& status) } } - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); @@ -61,7 +61,7 @@ IceBox::IceBoxService::start(int argc, char* argv[], int& status) { args = opts.parse(args); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { error(e.reason); usage(argv[0]); diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp index 66cfb991200..9784fdb7f6f 100644 --- a/cpp/src/IceBox/ServiceManagerI.cpp +++ b/cpp/src/IceBox/ServiceManagerI.cpp @@ -3,16 +3,16 @@ // #include "ServiceManagerI.h" +#include "../Ice/ConsoleUtil.h" #include "../Ice/DynamicLibrary.h" #include "../Ice/Instance.h" -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" +#include "../Ice/Options.h" #include "Ice/Ice.h" #include "Ice/Initialize.h" #include "Ice/StringUtil.h" using namespace Ice; -using namespace IceUtilInternal; +using namespace IceInternal; using namespace IceBox; using namespace std; @@ -32,9 +32,9 @@ namespace // try { - args = IceUtilInternal::Options::split(value); + args = IceInternal::Options::split(value); } - catch (const IceUtilInternal::BadOptException& ex) + catch (const IceInternal::BadOptException& ex) { throw FailureException( __FILE__, diff --git a/cpp/src/IceBridge/IceBridge.cpp b/cpp/src/IceBridge/IceBridge.cpp index f83c118a4c2..d47bde3921a 100644 --- a/cpp/src/IceBridge/IceBridge.cpp +++ b/cpp/src/IceBridge/IceBridge.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/Options.h" +#include "../Ice/Options.h" #include "Ice/Connection.h" #include "Ice/ObjectAdapter.h" #include "Ice/Router.h" @@ -513,7 +513,7 @@ BridgeI::outgoingException(const shared_ptr& bc, exception_ptr bool BridgeService::start(int argc, char* argv[], int& status) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); @@ -522,7 +522,7 @@ BridgeService::start(int argc, char* argv[], int& status) { args = opts.parse(argc, const_cast(argv)); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { error(e.reason); usage(argv[0]); diff --git a/cpp/src/IceBridge/IceBridge.rc b/cpp/src/IceBridge/IceBridge.rc index dee1a87332e..8766c5ec9ee 100644 --- a/cpp/src/IceBridge/IceBridge.rc +++ b/cpp/src/IceBridge/IceBridge.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "icebridge\0" #define ICE_ORIGINALFILENAME "icebridge.exe\0" diff --git a/cpp/src/IceDB/IceDB.h b/cpp/src/IceDB/IceDB.h index 3a9ac09bc1a..a697e8fc849 100644 --- a/cpp/src/IceDB/IceDB.h +++ b/cpp/src/IceDB/IceDB.h @@ -5,8 +5,8 @@ #ifndef ICE_DB_H #define ICE_DB_H -#include "../IceUtil/Exception.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" +#include "Ice/Exception.h" #include "Ice/Initialize.h" #include "Ice/InputStream.h" #include "Ice/OutputStream.h" diff --git a/cpp/src/IceDB/IceDB.rc b/cpp/src/IceDB/IceDB.rc index 215400b7dc2..a06e4b30af7 100644 --- a/cpp/src/IceDB/IceDB.rc +++ b/cpp/src/IceDB/IceDB.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME ICE_LIBNAME("icedb") "\0" #define ICE_ORIGINALFILENAME ICE_LIBNAME("icedb") ".dll\0" diff --git a/cpp/src/IceDiscovery/IceDiscovery.rc b/cpp/src/IceDiscovery/IceDiscovery.rc index bb667455115..e00385285e5 100644 --- a/cpp/src/IceDiscovery/IceDiscovery.rc +++ b/cpp/src/IceDiscovery/IceDiscovery.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME ICE_LIBNAME("icediscovery") "\0" #define ICE_ORIGINALFILENAME ICE_LIBNAME("icediscovery") ".dll\0" diff --git a/cpp/src/IceDiscovery/LocatorI.cpp b/cpp/src/IceDiscovery/LocatorI.cpp index 1999e990b67..bd8c62dd1c4 100644 --- a/cpp/src/IceDiscovery/LocatorI.cpp +++ b/cpp/src/IceDiscovery/LocatorI.cpp @@ -9,7 +9,7 @@ #include "Ice/LocalException.h" #include "Ice/ObjectAdapter.h" -#include "../IceUtil/Random.h" +#include "../Ice/Random.h" #include @@ -136,7 +136,7 @@ LocatorRegistryI::findObject(const Ice::Identity& id) const return nullopt; } - IceUtilInternal::shuffle(adapterIds.begin(), adapterIds.end()); + IceInternal::shuffle(adapterIds.begin(), adapterIds.end()); return prx->ice_adapterId(adapterIds[0]); } diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp index e1a550b1130..69c10d0cb4c 100644 --- a/cpp/src/IceGrid/Activator.cpp +++ b/cpp/src/IceGrid/Activator.cpp @@ -4,7 +4,7 @@ #include "Activator.h" #include "../Ice/ArgVector.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "Ice/Ice.h" #include "IceGrid/Admin.h" #include "Internal.h" @@ -41,7 +41,6 @@ using namespace std; using namespace Ice; -using namespace IceInternal; using namespace IceGrid; #define ICE_STRING(X) #X @@ -357,7 +356,7 @@ Activator::activate( string pwd = simplify(pwdPath); #ifdef _WIN32 - if (!IceUtilInternal::isAbsolutePath(path)) + if (!IceInternal::isAbsolutePath(path)) { if (path.find('/') == string::npos) { @@ -431,7 +430,7 @@ Activator::activate( if (pwd.empty()) { string cwd; - if (IceUtilInternal::getcwd(cwd) == 0) + if (IceInternal::getcwd(cwd) == 0) { out << "pwd = " << cwd << "\n"; } diff --git a/cpp/src/IceGrid/AdapterCache.cpp b/cpp/src/IceGrid/AdapterCache.cpp index ddb37c324d2..5cd0cc8cc55 100644 --- a/cpp/src/IceGrid/AdapterCache.cpp +++ b/cpp/src/IceGrid/AdapterCache.cpp @@ -3,7 +3,7 @@ // #include "AdapterCache.h" -#include "../IceUtil/Random.h" +#include "../Ice/Random.h" #include "Ice/Communicator.h" #include "Ice/Locator.h" #include "Ice/LoggerUtil.h" @@ -654,7 +654,7 @@ ReplicaGroupEntry::getLocatorAdapterInfo( else if (dynamic_pointer_cast(_loadBalancing)) { replicas = _replicas; - IceUtilInternal::shuffle(replicas.begin(), replicas.end()); + IceInternal::shuffle(replicas.begin(), replicas.end()); loadSample = _loadSample; adaptive = true; } @@ -669,7 +669,7 @@ ReplicaGroupEntry::getLocatorAdapterInfo( else if (dynamic_pointer_cast(_loadBalancing)) { replicas = _replicas; - IceUtilInternal::shuffle(replicas.begin(), replicas.end()); + IceInternal::shuffle(replicas.begin(), replicas.end()); } } @@ -777,7 +777,7 @@ ReplicaGroupEntry::getLeastLoadedNodeLoad(LoadSample loadSample) const } else { - IceUtilInternal::shuffle(replicas.begin(), replicas.end()); + IceInternal::shuffle(replicas.begin(), replicas.end()); vector>> rl; transform( replicas.begin(), diff --git a/cpp/src/IceGrid/AllocatableObjectCache.cpp b/cpp/src/IceGrid/AllocatableObjectCache.cpp index ceed26d69a5..44c22c93c89 100644 --- a/cpp/src/IceGrid/AllocatableObjectCache.cpp +++ b/cpp/src/IceGrid/AllocatableObjectCache.cpp @@ -3,7 +3,7 @@ // #include "AllocatableObjectCache.h" -#include "../IceUtil/Random.h" +#include "../Ice/Random.h" #include "Ice/Communicator.h" #include "Ice/LocalException.h" #include "Ice/LoggerUtil.h" @@ -208,7 +208,7 @@ AllocatableObjectCache::allocateByType(const string& type, const shared_ptr> objects = p->second.getObjects(); - IceUtilInternal::shuffle(objects.begin(), objects.end()); // TODO: OPTIMIZE + IceInternal::shuffle(objects.begin(), objects.end()); // TODO: OPTIMIZE int allocatable = 0; try { diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp index 1d01e17f25c..d88b5c49507 100644 --- a/cpp/src/IceGrid/Client.cpp +++ b/cpp/src/IceGrid/Client.cpp @@ -2,9 +2,9 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" #include "../IceLocatorDiscovery/Plugin.h" -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" #include "FileParserI.h" #include "Glacier2/Router.h" #include "Ice/Ice.h" @@ -28,7 +28,6 @@ #endif using namespace std; -using namespace IceUtilInternal; using namespace IceInternal; class Client; @@ -187,19 +186,19 @@ run(const Ice::StringSeq& args) string commands; bool debug; - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); - opts.addOpt("e", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("i", "instanceName", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::NoRepeat); - opts.addOpt("H", "host", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::NoRepeat); - opts.addOpt("P", "port", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::NoRepeat); - opts.addOpt("u", "username", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::NoRepeat); - opts.addOpt("p", "password", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::NoRepeat); + opts.addOpt("e", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("i", "instanceName", IceInternal::Options::NeedArg, "", IceInternal::Options::NoRepeat); + opts.addOpt("H", "host", IceInternal::Options::NeedArg, "", IceInternal::Options::NoRepeat); + opts.addOpt("P", "port", IceInternal::Options::NeedArg, "", IceInternal::Options::NoRepeat); + opts.addOpt("u", "username", IceInternal::Options::NeedArg, "", IceInternal::Options::NoRepeat); + opts.addOpt("p", "password", IceInternal::Options::NeedArg, "", IceInternal::Options::NoRepeat); opts.addOpt("S", "ssl"); opts.addOpt("d", "debug"); opts.addOpt("s", "server"); - opts.addOpt("r", "replica", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::NoRepeat); + opts.addOpt("r", "replica", IceInternal::Options::NeedArg, "", IceInternal::Options::NoRepeat); try { @@ -210,7 +209,7 @@ run(const Ice::StringSeq& args) return 1; } } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << e.reason << endl; usage(args[0]); diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp index abbbd4ef543..467a4cc5a4f 100644 --- a/cpp/src/IceGrid/Database.cpp +++ b/cpp/src/IceGrid/Database.cpp @@ -4,7 +4,7 @@ #include "Database.h" #include "../Ice/Protocol.h" -#include "../IceUtil/Random.h" +#include "../Ice/Random.h" #include "DescriptorHelper.h" #include "Ice/Ice.h" #include "Ice/StringUtil.h" @@ -1774,7 +1774,7 @@ Database::getObjectByType(const string& type, const shared_ptr& { return nullopt; } - return objs[IceUtilInternal::random(static_cast(objs.size()))]; + return objs[IceInternal::random(static_cast(objs.size()))]; } optional @@ -1790,7 +1790,7 @@ Database::getObjectByTypeOnLeastLoadedNode( return nullopt; } - IceUtilInternal::shuffle(objs.begin(), objs.end()); + IceInternal::shuffle(objs.begin(), objs.end()); vector, float>> objectsWithLoad; objectsWithLoad.reserve(objs.size()); for (const auto& obj : objs) diff --git a/cpp/src/IceGrid/Database.h b/cpp/src/IceGrid/Database.h index d3555c198ae..b32b8851ec6 100644 --- a/cpp/src/IceGrid/Database.h +++ b/cpp/src/IceGrid/Database.h @@ -5,7 +5,7 @@ #ifndef ICE_GRID_DATABASE_H #define ICE_GRID_DATABASE_H -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "AdapterCache.h" #include "AllocatableObjectCache.h" #include "Ice/CommunicatorF.h" @@ -247,7 +247,7 @@ namespace IceGrid std::shared_ptr _adapterObserverTopic; std::shared_ptr _objectObserverTopic; - IceUtilInternal::FileLock _dbLock; + IceInternal::FileLock _dbLock; IceDB::Env _env; StringApplicationInfoMap _applications; diff --git a/cpp/src/IceGrid/DescriptorHelper.cpp b/cpp/src/IceGrid/DescriptorHelper.cpp index 0db196468ee..21af7adad3b 100644 --- a/cpp/src/IceGrid/DescriptorHelper.cpp +++ b/cpp/src/IceGrid/DescriptorHelper.cpp @@ -11,9 +11,8 @@ #include using namespace std; -using namespace IceInternal; using namespace Ice; -using namespace IceUtilInternal; +using namespace IceInternal; using namespace IceGrid; namespace diff --git a/cpp/src/IceGrid/DescriptorHelper.h b/cpp/src/IceGrid/DescriptorHelper.h index b695b2c5b02..882f22ce519 100644 --- a/cpp/src/IceGrid/DescriptorHelper.h +++ b/cpp/src/IceGrid/DescriptorHelper.h @@ -5,7 +5,7 @@ #ifndef ICE_GRID_DESCRIPTOR_HELPER_H #define ICE_GRID_DESCRIPTOR_HELPER_H -#include "../IceUtil/OutputUtil.h" +#include "../Ice/OutputUtil.h" #include "../IceXML/Parser.h" #include "IceGrid/Admin.h" #include "Internal.h" @@ -88,11 +88,11 @@ namespace IceGrid virtual void getIds(std::multiset&, std::multiset&) const; virtual void getReplicaGroups(std::set&) const; - void print(const Ice::CommunicatorPtr&, IceUtilInternal::Output&) const; + void print(const Ice::CommunicatorPtr&, IceInternal::Output&) const; protected: - void printObjectAdapter(const Ice::CommunicatorPtr&, IceUtilInternal::Output&, const AdapterDescriptor&) const; - void printPropertySet(IceUtilInternal::Output&, const PropertySetDescriptor&) const; + void printObjectAdapter(const Ice::CommunicatorPtr&, IceInternal::Output&, const AdapterDescriptor&) const; + void printPropertySet(IceInternal::Output&, const PropertySetDescriptor&) const; virtual std::string getProperty(const std::string&) const; void instantiateImpl(const std::shared_ptr&, const Resolver&) const; @@ -114,7 +114,7 @@ namespace IceGrid std::shared_ptr instantiate(const Resolver&, const PropertyDescriptorSeq&, const PropertySetDescriptorDict&) const; - void print(const Ice::CommunicatorPtr&, IceUtilInternal::Output&) const; + void print(const Ice::CommunicatorPtr&, IceInternal::Output&) const; protected: using CommunicatorHelper::instantiateImpl; @@ -142,13 +142,13 @@ namespace IceGrid virtual std::shared_ptr instantiate(const Resolver&, const PropertyDescriptorSeq&, const PropertySetDescriptorDict&) const; - void print(const Ice::CommunicatorPtr&, IceUtilInternal::Output&) const; - void print(const Ice::CommunicatorPtr&, IceUtilInternal::Output&, const ServerInfo&) const; + void print(const Ice::CommunicatorPtr&, IceInternal::Output&) const; + void print(const Ice::CommunicatorPtr&, IceInternal::Output&, const ServerInfo&) const; protected: using CommunicatorHelper::instantiateImpl; - void printImpl(const Ice::CommunicatorPtr&, IceUtilInternal::Output&, const ServerInfo&) const; + void printImpl(const Ice::CommunicatorPtr&, IceInternal::Output&, const ServerInfo&) const; void instantiateImpl(const std::shared_ptr&, const Resolver&, const PropertyDescriptorSeq&) const; @@ -179,7 +179,7 @@ namespace IceGrid void getIds(std::multiset&, std::multiset&) const; void getReplicaGroups(std::set&) const; - void print(const Ice::CommunicatorPtr&, IceUtilInternal::Output&) const; + void print(const Ice::CommunicatorPtr&, IceInternal::Output&) const; private: ServiceInstanceDescriptor _def; @@ -200,8 +200,8 @@ namespace IceGrid void getIds(std::multiset&, std::multiset&) const override; void getReplicaGroups(std::set&) const override; - void print(const Ice::CommunicatorPtr&, IceUtilInternal::Output&) const; - void print(const Ice::CommunicatorPtr&, IceUtilInternal::Output&, const ServerInfo&) const; + void print(const Ice::CommunicatorPtr&, IceInternal::Output&) const; + void print(const Ice::CommunicatorPtr&, IceInternal::Output&, const ServerInfo&) const; protected: void instantiateImpl( @@ -264,8 +264,8 @@ namespace IceGrid void getServerInfos(const std::string&, const std::string&, int, std::map&) const; bool hasServers() const; bool hasServer(const std::string&) const; - void print(IceUtilInternal::Output&) const; - void printDiff(IceUtilInternal::Output&, const NodeHelper&) const; + void print(IceInternal::Output&) const; + void printDiff(IceInternal::Output&, const NodeHelper&) const; private: NodeDescriptor instantiate(const Resolver&) const; @@ -294,8 +294,8 @@ namespace IceGrid const ApplicationDescriptor& getDefinition() const; const ApplicationDescriptor& getInstance() const; - void print(IceUtilInternal::Output&, const ApplicationInfo&) const; - void printDiff(IceUtilInternal::Output&, const ApplicationHelper&) const; + void print(IceInternal::Output&, const ApplicationInfo&) const; + void printDiff(IceInternal::Output&, const ApplicationHelper&) const; std::map getServerInfos(const std::string&, int) const; private: diff --git a/cpp/src/IceGrid/FileCache.cpp b/cpp/src/IceGrid/FileCache.cpp index 4b10cb8901a..f939dd7d774 100644 --- a/cpp/src/IceGrid/FileCache.cpp +++ b/cpp/src/IceGrid/FileCache.cpp @@ -5,7 +5,7 @@ #include "Ice/Communicator.h" #include "Ice/Properties.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "FileCache.h" #include "IceGrid/Exception.h" @@ -24,7 +24,7 @@ FileCache::FileCache(const shared_ptr& com) int64_t FileCache::getOffsetFromEnd(const string& file, int originalCount) { - ifstream is(IceUtilInternal::streamFilename(file).c_str()); // file is a UTF-8 string + ifstream is(IceInternal::streamFilename(file).c_str()); // file is a UTF-8 string if (is.fail()) { throw FileNotAvailableException("failed to open file `" + file + "'"); @@ -135,7 +135,7 @@ FileCache::read(const string& file, int64_t offset, int size, int64_t& newOffset throw FileNotAvailableException("maximum bytes per read request is too low"); } - ifstream is(IceUtilInternal::streamFilename(file).c_str()); // file is a UTF-8 string + ifstream is(IceInternal::streamFilename(file).c_str()); // file is a UTF-8 string if (is.fail()) { throw FileNotAvailableException("failed to open file `" + file + "'"); diff --git a/cpp/src/IceGrid/FileUserAccountMapperI.cpp b/cpp/src/IceGrid/FileUserAccountMapperI.cpp index 602d9402f29..5b62bb88c41 100644 --- a/cpp/src/IceGrid/FileUserAccountMapperI.cpp +++ b/cpp/src/IceGrid/FileUserAccountMapperI.cpp @@ -3,7 +3,7 @@ // #include "FileUserAccountMapperI.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "Ice/StringUtil.h" #include @@ -12,7 +12,7 @@ using namespace IceGrid; FileUserAccountMapperI::FileUserAccountMapperI(const string& filename) { - ifstream file(IceUtilInternal::streamFilename(filename).c_str()); // filename is a UTF-8 string + ifstream file(IceInternal::streamFilename(filename).c_str()); // filename is a UTF-8 string if (!file) { throw runtime_error("cannot open `" + filename + "' for reading: " + IceInternal::errorToString(errno)); diff --git a/cpp/src/IceGrid/IceGridAdmin.rc b/cpp/src/IceGrid/IceGridAdmin.rc index 299c8f30ca1..4eebdc86b26 100644 --- a/cpp/src/IceGrid/IceGridAdmin.rc +++ b/cpp/src/IceGrid/IceGridAdmin.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "icegridadmin\0" #define ICE_ORIGINALFILENAME "icegridadmin.exe\0" diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index 29a6f922bc3..45fb6f47ed0 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/FileUtil.h" #include "Activator.h" #include "DescriptorParser.h" #include "FileUserAccountMapperI.h" @@ -28,7 +28,6 @@ using namespace std; using namespace Ice; using namespace IceInternal; -using namespace IceUtilInternal; using namespace IceGrid; namespace @@ -322,7 +321,7 @@ NodeService::startImpl(int argc, char* argv[], int& status) } else { - if (!IceUtilInternal::directoryExists(dataPath)) + if (!IceInternal::directoryExists(dataPath)) { FileException ex(__FILE__, __LINE__, dataPath); ServiceError err(this); diff --git a/cpp/src/IceGrid/IceGridNode.rc b/cpp/src/IceGrid/IceGridNode.rc index 8fcaeb5176a..7903a7af2fe 100644 --- a/cpp/src/IceGrid/IceGridNode.rc +++ b/cpp/src/IceGrid/IceGridNode.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "icegridnode\0" #define ICE_ORIGINALFILENAME "icegridnode.exe\0" diff --git a/cpp/src/IceGrid/IceGridRegistry.cpp b/cpp/src/IceGrid/IceGridRegistry.cpp index 600c8b31997..e2325e9cbe7 100644 --- a/cpp/src/IceGrid/IceGridRegistry.cpp +++ b/cpp/src/IceGrid/IceGridRegistry.cpp @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" #include "Ice/Ice.h" #include "RegistryI.h" #include "TraceLevels.h" @@ -11,7 +11,7 @@ using namespace std; using namespace Ice; -using namespace IceUtilInternal; +using namespace IceInternal; using namespace IceGrid; namespace IceGrid @@ -50,19 +50,19 @@ RegistryService::start(int argc, char* argv[], int& status) bool readonly; std::string initFromReplica; - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); opts.addOpt("", "nowarn"); opts.addOpt("", "readonly"); - opts.addOpt("", "initdb-from-replica", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "initdb-from-replica", IceInternal::Options::NeedArg); vector args; try { args = opts.parse(argc, const_cast(argv)); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { error(e.reason); usage(argv[0]); diff --git a/cpp/src/IceGrid/IceGridRegistry.rc b/cpp/src/IceGrid/IceGridRegistry.rc index e863395b172..d5576d2de1c 100644 --- a/cpp/src/IceGrid/IceGridRegistry.rc +++ b/cpp/src/IceGrid/IceGridRegistry.rc @@ -1,6 +1,6 @@ #include "winver.h" -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "icegridregistry\0" #define ICE_ORIGINALFILENAME "icegridregistry.exe\0" diff --git a/cpp/src/IceGrid/InternalRegistryI.cpp b/cpp/src/IceGrid/InternalRegistryI.cpp index e2d616e1341..76b0c0db59a 100644 --- a/cpp/src/IceGrid/InternalRegistryI.cpp +++ b/cpp/src/IceGrid/InternalRegistryI.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/DisableWarnings.h" +#include "../Ice/DisableWarnings.h" #include "../Ice/SSL/RFC2253.h" #include "../Ice/SSL/SSLUtil.h" diff --git a/cpp/src/IceGrid/NodeI.cpp b/cpp/src/IceGrid/NodeI.cpp index 24003bfa8b0..ab6b63112df 100644 --- a/cpp/src/IceGrid/NodeI.cpp +++ b/cpp/src/IceGrid/NodeI.cpp @@ -3,7 +3,7 @@ // #include "NodeI.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "Activator.h" #include "Ice/Ice.h" #include "Ice/Timer.h" @@ -735,7 +735,7 @@ NodeI::canRemoveServerDirectory(const string& name) } } - if (IceUtilInternal::directoryExists(_serversDir + "/" + name + "/dbs")) + if (IceInternal::directoryExists(_serversDir + "/" + name + "/dbs")) { c = readDirectory(_serversDir + "/" + name + "/dbs"); for (Ice::StringSeq::const_iterator p = c.begin(); p != c.end(); ++p) @@ -757,7 +757,7 @@ NodeI::canRemoveServerDirectory(const string& name) } } - if (IceUtilInternal::directoryExists(_serversDir + "/" + name + "/data")) + if (IceInternal::directoryExists(_serversDir + "/" + name + "/data")) { if (!readDirectory(_serversDir + "/" + name + "/data").empty()) { diff --git a/cpp/src/IceGrid/ObjectCache.cpp b/cpp/src/IceGrid/ObjectCache.cpp index cfb16a29949..000b2a2e8cc 100644 --- a/cpp/src/IceGrid/ObjectCache.cpp +++ b/cpp/src/IceGrid/ObjectCache.cpp @@ -3,7 +3,7 @@ // #include "ObjectCache.h" -#include "../IceUtil/Random.h" +#include "../Ice/Random.h" #include "Ice/Communicator.h" #include "Ice/LocalException.h" #include "Ice/LoggerUtil.h" diff --git a/cpp/src/IceGrid/Parser.cpp b/cpp/src/IceGrid/Parser.cpp index 047a6710322..a2026729ca0 100644 --- a/cpp/src/IceGrid/Parser.cpp +++ b/cpp/src/IceGrid/Parser.cpp @@ -3,10 +3,10 @@ // #include "../IceXML/Parser.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/DisableWarnings.h" +#include "../Ice/Options.h" #include "../Ice/TimeUtil.h" -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/DisableWarnings.h" -#include "../IceUtil/Options.h" #include "DescriptorHelper.h" #include "DescriptorParser.h" #include "Ice/Ice.h" @@ -31,7 +31,6 @@ int yyparse(); using namespace std; using namespace Ice; -using namespace IceUtilInternal; using namespace IceInternal; using namespace IceGrid; @@ -425,7 +424,7 @@ Parser::addApplication(const list& origArgs) list copyArgs = origArgs; copyArgs.push_front("icegridadmin"); - IceUtilInternal::Options opts; + IceInternal::Options opts; vector args; try { @@ -435,7 +434,7 @@ Parser::addApplication(const list& origArgs) } args = opts.parse(args); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { error(e.reason); return; @@ -536,7 +535,7 @@ Parser::diffApplication(const list& origArgs) list copyArgs = origArgs; copyArgs.push_front("icegridadmin"); - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("s", "servers"); vector args; try @@ -547,7 +546,7 @@ Parser::diffApplication(const list& origArgs) } args = opts.parse(args); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { error(e.reason); return; @@ -653,7 +652,7 @@ Parser::updateApplication(const list& origArgs) list copyArgs = origArgs; copyArgs.push_front("icegridadmin"); - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("n", "no-restart"); vector args; try @@ -664,7 +663,7 @@ Parser::updateApplication(const list& origArgs) } args = opts.parse(args); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { error(e.reason); return; @@ -1995,10 +1994,10 @@ Parser::show(const string& reader, const list& origArgs) list copyArgs = origArgs; copyArgs.push_front("icegridadmin"); - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("f", "follow"); - opts.addOpt("h", "head", IceUtilInternal::Options::NeedArg); - opts.addOpt("t", "tail", IceUtilInternal::Options::NeedArg); + opts.addOpt("h", "head", IceInternal::Options::NeedArg); + opts.addOpt("t", "tail", IceInternal::Options::NeedArg); vector args; try @@ -2009,7 +2008,7 @@ Parser::show(const string& reader, const list& origArgs) } args = opts.parse(args); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { error(e.reason); return; diff --git a/cpp/src/IceGrid/PlatformInfo.cpp b/cpp/src/IceGrid/PlatformInfo.cpp index 53e8830d158..5814830d00b 100644 --- a/cpp/src/IceGrid/PlatformInfo.cpp +++ b/cpp/src/IceGrid/PlatformInfo.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "Ice/StringUtil.h" #include "Ice/Communicator.h" @@ -330,14 +330,14 @@ PlatformInfo::PlatformInfo( } string cwd; - if (IceUtilInternal::getcwd(cwd) != 0) + if (IceInternal::getcwd(cwd) != 0) { throw runtime_error("cannot get the current directory:\n" + IceInternal::lastErrorToString()); } _cwd = string(cwd); _dataDir = properties->getProperty(prefix + ".Data"); - if (!IceUtilInternal::isAbsolutePath(_dataDir)) + if (!IceInternal::isAbsolutePath(_dataDir)) { _dataDir = _cwd + '/' + _dataDir; } diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp index d5617c6d4fc..3b852524bbf 100644 --- a/cpp/src/IceGrid/RegistryI.cpp +++ b/cpp/src/IceGrid/RegistryI.cpp @@ -3,11 +3,11 @@ // #include "RegistryI.h" +#include "../Ice/FileUtil.h" #include "../Ice/Network.h" #include "../Ice/ProtocolPluginFacade.h" // Just to get the hostname #include "../Ice/SSL/SSLUtil.h" #include "../IceStorm/Service.h" -#include "../IceUtil/FileUtil.h" #include "AdminCallbackRouter.h" #include "AdminI.h" #include "AdminSessionI.h" @@ -305,7 +305,7 @@ RegistryI::startImpl() } else { - if (!IceUtilInternal::directoryExists(dbPath)) + if (!IceInternal::directoryExists(dbPath)) { Ice::SyscallException ex(__FILE__, __LINE__); Ice::Error out(_communicator->getLogger()); diff --git a/cpp/src/IceGrid/Scanner.cpp b/cpp/src/IceGrid/Scanner.cpp index 2eb290ff884..3bcf2680dbe 100644 --- a/cpp/src/IceGrid/Scanner.cpp +++ b/cpp/src/IceGrid/Scanner.cpp @@ -3,7 +3,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ScannerConfig.h" +#include "../Ice/ScannerConfig.h" #include #line 9 "src/IceGrid/Scanner.cpp" diff --git a/cpp/src/IceGrid/Scanner.l b/cpp/src/IceGrid/Scanner.l index 64357672190..b1e7904ca96 100644 --- a/cpp/src/IceGrid/Scanner.l +++ b/cpp/src/IceGrid/Scanner.l @@ -3,7 +3,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ScannerConfig.h" +#include "../Ice/ScannerConfig.h" #include } diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp index a9b669ff18d..4108cc55abc 100644 --- a/cpp/src/IceGrid/ServerCache.cpp +++ b/cpp/src/IceGrid/ServerCache.cpp @@ -3,7 +3,7 @@ // #include "ServerCache.h" -#include "../IceUtil/DisableWarnings.h" +#include "../Ice/DisableWarnings.h" #include "AdapterCache.h" #include "AllocatableObjectCache.h" #include "DescriptorHelper.h" diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index 9f8cf8362fe..1c28f6badf1 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -3,9 +3,9 @@ // #include "ServerI.h" +#include "../Ice/DisableWarnings.h" +#include "../Ice/FileUtil.h" #include "../Ice/TimeUtil.h" -#include "../IceUtil/DisableWarnings.h" -#include "../IceUtil/FileUtil.h" #include "Activator.h" #include "DescriptorHelper.h" #include "Ice/Ice.h" @@ -77,8 +77,8 @@ namespace IceGrid { name = path + "/" + name; - IceUtilInternal::structstat buf; - if (IceUtilInternal::stat(name, &buf) == -1) + IceInternal::structstat buf; + if (IceInternal::stat(name, &buf) == -1) { throw runtime_error("cannot stat `" + name + "':\n" + IceInternal::lastErrorToString()); } @@ -2065,7 +2065,7 @@ ServerI::updateImpl(const shared_ptr& descriptor) for (const auto& log : _desc->logs) { string path = simplify(log); - if (IceUtilInternal::isAbsolutePath(path)) + if (IceInternal::isAbsolutePath(path)) { _logs.push_back(path); } @@ -2119,7 +2119,7 @@ ServerI::updateImpl(const shared_ptr& descriptor) const string configFilePath = _serverDir + "/config/" + prop.first; ofstream configfile( - IceUtilInternal::streamFilename(configFilePath).c_str()); // configFilePath is a UTF-8 string + IceInternal::streamFilename(configFilePath).c_str()); // configFilePath is a UTF-8 string if (!configfile.good()) { throw runtime_error("couldn't create configuration file: " + configFilePath); @@ -2234,7 +2234,7 @@ ServerI::checkRevision(const string& replicaName, const string& uuid, int revisi else { string idFilePath = _serverDir + "/revision"; - ifstream is(IceUtilInternal::streamFilename(idFilePath).c_str()); // idFilePath is a UTF-8 string + ifstream is(IceInternal::streamFilename(idFilePath).c_str()); // idFilePath is a UTF-8 string if (!is.good()) { return; @@ -2437,7 +2437,7 @@ ServerI::updateRevision(const string& uuid, int revision) } string idFilePath = _serverDir + "/revision"; - ofstream os(IceUtilInternal::streamFilename(idFilePath).c_str()); // idFilePath is a UTF-8 string + ofstream os(IceInternal::streamFilename(idFilePath).c_str()); // idFilePath is a UTF-8 string if (os.good()) { os << "#" << endl; @@ -2902,7 +2902,7 @@ ServerI::getFilePath(const string& filename) const else if (!filename.empty() && filename[0] == '#') { string path = simplify(filename.substr(1)); - if (!IceUtilInternal::isAbsolutePath(path)) + if (!IceInternal::isAbsolutePath(path)) { path = _node->getPlatformInfo().getCwd() + "/" + path; } diff --git a/cpp/src/IceGrid/Util.cpp b/cpp/src/IceGrid/Util.cpp index 866184693e8..da6387a0f6b 100644 --- a/cpp/src/IceGrid/Util.cpp +++ b/cpp/src/IceGrid/Util.cpp @@ -3,7 +3,7 @@ // #include "Util.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "Ice/Ice.h" #include "Ice/StringUtil.h" #include "IceGrid/Admin.h" @@ -371,7 +371,7 @@ IceGrid::createDirectory(const string& pa) { const string path = simplify(pa); - if (IceUtilInternal::mkdir(path, 0777) == -1) + if (IceInternal::mkdir(path, 0777) == -1) { if (errno != EEXIST) { @@ -466,15 +466,15 @@ IceGrid::remove(const string& pa) { const string path = simplify(pa); - IceUtilInternal::structstat buf; - if (IceUtilInternal::stat(path, &buf) == -1) + IceInternal::structstat buf; + if (IceInternal::stat(path, &buf) == -1) { throw runtime_error("cannot stat `" + path + "':\n" + IceInternal::lastErrorToString()); } if (S_ISDIR(buf.st_mode)) { - if (IceUtilInternal::rmdir(path) == -1) + if (IceInternal::rmdir(path) == -1) { if (errno == EACCES) { @@ -485,7 +485,7 @@ IceGrid::remove(const string& pa) } else { - if (IceUtilInternal::remove(path) == -1) + if (IceInternal::remove(path) == -1) { throw runtime_error("cannot remove file `" + path + "':\n" + IceInternal::lastErrorToString()); } @@ -497,8 +497,8 @@ IceGrid::removeRecursive(const string& pa) { const string path = simplify(pa); - IceUtilInternal::structstat buf; - if (IceUtilInternal::stat(path, &buf) == -1) + IceInternal::structstat buf; + if (IceInternal::stat(path, &buf) == -1) { throw runtime_error("cannot stat `" + path + "':\n" + IceInternal::lastErrorToString()); } @@ -513,7 +513,7 @@ IceGrid::removeRecursive(const string& pa) if (!isRoot(path)) { - if (IceUtilInternal::rmdir(path) == -1) + if (IceInternal::rmdir(path) == -1) { throw runtime_error("cannot remove directory `" + path + "':\n" + IceInternal::lastErrorToString()); } @@ -521,7 +521,7 @@ IceGrid::removeRecursive(const string& pa) } else { - if (IceUtilInternal::remove(path) == -1) + if (IceInternal::remove(path) == -1) { throw runtime_error("cannot remove file `" + path + "':\n" + IceInternal::lastErrorToString()); } diff --git a/cpp/src/IceGrid/Util.h b/cpp/src/IceGrid/Util.h index bfcfeef2892..385386cb048 100644 --- a/cpp/src/IceGrid/Util.h +++ b/cpp/src/IceGrid/Util.h @@ -5,7 +5,7 @@ #ifndef ICE_GRID_UTIL_H #define ICE_GRID_UTIL_H -#include "../IceUtil/Random.h" +#include "../Ice/Random.h" #include "Ice/BuiltinSequences.h" #include "Ice/StringUtil.h" #include "IceGrid/Admin.h" diff --git a/cpp/src/IceGridLib/IceGrid.rc b/cpp/src/IceGridLib/IceGrid.rc index 4ed310c5ec8..22dfc0d4ab1 100644 --- a/cpp/src/IceGridLib/IceGrid.rc +++ b/cpp/src/IceGridLib/IceGrid.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME ICE_LIBNAME("icegrid") "\0" #define ICE_ORIGINALFILENAME ICE_LIBNAME("icegrid") ".dll\0" diff --git a/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.rc b/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.rc index 7c4ee9ac850..20a800faa05 100644 --- a/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.rc +++ b/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME ICE_LIBNAME("icelocatordiscovery") "\0" #define ICE_ORIGINALFILENAME ICE_LIBNAME("icelocatordiscovery") ".dll\0" diff --git a/cpp/src/IceStorm/Admin.cpp b/cpp/src/IceStorm/Admin.cpp index 8833dc14f04..431da11f097 100644 --- a/cpp/src/IceStorm/Admin.cpp +++ b/cpp/src/IceStorm/Admin.cpp @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" #include "Ice/Ice.h" #include "Parser.h" @@ -14,7 +14,6 @@ using namespace std; using namespace IceInternal; -using namespace IceUtilInternal; int run(const shared_ptr&, const Ice::StringSeq&); @@ -74,10 +73,10 @@ run(const shared_ptr& communicator, const Ice::StringSeq& arg string commands; bool debug; - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); - opts.addOpt("e", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + opts.addOpt("e", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); opts.addOpt("d", "debug"); try @@ -89,7 +88,7 @@ run(const shared_ptr& communicator, const Ice::StringSeq& arg return 1; } } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << e.reason << endl; usage(args[0]); diff --git a/cpp/src/IceStorm/IceStormAdmin.rc b/cpp/src/IceStorm/IceStormAdmin.rc index 6dea83e8b44..57a299da056 100644 --- a/cpp/src/IceStorm/IceStormAdmin.rc +++ b/cpp/src/IceStorm/IceStormAdmin.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "icestormadmin\0" #define ICE_ORIGINALFILENAME "icestormadmin.exe\0" diff --git a/cpp/src/IceStorm/IceStormDB.cpp b/cpp/src/IceStorm/IceStormDB.cpp index 3d53722dc66..fe484002498 100644 --- a/cpp/src/IceStorm/IceStormDB.cpp +++ b/cpp/src/IceStorm/IceStormDB.cpp @@ -2,10 +2,10 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // +#include "../Ice/ConsoleUtil.h" +#include "../Ice/FileUtil.h" +#include "../Ice/Options.h" #include "../IceDB/IceDB.h" -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/FileUtil.h" -#include "../IceUtil/Options.h" #include "DBTypes.h" #include "Ice/Ice.h" #include "Ice/StringUtil.h" @@ -15,7 +15,6 @@ using namespace std; using namespace IceInternal; -using namespace IceUtilInternal; int run(const shared_ptr&, const Ice::StringSeq&); @@ -62,15 +61,15 @@ usage(const string& name) int run(const shared_ptr& communicator, const Ice::StringSeq& args) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); opts.addOpt("d", "debug"); - opts.addOpt("", "import", IceUtilInternal::Options::NeedArg); - opts.addOpt("", "export", IceUtilInternal::Options::NeedArg); - opts.addOpt("", "dbhome", IceUtilInternal::Options::NeedArg); - opts.addOpt("", "dbpath", IceUtilInternal::Options::NeedArg); - opts.addOpt("", "mapsize", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "import", IceInternal::Options::NeedArg); + opts.addOpt("", "export", IceInternal::Options::NeedArg); + opts.addOpt("", "dbhome", IceInternal::Options::NeedArg); + opts.addOpt("", "dbpath", IceInternal::Options::NeedArg); + opts.addOpt("", "mapsize", IceInternal::Options::NeedArg); try { @@ -81,7 +80,7 @@ run(const shared_ptr& communicator, const Ice::StringSeq& arg return 1; } } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << args[0] << ": " << e.reason << endl; usage(args[0]); @@ -140,19 +139,19 @@ run(const shared_ptr& communicator, const Ice::StringSeq& arg { consoleOut << "Importing database to directory " << dbPath << " from file " << dbFile << endl; - if (!IceUtilInternal::directoryExists(dbPath)) + if (!IceInternal::directoryExists(dbPath)) { consoleErr << args[0] << ": output directory does not exist: " << dbPath << endl; return 1; } - if (!IceUtilInternal::isEmptyDirectory(dbPath)) + if (!IceInternal::isEmptyDirectory(dbPath)) { consoleErr << args[0] << ": output directory is not empty: " << dbPath << endl; return 1; } - ifstream fs(IceUtilInternal::streamFilename(dbFile).c_str(), ios::binary); + ifstream fs(IceInternal::streamFilename(dbFile).c_str(), ios::binary); if (fs.fail()) { consoleErr << args[0] << ": could not open input file: " << IceInternal::errorToString(errno) << endl; @@ -308,7 +307,7 @@ run(const shared_ptr& communicator, const Ice::StringSeq& arg stream.write(ICE_INT_VERSION); stream.write(data); - ofstream fs(IceUtilInternal::streamFilename(dbFile).c_str(), ios::binary); + ofstream fs(IceInternal::streamFilename(dbFile).c_str(), ios::binary); if (fs.fail()) { consoleErr << args[0] << ": could not open output file: " << IceInternal::errorToString(errno) << endl; diff --git a/cpp/src/IceStorm/IceStormDB.rc b/cpp/src/IceStorm/IceStormDB.rc index 148de2c29cb..c7b67d677dd 100644 --- a/cpp/src/IceStorm/IceStormDB.rc +++ b/cpp/src/IceStorm/IceStormDB.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "icestormdb\0" #define ICE_ORIGINALFILENAME "icestormdb.exe\0" diff --git a/cpp/src/IceStorm/IceStormService.rc b/cpp/src/IceStorm/IceStormService.rc index 643f4894ab3..1aca36366dd 100644 --- a/cpp/src/IceStorm/IceStormService.rc +++ b/cpp/src/IceStorm/IceStormService.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME ICE_LIBNAME("icestormservice") "\0" #define ICE_ORIGINALFILENAME ICE_LIBNAME("icestormservice") ".dll\0" diff --git a/cpp/src/IceStorm/Instance.h b/cpp/src/IceStorm/Instance.h index 09d3b10868e..355d3ac1642 100644 --- a/cpp/src/IceStorm/Instance.h +++ b/cpp/src/IceStorm/Instance.h @@ -127,7 +127,7 @@ namespace IceStorm void destroy() override; private: - IceUtilInternal::FileLock _dbLock; + IceInternal::FileLock _dbLock; IceDB::Env _dbEnv; LLUMap _lluMap; SubscriberMap _subscriberMap; diff --git a/cpp/src/IceStorm/Parser.cpp b/cpp/src/IceStorm/Parser.cpp index 8c74a962466..aebd56e5886 100644 --- a/cpp/src/IceStorm/Parser.cpp +++ b/cpp/src/IceStorm/Parser.cpp @@ -3,8 +3,8 @@ // #include "Parser.h" -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/DisableWarnings.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/DisableWarnings.h" #include "Ice/Ice.h" #include "IceStormInternal.h" #include @@ -24,7 +24,6 @@ int yyparse(); using namespace std; using namespace Ice; using namespace IceInternal; -using namespace IceUtilInternal; using namespace IceStorm; namespace IceStorm diff --git a/cpp/src/IceStorm/Scanner.cpp b/cpp/src/IceStorm/Scanner.cpp index 5c09f98a17d..5c369d5ca52 100644 --- a/cpp/src/IceStorm/Scanner.cpp +++ b/cpp/src/IceStorm/Scanner.cpp @@ -3,7 +3,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ScannerConfig.h" +#include "../Ice/ScannerConfig.h" #include #line 9 "src/IceStorm/Scanner.cpp" diff --git a/cpp/src/IceStorm/Scanner.l b/cpp/src/IceStorm/Scanner.l index afa9c888f2e..827681bd440 100644 --- a/cpp/src/IceStorm/Scanner.l +++ b/cpp/src/IceStorm/Scanner.l @@ -3,7 +3,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ScannerConfig.h" +#include "../Ice/ScannerConfig.h" #include } diff --git a/cpp/src/IceStormLib/IceStorm.rc b/cpp/src/IceStormLib/IceStorm.rc index 949c026c5b5..d33c6878597 100644 --- a/cpp/src/IceStormLib/IceStorm.rc +++ b/cpp/src/IceStormLib/IceStorm.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME ICE_LIBNAME("icestorm") "\0" #define ICE_ORIGINALFILENAME ICE_LIBNAME("icestorm") ".dll\0" diff --git a/cpp/src/IceUtil/Makefile.mk b/cpp/src/IceUtil/Makefile.mk index 50f9066986b..bb275e01935 100644 --- a/cpp/src/IceUtil/Makefile.mk +++ b/cpp/src/IceUtil/Makefile.mk @@ -2,12 +2,23 @@ # Copyright (c) ZeroC, Inc. All rights reserved. # +# The IceUtil is a static library with a subset of the Ice library, used to build the Slice compilers. + $(project)_libraries = IceUtil IceUtil_targetdir := $(libdir) IceUtil_cppflags := $(if $(filter yes,$(libbacktrace)),-DICE_LIBBACKTRACE) -IceUtil_extra_sources := src/Ice/CtrlCHandler.cpp src/Ice/StringConverter.cpp src/StringUtil.cpp src/Ice/UtilException.cpp src/Ice/UUID.cpp +IceUtil_extra_sources := src/Ice/ConsoleUtil.cpp \ + src/Ice/CtrlCHandler.cpp \ + src/Ice/FileUtil.cpp \ + src/Ice/Options.cpp \ + src/Ice/OutputUtil.cpp \ + src/Ice/Random.cpp \ + src/Ice/StringConverter.cpp \ + src/Ice/StringUtil.cpp \ + src/Ice/UtilException.cpp \ + src/Ice/UUID.cpp # Always enable the static configuration for the IceUtil library and never # install it. diff --git a/cpp/src/IceUtil/msbuild/iceutil/iceutil.vcxproj b/cpp/src/IceUtil/msbuild/iceutil/iceutil.vcxproj index 6fe44783cfd..f6c233bc056 100644 --- a/cpp/src/IceUtil/msbuild/iceutil/iceutil.vcxproj +++ b/cpp/src/IceUtil/msbuild/iceutil/iceutil.vcxproj @@ -86,14 +86,14 @@ - + - + - - - + + + @@ -103,18 +103,18 @@ - - - - - - - - - - + + + + + + + + + + - \ No newline at end of file + diff --git a/cpp/src/IceUtil/msbuild/iceutil/iceutil.vcxproj.filters b/cpp/src/IceUtil/msbuild/iceutil/iceutil.vcxproj.filters index 320639efd63..e102e0a17b5 100644 --- a/cpp/src/IceUtil/msbuild/iceutil/iceutil.vcxproj.filters +++ b/cpp/src/IceUtil/msbuild/iceutil/iceutil.vcxproj.filters @@ -21,13 +21,13 @@ Source Files - + Source Files - + Source Files - + Source Files @@ -36,45 +36,45 @@ Source Files - + Source Files Source Files - + Source Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files @@ -93,4 +93,4 @@ Header Files - \ No newline at end of file + diff --git a/cpp/src/IceXML/IceXML.rc b/cpp/src/IceXML/IceXML.rc index d3f304ab77b..8315186e6e2 100644 --- a/cpp/src/IceXML/IceXML.rc +++ b/cpp/src/IceXML/IceXML.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME ICE_LIBNAME("icexml") "\0" #define ICE_ORIGINALFILENAME ICE_LIBNAME("icexml") ".dll\0" diff --git a/cpp/src/IceXML/Parser.cpp b/cpp/src/IceXML/Parser.cpp index efb53d33d80..ec24e4c8e4f 100644 --- a/cpp/src/IceXML/Parser.cpp +++ b/cpp/src/IceXML/Parser.cpp @@ -3,7 +3,7 @@ // #include "Parser.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include @@ -356,7 +356,7 @@ IceXML::Parser::parse(istream& in) void IceXML::Parser::parse(const string& file, Handler& handler) // The given filename must be UTF-8 encoded { - ifstream in(IceUtilInternal::streamFilename(file).c_str()); + ifstream in(IceInternal::streamFilename(file).c_str()); if (!in.good()) { ostringstream out; diff --git a/cpp/src/Slice/FileTracker.cpp b/cpp/src/Slice/FileTracker.cpp index 702b5c6b258..7d811a51771 100644 --- a/cpp/src/Slice/FileTracker.cpp +++ b/cpp/src/Slice/FileTracker.cpp @@ -3,12 +3,12 @@ // #include "FileTracker.h" -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/FileUtil.h" #include -using namespace IceUtilInternal; +using namespace IceInternal; using namespace std; Slice::FileException::FileException(const char* file, int line, const string& r) @@ -93,11 +93,11 @@ Slice::FileTracker::cleanup() { if (!p->second) { - IceUtilInternal::unlink(p->first); + IceInternal::unlink(p->first); } else { - IceUtilInternal::rmdir(p->first); + IceInternal::rmdir(p->first); } } } diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp index a270da17e6c..3109b0e4860 100644 --- a/cpp/src/Slice/Preprocessor.cpp +++ b/cpp/src/Slice/Preprocessor.cpp @@ -3,8 +3,8 @@ // #include "Preprocessor.h" -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/FileUtil.h" #include "Ice/StringConverter.h" #include "Ice/StringUtil.h" #include "Ice/UUID.h" @@ -25,7 +25,6 @@ using namespace std; using namespace Slice; using namespace IceInternal; -using namespace IceUtilInternal; // // mcpp defines @@ -249,7 +248,7 @@ Slice::Preprocessor::preprocess(bool keepComments, const vector& extraAr { _cppFile = Ice::wstringToString(name); free(name); - _cppHandle = IceUtilInternal::fopen(_cppFile, "w+"); + _cppHandle = IceInternal::fopen(_cppFile, "w+"); } #else _cppHandle = tmpfile(); @@ -265,7 +264,7 @@ Slice::Preprocessor::preprocess(bool keepComments, const vector& extraAr #else _cppFile = ".slice-" + Ice::generateUUID(); #endif - _cppHandle = IceUtilInternal::fopen(_cppFile, "w+"); + _cppHandle = IceInternal::fopen(_cppFile, "w+"); } if (_cppHandle != 0) @@ -458,7 +457,7 @@ Slice::Preprocessor::printMakefileDependencies( string file = IceInternal::trim(unprocessed.substr(pos, end - pos)); if (file.rfind(".ice") == file.size() - 4) { - if (IceUtilInternal::isAbsolutePath(file)) + if (IceInternal::isAbsolutePath(file)) { if (file == _fileName) { @@ -477,7 +476,7 @@ Slice::Preprocessor::printMakefileDependencies( { string s = includePaths[static_cast(p - fullIncludePaths.begin())] + file.substr(p->length()); - if (IceUtilInternal::isAbsolutePath(newFile) || s.size() < newFile.size()) + if (IceInternal::isAbsolutePath(newFile) || s.size() < newFile.size()) { newFile = s; } @@ -762,7 +761,7 @@ Slice::Preprocessor::close() if (_cppFile.size() != 0) { - IceUtilInternal::unlink(_cppFile); + IceInternal::unlink(_cppFile); } if (status != 0) @@ -790,7 +789,7 @@ Slice::Preprocessor::checkInputFile() return false; } - ifstream test(IceUtilInternal::streamFilename(_fileName).c_str()); + ifstream test(IceInternal::streamFilename(_fileName).c_str()); if (!test) { consoleErr << _path << ": error: cannot open `" << _fileName << "' for reading" << endl; diff --git a/cpp/src/Slice/Scanner.cpp b/cpp/src/Slice/Scanner.cpp index 623b60b3cbd..21b3668af3e 100644 --- a/cpp/src/Slice/Scanner.cpp +++ b/cpp/src/Slice/Scanner.cpp @@ -3,7 +3,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ScannerConfig.h" +#include "../Ice/ScannerConfig.h" #include #line 9 "src/Slice/Scanner.cpp" diff --git a/cpp/src/Slice/Scanner.l b/cpp/src/Slice/Scanner.l index b0fddabf238..d3f3423bb0a 100644 --- a/cpp/src/Slice/Scanner.l +++ b/cpp/src/Slice/Scanner.l @@ -3,7 +3,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ScannerConfig.h" +#include "../Ice/ScannerConfig.h" #include } diff --git a/cpp/src/Slice/SliceUtil.cpp b/cpp/src/Slice/SliceUtil.cpp index 9053966953f..e962dabe608 100644 --- a/cpp/src/Slice/SliceUtil.cpp +++ b/cpp/src/Slice/SliceUtil.cpp @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/FileUtil.h" #include "FileTracker.h" #include "Ice/StringConverter.h" #include "Ice/StringUtil.h" @@ -19,7 +19,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -96,10 +96,10 @@ Slice::fullPath(const string& path) // string result = path; - if (!IceUtilInternal::isAbsolutePath(result)) + if (!IceInternal::isAbsolutePath(result)) { string cwd; - if (IceUtilInternal::getcwd(cwd) == 0) + if (IceInternal::getcwd(cwd) == 0) { result = string(cwd) + '/' + result; } @@ -132,7 +132,7 @@ Slice::fullPath(const string& path) { buf[len] = '\0'; string linkpath = buf; - if (!IceUtilInternal::isAbsolutePath(linkpath)) // Path relative to the location of the link + if (!IceInternal::isAbsolutePath(linkpath)) // Path relative to the location of the link { string::size_type pos = subpath.rfind('/'); assert(pos != string::npos); @@ -353,7 +353,7 @@ Slice::filterMcppWarnings(const string& message) } void -Slice::printGeneratedHeader(IceUtilInternal::Output& out, const string& path, const string& comment) +Slice::printGeneratedHeader(IceInternal::Output& out, const string& path, const string& comment) { // // Get only the file name part of the given path. @@ -386,7 +386,7 @@ Slice::writeDependencies(const string& dependencies, const string& dependFile) } else { - ofstream of(IceUtilInternal::streamFilename(dependFile).c_str()); // dependFile is a UTF-8 string + ofstream of(IceInternal::streamFilename(dependFile).c_str()); // dependFile is a UTF-8 string if (!of) { ostringstream os; diff --git a/cpp/src/Slice/StringLiteralUtil.cpp b/cpp/src/Slice/StringLiteralUtil.cpp index 0735179aefc..dbdbe3cf93f 100644 --- a/cpp/src/Slice/StringLiteralUtil.cpp +++ b/cpp/src/Slice/StringLiteralUtil.cpp @@ -13,7 +13,6 @@ using namespace std; using namespace Slice; using namespace Ice; -using namespace IceUtilInternal; using namespace IceInternal; namespace diff --git a/cpp/src/Slice/Util.h b/cpp/src/Slice/Util.h index cb491c8f934..6efe6ac1df3 100644 --- a/cpp/src/Slice/Util.h +++ b/cpp/src/Slice/Util.h @@ -5,7 +5,7 @@ #ifndef SLICE_UTIL_H #define SLICE_UTIL_H -#include "../IceUtil/OutputUtil.h" +#include "../Ice/OutputUtil.h" #include "Parser.h" namespace Slice @@ -19,7 +19,7 @@ namespace Slice void emitWarning(const std::string&, const std::string&, const std::string&); void emitRaw(const char*); std::vector filterMcppWarnings(const std::string&); - void printGeneratedHeader(IceUtilInternal::Output& out, const std::string&, const std::string& commentStyle = "//"); + void printGeneratedHeader(IceInternal::Output& out, const std::string&, const std::string& commentStyle = "//"); #ifdef _WIN32 std::vector argvToArgs(int argc, wchar_t* argv[]); #else diff --git a/cpp/src/ice2slice/Gen.cpp b/cpp/src/ice2slice/Gen.cpp index ed756f1b4c2..470f3b44dc0 100644 --- a/cpp/src/ice2slice/Gen.cpp +++ b/cpp/src/ice2slice/Gen.cpp @@ -14,7 +14,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -659,7 +659,7 @@ Gen::TypesVisitor::visitEnum(const EnumPtr& p) out << nl; } -IceUtilInternal::Output& +IceInternal::Output& Gen::TypesVisitor::getOutput(const ContainedPtr& contained) { string scopedName = contained->scope(); diff --git a/cpp/src/ice2slice/Gen.h b/cpp/src/ice2slice/Gen.h index b6fc0db11bf..985a9b62e31 100644 --- a/cpp/src/ice2slice/Gen.h +++ b/cpp/src/ice2slice/Gen.h @@ -5,7 +5,7 @@ #ifndef GEN_H #define GEN_H -#include "../IceUtil/OutputUtil.h" +#include "../Ice/OutputUtil.h" #include "../Slice/Parser.h" #include @@ -53,11 +53,11 @@ namespace Slice virtual void visitEnum(const EnumPtr&); private: - IceUtilInternal::Output& getOutput(const ContainedPtr&); + IceInternal::Output& getOutput(const ContainedPtr&); std::string _fileBase; std::set _modules; - std::map _outputs; + std::map _outputs; }; }; } diff --git a/cpp/src/ice2slice/Ice2Slice.rc b/cpp/src/ice2slice/Ice2Slice.rc index 444e9096708..35295b05344 100644 --- a/cpp/src/ice2slice/Ice2Slice.rc +++ b/cpp/src/ice2slice/Ice2Slice.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "ice2slice\0" #define ICE_ORIGINALFILENAME "ice2slice.exe\0" diff --git a/cpp/src/ice2slice/Main.cpp b/cpp/src/ice2slice/Main.cpp index 8f61d7a1454..946c4aaee39 100644 --- a/cpp/src/ice2slice/Main.cpp +++ b/cpp/src/ice2slice/Main.cpp @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" #include "../Slice/FileTracker.h" #include "../Slice/Preprocessor.h" #include "../Slice/Util.h" @@ -16,7 +16,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -51,15 +51,15 @@ usage(const string& n) int compile(const vector& argv) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); opts.addOpt("", "validate"); - opts.addOpt("D", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("U", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + opts.addOpt("D", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("U", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("I", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); opts.addOpt("E"); - opts.addOpt("", "output-dir", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "output-dir", IceInternal::Options::NeedArg); opts.addOpt("d", "debug"); bool validate = find(argv.begin(), argv.end(), "--validate") != argv.end(); @@ -69,7 +69,7 @@ compile(const vector& argv) { args = opts.parse(argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << argv[0] << ": error: " << e.reason << endl; if (!validate) diff --git a/cpp/src/icegriddb/IceGridDB.cpp b/cpp/src/icegriddb/IceGridDB.cpp index 6af2b9a2a77..a262c30c509 100644 --- a/cpp/src/icegriddb/IceGridDB.cpp +++ b/cpp/src/icegriddb/IceGridDB.cpp @@ -2,11 +2,11 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // +#include "../Ice/ConsoleUtil.h" +#include "../Ice/DisableWarnings.h" +#include "../Ice/FileUtil.h" +#include "../Ice/Options.h" #include "../IceDB/IceDB.h" -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/DisableWarnings.h" -#include "../IceUtil/FileUtil.h" -#include "../IceUtil/Options.h" #include "DBTypes.h" #include "Ice/Ice.h" #include "Ice/StringUtil.h" @@ -17,7 +17,6 @@ using namespace std; using namespace IceInternal; -using namespace IceUtilInternal; namespace { @@ -103,16 +102,16 @@ usage(const string& name) int run(const Ice::StringSeq& args) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); opts.addOpt("d", "debug"); - opts.addOpt("", "import", IceUtilInternal::Options::NeedArg); - opts.addOpt("", "export", IceUtilInternal::Options::NeedArg); - opts.addOpt("", "dbhome", IceUtilInternal::Options::NeedArg); - opts.addOpt("", "dbpath", IceUtilInternal::Options::NeedArg); - opts.addOpt("", "mapsize", IceUtilInternal::Options::NeedArg); - opts.addOpt("", "server-version", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "import", IceInternal::Options::NeedArg); + opts.addOpt("", "export", IceInternal::Options::NeedArg); + opts.addOpt("", "dbhome", IceInternal::Options::NeedArg); + opts.addOpt("", "dbpath", IceInternal::Options::NeedArg); + opts.addOpt("", "mapsize", IceInternal::Options::NeedArg); + opts.addOpt("", "server-version", IceInternal::Options::NeedArg); try { @@ -123,7 +122,7 @@ run(const Ice::StringSeq& args) return 1; } } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << args[0] << ": " << e.reason << endl; usage(args[0]); @@ -186,19 +185,19 @@ run(const Ice::StringSeq& args) { consoleOut << "Importing database to directory `" << dbPath << "' from file `" << dbFile << "'" << endl; - if (!IceUtilInternal::directoryExists(dbPath)) + if (!IceInternal::directoryExists(dbPath)) { consoleErr << args[0] << ": output directory does not exist: " << dbPath << endl; return 1; } - if (!IceUtilInternal::isEmptyDirectory(dbPath)) + if (!IceInternal::isEmptyDirectory(dbPath)) { consoleErr << args[0] << ": output directory is not empty: " << dbPath << endl; return 1; } - ifstream fs(IceUtilInternal::streamFilename(dbFile).c_str(), ios::binary); + ifstream fs(IceInternal::streamFilename(dbFile).c_str(), ios::binary); if (fs.fail()) { consoleErr << args[0] << ": could not open input file: " << IceInternal::errorToString(errno) << endl; @@ -502,7 +501,7 @@ run(const Ice::StringSeq& args) stream.write(ICE_INT_VERSION); stream.write(data); - ofstream fs(IceUtilInternal::streamFilename(dbFile).c_str(), ios::binary); + ofstream fs(IceInternal::streamFilename(dbFile).c_str(), ios::binary); if (fs.fail()) { consoleErr << args[0] << ": could not open output file: " << IceInternal::errorToString(errno) << endl; diff --git a/cpp/src/icegriddb/IceGridDB.rc b/cpp/src/icegriddb/IceGridDB.rc index e9b7e8a9b05..776ec93682a 100644 --- a/cpp/src/icegriddb/IceGridDB.rc +++ b/cpp/src/icegriddb/IceGridDB.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "icegriddb\0" #define ICE_ORIGINALFILENAME "icegriddb.exe\0" diff --git a/cpp/src/iceserviceinstall/IceServiceInstall.rc b/cpp/src/iceserviceinstall/IceServiceInstall.rc index 542d585fcde..f227658837b 100644 --- a/cpp/src/iceserviceinstall/IceServiceInstall.rc +++ b/cpp/src/iceserviceinstall/IceServiceInstall.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "iceserviceinstall\0" #define ICE_ORIGINALFILENAME "iceserviceinstall.exe\0" diff --git a/cpp/src/iceserviceinstall/Install.cpp b/cpp/src/iceserviceinstall/Install.cpp index 2328dfae265..8fc7d521204 100644 --- a/cpp/src/iceserviceinstall/Install.cpp +++ b/cpp/src/iceserviceinstall/Install.cpp @@ -2,14 +2,13 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" #include "Ice/Ice.h" #include "ServiceInstaller.h" using namespace std; using namespace IceInternal; -using namespace IceUtilInternal; int run(const Ice::StringSeq&); @@ -107,7 +106,7 @@ usage(const string& name) int run(const Ice::StringSeq& args) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); opts.addOpt("u", "uninstall"); @@ -117,7 +116,7 @@ run(const Ice::StringSeq& args) for (size_t i = 0; i < propNames.size(); ++i) { - opts.addOpt("", propNames[i], IceUtilInternal::Options::NeedArg); + opts.addOpt("", propNames[i], IceInternal::Options::NeedArg); } vector commands; @@ -125,7 +124,7 @@ run(const Ice::StringSeq& args) { commands = opts.parse(args); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << "Error:" << e.reason << endl; usage(args[0]); diff --git a/cpp/src/iceserviceinstall/ServiceInstaller.cpp b/cpp/src/iceserviceinstall/ServiceInstaller.cpp index 3856762323d..a8fb92c88f8 100644 --- a/cpp/src/iceserviceinstall/ServiceInstaller.cpp +++ b/cpp/src/iceserviceinstall/ServiceInstaller.cpp @@ -3,7 +3,7 @@ // #include "ServiceInstaller.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "Ice/StringUtil.h" #include @@ -109,7 +109,7 @@ IceServiceInstaller::install(const PropertiesPtr& properties) string imagePath = fixDirSeparator(properties->getPropertyWithDefault( "ImagePath", getServiceInstallerPath() + '\\' + serviceTypeToLowerString(_serviceType) + ".exe")); - if (!IceUtilInternal::fileExists(imagePath)) + if (!IceInternal::fileExists(imagePath)) { throw runtime_error(imagePath + ": not found"); } @@ -137,7 +137,7 @@ IceServiceInstaller::install(const PropertiesPtr& properties) { throw logic_error("IceGrid.Registry.LMDB.Path must be set in " + _configFile); } - if (!IceUtilInternal::isAbsolutePath(registryDataDir)) + if (!IceInternal::isAbsolutePath(registryDataDir)) { throw logic_error( "'" + registryDataDir + "' is a relative path; IceGrid.Registry.LMDB.Path must be an absolute path"); @@ -155,7 +155,7 @@ IceServiceInstaller::install(const PropertiesPtr& properties) { throw logic_error("IceGrid.Node.Data must be set in " + _configFile); } - if (!IceUtilInternal::isAbsolutePath(nodeDataDir)) + if (!IceInternal::isAbsolutePath(nodeDataDir)) { throw logic_error("'" + nodeDataDir + "' is a relative path; IceGrid.Node.Data must be an absolute path"); } @@ -954,10 +954,10 @@ IceServiceInstaller::getIceDLLPath(const string& imagePath) const const string version = os.str(); string result = imagePathDir + '\\' + "ice" + version + ".dll"; - if (!IceUtilInternal::fileExists(result)) + if (!IceInternal::fileExists(result)) { result = imagePathDir + '\\' + "ice" + version + "d.dll"; - if (!IceUtilInternal::fileExists(result)) + if (!IceInternal::fileExists(result)) { throw runtime_error("Could not find Ice DLL"); } diff --git a/cpp/src/slice2cpp/CPlusPlusUtil.cpp b/cpp/src/slice2cpp/CPlusPlusUtil.cpp index ae7d95326c2..e4dac9ba306 100644 --- a/cpp/src/slice2cpp/CPlusPlusUtil.cpp +++ b/cpp/src/slice2cpp/CPlusPlusUtil.cpp @@ -15,7 +15,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -725,7 +725,7 @@ Slice::writeAllocateCode( void Slice::writeMarshalUnmarshalAllInHolder( - IceUtilInternal::Output& out, + IceInternal::Output& out, const string& holder, const DataMemberList& dataMembers, bool optional, @@ -859,7 +859,7 @@ Slice::writeStreamHelpers(Output& out, const ContainedPtr& c, DataMemberList dat } void -Slice::writeIceTuple(::IceUtilInternal::Output& out, DataMemberList dataMembers, TypeContext typeCtx) +Slice::writeIceTuple(::IceInternal::Output& out, DataMemberList dataMembers, TypeContext typeCtx) { // // Use an empty scope to get full qualified names from calls to typeToString. diff --git a/cpp/src/slice2cpp/CPlusPlusUtil.h b/cpp/src/slice2cpp/CPlusPlusUtil.h index 5daa1656586..78351ad1b18 100644 --- a/cpp/src/slice2cpp/CPlusPlusUtil.h +++ b/cpp/src/slice2cpp/CPlusPlusUtil.h @@ -5,7 +5,7 @@ #ifndef C_PLUS_PLUS_UTIL_H #define C_PLUS_PLUS_UTIL_H -#include "../IceUtil/OutputUtil.h" +#include "../Ice/OutputUtil.h" #include "../Slice/Parser.h" #include "TypeContext.h" @@ -18,9 +18,9 @@ namespace Slice char operator()(char); }; - void printHeader(::IceUtilInternal::Output&); - void printVersionCheck(::IceUtilInternal::Output&); - void printDllExportStuff(::IceUtilInternal::Output&, const std::string&); + void printHeader(::IceInternal::Output&); + void printVersionCheck(::IceInternal::Output&); + void printDllExportStuff(::IceInternal::Output&, const std::string&); bool isMovable(const TypePtr&); @@ -57,19 +57,18 @@ namespace Slice std::string fixKwd(const std::string&); - void writeMarshalCode(::IceUtilInternal::Output&, const ParamDeclList&, const OperationPtr&); - void writeUnmarshalCode(::IceUtilInternal::Output&, const ParamDeclList&, const OperationPtr&); + void writeMarshalCode(::IceInternal::Output&, const ParamDeclList&, const OperationPtr&); + void writeUnmarshalCode(::IceInternal::Output&, const ParamDeclList&, const OperationPtr&); void writeAllocateCode( - ::IceUtilInternal::Output&, + ::IceInternal::Output&, const ParamDeclList&, const OperationPtr&, const std::string&, TypeContext); - void - writeMarshalUnmarshalAllInHolder(IceUtilInternal::Output&, const std::string&, const DataMemberList&, bool, bool); - void writeStreamHelpers(::IceUtilInternal::Output&, const ContainedPtr&, DataMemberList, bool); - void writeIceTuple(::IceUtilInternal::Output&, DataMemberList, TypeContext); + void writeMarshalUnmarshalAllInHolder(IceInternal::Output&, const std::string&, const DataMemberList&, bool, bool); + void writeStreamHelpers(::IceInternal::Output&, const ContainedPtr&, DataMemberList, bool); + void writeIceTuple(::IceInternal::Output&, DataMemberList, TypeContext); bool findMetaData(const std::string&, const ClassDeclPtr&, std::string&); bool findMetaData(const std::string&, const StringList&, std::string&); diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index f3c43248b9b..4cf48314398 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -3,7 +3,7 @@ // #include "Gen.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "../Slice/FileTracker.h" #include "../Slice/Util.h" #include "CPlusPlusUtil.h" @@ -17,7 +17,6 @@ using namespace std; using namespace Slice; using namespace IceInternal; -using namespace IceUtilInternal; namespace { @@ -90,7 +89,7 @@ namespace } void writeConstantValue( - IceUtilInternal::Output& out, + IceInternal::Output& out, const TypePtr& type, const SyntaxTreeBasePtr& valueType, const string& value, @@ -186,7 +185,7 @@ namespace // Marshals the parameters of an outgoing request. void writeInParamsLambda( - IceUtilInternal::Output& C, + IceInternal::Output& C, const OperationPtr& p, const ParamDeclList& inParams, const string& scope) @@ -208,7 +207,7 @@ namespace } } - void throwUserExceptionLambda(IceUtilInternal::Output& C, ExceptionList throws, const string& scope) + void throwUserExceptionLambda(IceInternal::Output& C, ExceptionList throws, const string& scope) { if (throws.empty()) { @@ -854,7 +853,7 @@ Slice::Gen::generate(const UnitPtr& p) } void -Slice::Gen::writeExtraHeaders(IceUtilInternal::Output& out) +Slice::Gen::writeExtraHeaders(IceInternal::Output& out) { for (string header : _extraHeaders) { @@ -1984,10 +1983,7 @@ Slice::Gen::ProxyVisitor::emitOperationImpl( C << ");" << eb; } -Slice::Gen::DataDefVisitor::DataDefVisitor( - IceUtilInternal::Output& h, - IceUtilInternal::Output& c, - const string& dllExport) +Slice::Gen::DataDefVisitor::DataDefVisitor(IceInternal::Output& h, IceInternal::Output& c, const string& dllExport) : H(h), C(c), _dllExport(dllExport), @@ -2678,8 +2674,8 @@ Slice::Gen::DataDefVisitor::emitDataMember(const DataMemberPtr& p) } Slice::Gen::InterfaceVisitor::InterfaceVisitor( - ::IceUtilInternal::Output& h, - ::IceUtilInternal::Output& c, + ::IceInternal::Output& h, + ::IceInternal::Output& c, const string& dllExport) : H(h), C(c), diff --git a/cpp/src/slice2cpp/Gen.h b/cpp/src/slice2cpp/Gen.h index bfa571ff5a1..ca4d0440679 100644 --- a/cpp/src/slice2cpp/Gen.h +++ b/cpp/src/slice2cpp/Gen.h @@ -5,7 +5,7 @@ #ifndef GEN_H #define GEN_H -#include "../IceUtil/OutputUtil.h" +#include "../Ice/OutputUtil.h" #include "../Slice/Parser.h" #include "TypeContext.h" @@ -33,7 +33,7 @@ namespace Slice static TypeContext resetUseWstring(std::list&); private: - void writeExtraHeaders(::IceUtilInternal::Output&); + void writeExtraHeaders(::IceInternal::Output&); // // Returns the header extension defined in the file metadata for a given file, @@ -47,8 +47,8 @@ namespace Slice // std::string getSourceExt(const std::string& file, const UnitPtr& unit); - ::IceUtilInternal::Output H; - ::IceUtilInternal::Output C; + ::IceInternal::Output H; + ::IceInternal::Output C; std::string _base; std::string _headerExtension; @@ -66,7 +66,7 @@ namespace Slice class ForwardDeclVisitor final : public ParserVisitor { public: - ForwardDeclVisitor(::IceUtilInternal::Output&); + ForwardDeclVisitor(::IceInternal::Output&); ForwardDeclVisitor(const ForwardDeclVisitor&) = delete; bool visitModuleStart(const ModulePtr&) final; @@ -80,7 +80,7 @@ namespace Slice void visitConst(const ConstPtr&) final; private: - ::IceUtilInternal::Output& H; + ::IceInternal::Output& H; TypeContext _useWstring; std::list _useWstringHist; @@ -90,7 +90,7 @@ namespace Slice class DefaultFactoryVisitor final : public ParserVisitor { public: - DefaultFactoryVisitor(::IceUtilInternal::Output&); + DefaultFactoryVisitor(::IceInternal::Output&); DefaultFactoryVisitor(const DefaultFactoryVisitor&) = delete; bool visitUnitStart(const UnitPtr&) final; @@ -99,7 +99,7 @@ namespace Slice bool visitExceptionStart(const ExceptionPtr&) final; private: - ::IceUtilInternal::Output& C; + ::IceInternal::Output& C; bool _factoryTableInitDone; // when false, we need to generate a factory table init }; @@ -108,7 +108,7 @@ namespace Slice class ProxyVisitor final : public ParserVisitor { public: - ProxyVisitor(::IceUtilInternal::Output&, ::IceUtilInternal::Output&, const std::string&); + ProxyVisitor(::IceInternal::Output&, ::IceInternal::Output&, const std::string&); ProxyVisitor(const ProxyVisitor&) = delete; bool visitModuleStart(const ModulePtr&) final; @@ -123,8 +123,8 @@ namespace Slice const std::string& prefix, const std::vector& outgoingAsyncParams); - ::IceUtilInternal::Output& H; - ::IceUtilInternal::Output& C; + ::IceInternal::Output& H; + ::IceInternal::Output& C; std::string _dllExport; TypeContext _useWstring; @@ -135,7 +135,7 @@ namespace Slice class DataDefVisitor final : public ParserVisitor { public: - DataDefVisitor(::IceUtilInternal::Output&, ::IceUtilInternal::Output&, const std::string&); + DataDefVisitor(::IceInternal::Output&, ::IceInternal::Output&, const std::string&); DataDefVisitor(const DataDefVisitor&) = delete; bool visitModuleStart(const ModulePtr&) final; @@ -153,8 +153,8 @@ namespace Slice void emitOneShotConstructor(const ClassDefPtr&); void emitDataMember(const DataMemberPtr&); - ::IceUtilInternal::Output& H; - ::IceUtilInternal::Output& C; + ::IceInternal::Output& H; + ::IceInternal::Output& C; std::string _dllExport; std::string _dllClassExport; @@ -168,7 +168,7 @@ namespace Slice class InterfaceVisitor final : public ParserVisitor { public: - InterfaceVisitor(::IceUtilInternal::Output&, ::IceUtilInternal::Output&, const std::string&); + InterfaceVisitor(::IceInternal::Output&, ::IceInternal::Output&, const std::string&); InterfaceVisitor(const InterfaceVisitor&) = delete; bool visitModuleStart(const ModulePtr&) final; @@ -178,8 +178,8 @@ namespace Slice void visitOperation(const OperationPtr&) final; private: - ::IceUtilInternal::Output& H; - ::IceUtilInternal::Output& C; + ::IceInternal::Output& H; + ::IceInternal::Output& C; std::string _dllExport; TypeContext _useWstring; @@ -190,7 +190,7 @@ namespace Slice class StreamVisitor final : public ParserVisitor { public: - StreamVisitor(::IceUtilInternal::Output&); + StreamVisitor(::IceInternal::Output&); StreamVisitor(const StreamVisitor&) = delete; bool visitModuleStart(const ModulePtr&) final; @@ -201,7 +201,7 @@ namespace Slice void visitEnum(const EnumPtr&) final; private: - ::IceUtilInternal::Output& H; + ::IceInternal::Output& H; }; class MetaDataVisitor final : public ParserVisitor diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp index 4328f043ffc..d8108b83158 100644 --- a/cpp/src/slice2cpp/Main.cpp +++ b/cpp/src/slice2cpp/Main.cpp @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" #include "Ice/CtrlCHandler.h" #include "../Slice/FileTracker.h" @@ -17,7 +17,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -61,23 +61,23 @@ usage(const string& n) int compile(const vector& argv) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); opts.addOpt("", "validate"); - opts.addOpt("", "header-ext", IceUtilInternal::Options::NeedArg, "h"); - opts.addOpt("", "source-ext", IceUtilInternal::Options::NeedArg, "cpp"); - opts.addOpt("", "add-header", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("D", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("U", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + opts.addOpt("", "header-ext", IceInternal::Options::NeedArg, "h"); + opts.addOpt("", "source-ext", IceInternal::Options::NeedArg, "cpp"); + opts.addOpt("", "add-header", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("D", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("U", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("I", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); opts.addOpt("E"); - opts.addOpt("", "include-dir", IceUtilInternal::Options::NeedArg); - opts.addOpt("", "output-dir", IceUtilInternal::Options::NeedArg); - opts.addOpt("", "dll-export", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "include-dir", IceInternal::Options::NeedArg); + opts.addOpt("", "output-dir", IceInternal::Options::NeedArg); + opts.addOpt("", "dll-export", IceInternal::Options::NeedArg); opts.addOpt("", "depend"); opts.addOpt("", "depend-xml"); - opts.addOpt("", "depend-file", IceUtilInternal::Options::NeedArg, ""); + opts.addOpt("", "depend-file", IceInternal::Options::NeedArg, ""); opts.addOpt("d", "debug"); bool validate = find(argv.begin(), argv.end(), "--validate") != argv.end(); @@ -86,7 +86,7 @@ compile(const vector& argv) { args = opts.parse(argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << argv[0] << ": " << e.reason << endl; if (!validate) diff --git a/cpp/src/slice2cpp/Slice2Cpp.rc b/cpp/src/slice2cpp/Slice2Cpp.rc index 30f38190a37..c991c3ba7eb 100644 --- a/cpp/src/slice2cpp/Slice2Cpp.rc +++ b/cpp/src/slice2cpp/Slice2Cpp.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "slice2cpp\0" #define ICE_ORIGINALFILENAME "slice2cpp.exe\0" diff --git a/cpp/src/slice2cs/CsUtil.cpp b/cpp/src/slice2cs/CsUtil.cpp index 68822732e7c..933c78e36ae 100644 --- a/cpp/src/slice2cs/CsUtil.cpp +++ b/cpp/src/slice2cs/CsUtil.cpp @@ -21,7 +21,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { diff --git a/cpp/src/slice2cs/CsUtil.h b/cpp/src/slice2cs/CsUtil.h index 7672a215164..88e843cc1a0 100644 --- a/cpp/src/slice2cs/CsUtil.h +++ b/cpp/src/slice2cs/CsUtil.h @@ -5,7 +5,7 @@ #ifndef CS_UTIL_H #define CS_UTIL_H -#include "../IceUtil/OutputUtil.h" +#include "../Ice/OutputUtil.h" #include "../Slice/Parser.h" namespace Slice @@ -68,14 +68,14 @@ namespace Slice // Generate code to marshal or unmarshal a type // void writeMarshalUnmarshalCode( - ::IceUtilInternal::Output&, + ::IceInternal::Output&, const TypePtr&, const std::string&, const std::string&, bool, const std::string& = ""); void writeOptionalMarshalUnmarshalCode( - ::IceUtilInternal::Output&, + ::IceInternal::Output&, const TypePtr&, const std::string&, const std::string&, @@ -83,7 +83,7 @@ namespace Slice bool, const std::string& = ""); void writeSequenceMarshalUnmarshalCode( - ::IceUtilInternal::Output&, + ::IceInternal::Output&, const SequencePtr&, const std::string&, const std::string&, @@ -91,7 +91,7 @@ namespace Slice bool, const std::string& = ""); void writeOptionalSequenceMarshalUnmarshalCode( - ::IceUtilInternal::Output&, + ::IceInternal::Output&, const SequencePtr&, const std::string&, const std::string&, @@ -100,7 +100,7 @@ namespace Slice const std::string& = ""); void writeSerializeDeserializeCode( - ::IceUtilInternal::Output&, + ::IceInternal::Output&, const TypePtr&, const std::string&, const std::string&, diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp index 81ab606b128..3f40844688e 100644 --- a/cpp/src/slice2cs/Gen.cpp +++ b/cpp/src/slice2cs/Gen.cpp @@ -3,7 +3,7 @@ // #include "Gen.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "Ice/StringUtil.h" #include @@ -26,7 +26,6 @@ using namespace std; using namespace Slice; using namespace Ice; using namespace IceInternal; -using namespace IceUtilInternal; namespace { @@ -1552,7 +1551,7 @@ Slice::Gen::printHeader() _out << "//\n"; } -Slice::Gen::UnitVisitor::UnitVisitor(IceUtilInternal::Output& out) : CsVisitor(out) {} +Slice::Gen::UnitVisitor::UnitVisitor(IceInternal::Output& out) : CsVisitor(out) {} bool Slice::Gen::UnitVisitor::visitUnitStart(const UnitPtr& p) @@ -1581,7 +1580,7 @@ Slice::Gen::UnitVisitor::visitUnitStart(const UnitPtr& p) return false; } -Slice::Gen::TypesVisitor::TypesVisitor(IceUtilInternal::Output& out) : CsVisitor(out) {} +Slice::Gen::TypesVisitor::TypesVisitor(IceInternal::Output& out) : CsVisitor(out) {} bool Slice::Gen::TypesVisitor::visitModuleStart(const ModulePtr& p) { @@ -2409,7 +2408,7 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) } } -Slice::Gen::ResultVisitor::ResultVisitor(::IceUtilInternal::Output& out) : CsVisitor(out) {} +Slice::Gen::ResultVisitor::ResultVisitor(::IceInternal::Output& out) : CsVisitor(out) {} namespace { @@ -2532,7 +2531,7 @@ Slice::Gen::ResultVisitor::visitOperation(const OperationPtr& p) } } -Slice::Gen::ProxyVisitor::ProxyVisitor(IceUtilInternal::Output& out) : CsVisitor(out) {} +Slice::Gen::ProxyVisitor::ProxyVisitor(IceInternal::Output& out) : CsVisitor(out) {} bool Slice::Gen::ProxyVisitor::visitModuleStart(const ModulePtr& p) @@ -2648,7 +2647,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) } } -Slice::Gen::DispatchAdapterVisitor::DispatchAdapterVisitor(IceUtilInternal::Output& out) : CsVisitor(out) {} +Slice::Gen::DispatchAdapterVisitor::DispatchAdapterVisitor(IceInternal::Output& out) : CsVisitor(out) {} bool Slice::Gen::DispatchAdapterVisitor::visitModuleStart(const ModulePtr& p) @@ -2840,7 +2839,7 @@ Slice::Gen::DispatchAdapterVisitor::visitOperation(const OperationPtr& op) _out << eb; } -Slice::Gen::HelperVisitor::HelperVisitor(IceUtilInternal::Output& out) : CsVisitor(out) {} +Slice::Gen::HelperVisitor::HelperVisitor(IceInternal::Output& out) : CsVisitor(out) {} bool Slice::Gen::HelperVisitor::visitModuleStart(const ModulePtr& p) @@ -3406,7 +3405,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p) _out << eb; } -Slice::Gen::DispatcherVisitor::DispatcherVisitor(::IceUtilInternal::Output& out) : CsVisitor(out) {} +Slice::Gen::DispatcherVisitor::DispatcherVisitor(::IceInternal::Output& out) : CsVisitor(out) {} bool Slice::Gen::DispatcherVisitor::visitModuleStart(const ModulePtr& p) diff --git a/cpp/src/slice2cs/Gen.h b/cpp/src/slice2cs/Gen.h index 4bc694e92a9..c27322dec38 100644 --- a/cpp/src/slice2cs/Gen.h +++ b/cpp/src/slice2cs/Gen.h @@ -12,7 +12,7 @@ namespace Slice class CsVisitor : public CsGenerator, public ParserVisitor { public: - CsVisitor(::IceUtilInternal::Output&); + CsVisitor(::IceInternal::Output&); virtual ~CsVisitor(); protected: @@ -89,7 +89,7 @@ namespace Slice void moduleStart(const ModulePtr&); void moduleEnd(const ModulePtr&); - ::IceUtilInternal::Output& _out; + ::IceInternal::Output& _out; }; class Gen final @@ -102,7 +102,7 @@ namespace Slice void generate(const UnitPtr&); private: - IceUtilInternal::Output _out; + IceInternal::Output _out; std::vector _includePaths; void printHeader(); @@ -110,7 +110,7 @@ namespace Slice class UnitVisitor final : public CsVisitor { public: - UnitVisitor(::IceUtilInternal::Output&); + UnitVisitor(::IceInternal::Output&); bool visitUnitStart(const UnitPtr&) final; }; @@ -118,7 +118,7 @@ namespace Slice class TypesVisitor final : public CsVisitor { public: - TypesVisitor(::IceUtilInternal::Output&); + TypesVisitor(::IceInternal::Output&); bool visitModuleStart(const ModulePtr&) final; void visitModuleEnd(const ModulePtr&) final; @@ -140,7 +140,7 @@ namespace Slice class ResultVisitor final : public CsVisitor { public: - ResultVisitor(::IceUtilInternal::Output&); + ResultVisitor(::IceInternal::Output&); bool visitModuleStart(const ModulePtr&) final; void visitModuleEnd(const ModulePtr&) final; @@ -150,7 +150,7 @@ namespace Slice class ProxyVisitor final : public CsVisitor { public: - ProxyVisitor(::IceUtilInternal::Output&); + ProxyVisitor(::IceInternal::Output&); bool visitModuleStart(const ModulePtr&) final; void visitModuleEnd(const ModulePtr&) final; @@ -163,7 +163,7 @@ namespace Slice class DispatchAdapterVisitor final : public CsVisitor { public: - DispatchAdapterVisitor(::IceUtilInternal::Output&); + DispatchAdapterVisitor(::IceInternal::Output&); bool visitModuleStart(const ModulePtr&) final; void visitModuleEnd(const ModulePtr&) final; @@ -175,7 +175,7 @@ namespace Slice class HelperVisitor final : public CsVisitor { public: - HelperVisitor(::IceUtilInternal::Output&); + HelperVisitor(::IceInternal::Output&); bool visitModuleStart(const ModulePtr&) final; void visitModuleEnd(const ModulePtr&) final; @@ -188,7 +188,7 @@ namespace Slice class DispatcherVisitor final : public CsVisitor { public: - DispatcherVisitor(::IceUtilInternal::Output&); + DispatcherVisitor(::IceInternal::Output&); bool visitModuleStart(const ModulePtr&) final; void visitModuleEnd(const ModulePtr&) final; diff --git a/cpp/src/slice2cs/Main.cpp b/cpp/src/slice2cs/Main.cpp index e0adb813c08..e375f20e013 100644 --- a/cpp/src/slice2cs/Main.cpp +++ b/cpp/src/slice2cs/Main.cpp @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" #include "../Slice/FileTracker.h" #include "../Slice/Preprocessor.h" #include "../Slice/Util.h" @@ -15,7 +15,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -53,18 +53,18 @@ usage(const string& n) int compile(const vector& argv) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); opts.addOpt("", "validate"); - opts.addOpt("D", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("U", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + opts.addOpt("D", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("U", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("I", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); opts.addOpt("E"); - opts.addOpt("", "output-dir", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "output-dir", IceInternal::Options::NeedArg); opts.addOpt("", "depend"); opts.addOpt("", "depend-xml"); - opts.addOpt("", "depend-file", IceUtilInternal::Options::NeedArg, ""); + opts.addOpt("", "depend-file", IceInternal::Options::NeedArg, ""); opts.addOpt("d", "debug"); bool validate = find(argv.begin(), argv.end(), "--validate") != argv.end(); @@ -73,7 +73,7 @@ compile(const vector& argv) { args = opts.parse(argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << argv[0] << ": error: " << e.reason << endl; if (!validate) diff --git a/cpp/src/slice2cs/Slice2Cs.rc b/cpp/src/slice2cs/Slice2Cs.rc index b3817ace7b3..3143639d3a6 100644 --- a/cpp/src/slice2cs/Slice2Cs.rc +++ b/cpp/src/slice2cs/Slice2Cs.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "slice2cs\0" #define ICE_ORIGINALFILENAME "slice2cs.exe\0" diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 5d123614675..b0b178d60bb 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { diff --git a/cpp/src/slice2java/Gen.h b/cpp/src/slice2java/Gen.h index 07c648c1a11..99202940799 100644 --- a/cpp/src/slice2java/Gen.h +++ b/cpp/src/slice2java/Gen.h @@ -25,14 +25,11 @@ namespace Slice }; std::string getResultType(const OperationPtr&, const std::string&, bool, bool); - void writeResultType(::IceUtilInternal::Output&, const OperationPtr&, const std::string&, const CommentPtr&); - void writeMarshaledResultType( - ::IceUtilInternal::Output&, - const OperationPtr&, - const std::string&, - const CommentPtr&); + void writeResultType(::IceInternal::Output&, const OperationPtr&, const std::string&, const CommentPtr&); + void + writeMarshaledResultType(::IceInternal::Output&, const OperationPtr&, const std::string&, const CommentPtr&); - void allocatePatcher(::IceUtilInternal::Output&, const TypePtr&, const std::string&, const std::string&); + void allocatePatcher(::IceInternal::Output&, const TypePtr&, const std::string&, const std::string&); std::string getPatcher(const TypePtr&, const std::string&, const std::string&); std::string getFutureType(const OperationPtr&, const std::string&); @@ -50,13 +47,10 @@ namespace Slice std::vector getArgs(const OperationPtr&); std::vector getInArgs(const OperationPtr&, bool = false); - void writeMarshalProxyParams(::IceUtilInternal::Output&, const std::string&, const OperationPtr&, bool); - void writeUnmarshalProxyResults(::IceUtilInternal::Output&, const std::string&, const OperationPtr&); - void writeMarshalServantResults( - ::IceUtilInternal::Output&, - const std::string&, - const OperationPtr&, - const std::string&); + void writeMarshalProxyParams(::IceInternal::Output&, const std::string&, const OperationPtr&, bool); + void writeUnmarshalProxyResults(::IceInternal::Output&, const std::string&, const OperationPtr&); + void + writeMarshalServantResults(::IceInternal::Output&, const std::string&, const OperationPtr&, const std::string&); // // Generate a throws clause containing only checked exceptions. @@ -66,34 +60,26 @@ namespace Slice // // Marshal/unmarshal a data member. // - void writeMarshalDataMember( - ::IceUtilInternal::Output&, - const std::string&, - const DataMemberPtr&, - int&, - bool = false); - void writeUnmarshalDataMember( - ::IceUtilInternal::Output&, - const std::string&, - const DataMemberPtr&, - int&, - bool = false); + void + writeMarshalDataMember(::IceInternal::Output&, const std::string&, const DataMemberPtr&, int&, bool = false); + void + writeUnmarshalDataMember(::IceInternal::Output&, const std::string&, const DataMemberPtr&, int&, bool = false); // // Generate dispatch methods for an interface. // - void writeDispatch(::IceUtilInternal::Output&, const InterfaceDefPtr&); + void writeDispatch(::IceInternal::Output&, const InterfaceDefPtr&); // // Generate marshaling methods for a class. // - void writeMarshaling(::IceUtilInternal::Output&, const ClassDefPtr&); + void writeMarshaling(::IceInternal::Output&, const ClassDefPtr&); // // Write a constant or default value initializer. // void writeConstantValue( - ::IceUtilInternal::Output&, + ::IceInternal::Output&, const TypePtr&, const SyntaxTreeBasePtr&, const std::string&, @@ -102,32 +88,32 @@ namespace Slice // // Generate assignment statements for those data members that have default values. // - void writeDataMemberInitializers(::IceUtilInternal::Output&, const DataMemberList&, const std::string&); + void writeDataMemberInitializers(::IceInternal::Output&, const DataMemberList&, const std::string&); // // Handle doc comments. // static StringList splitComment(const ContainedPtr&); - void writeHiddenDocComment(::IceUtilInternal::Output&); - void writeDocCommentLines(::IceUtilInternal::Output&, const StringList&); - void writeDocCommentLines(::IceUtilInternal::Output&, const std::string&); - void writeDocComment(::IceUtilInternal::Output&, const UnitPtr&, const CommentPtr&); - void writeDocComment(::IceUtilInternal::Output&, const std::string&); + void writeHiddenDocComment(::IceInternal::Output&); + void writeDocCommentLines(::IceInternal::Output&, const StringList&); + void writeDocCommentLines(::IceInternal::Output&, const std::string&); + void writeDocComment(::IceInternal::Output&, const UnitPtr&, const CommentPtr&); + void writeDocComment(::IceInternal::Output&, const std::string&); void writeProxyDocComment( - ::IceUtilInternal::Output&, + ::IceInternal::Output&, const OperationPtr&, const std::string&, const CommentPtr&, bool, const std::string&); - void writeHiddenProxyDocComment(::IceUtilInternal::Output&, const OperationPtr&); + void writeHiddenProxyDocComment(::IceInternal::Output&, const OperationPtr&); void writeServantDocComment( - ::IceUtilInternal::Output&, + ::IceInternal::Output&, const OperationPtr&, const std::string&, const CommentPtr&, bool); - void writeSeeAlso(::IceUtilInternal::Output&, const UnitPtr&, const std::string&); + void writeSeeAlso(::IceInternal::Output&, const UnitPtr&, const std::string&); }; class Gen final diff --git a/cpp/src/slice2java/JavaUtil.cpp b/cpp/src/slice2java/JavaUtil.cpp index 383c07bb474..666a28e5efb 100644 --- a/cpp/src/slice2java/JavaUtil.cpp +++ b/cpp/src/slice2java/JavaUtil.cpp @@ -3,7 +3,7 @@ // #include "JavaUtil.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "../Slice/FileTracker.h" #include "../Slice/Util.h" #include "Ice/StringUtil.h" @@ -23,7 +23,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -684,8 +684,8 @@ Slice::JavaOutput::openClass(const string& cls, const string& prefix, const stri path += dir.substr(start); } - IceUtilInternal::structstat st; - if (!IceUtilInternal::stat(path, &st)) + IceInternal::structstat st; + if (!IceInternal::stat(path, &st)) { if (!(st.st_mode & S_IFDIR)) { @@ -697,10 +697,10 @@ Slice::JavaOutput::openClass(const string& cls, const string& prefix, const stri continue; } - int err = IceUtilInternal::mkdir(path, 0777); + int err = IceInternal::mkdir(path, 0777); // If slice2java is run concurrently, it's possible that another instance of slice2java has already // created the directory. - if (err == 0 || (errno == EEXIST && IceUtilInternal::directoryExists(path))) + if (err == 0 || (errno == EEXIST && IceInternal::directoryExists(path))) { // Directory successfully created or already exists. } diff --git a/cpp/src/slice2java/JavaUtil.h b/cpp/src/slice2java/JavaUtil.h index 8cdc9618fb5..6ab49eb71fe 100644 --- a/cpp/src/slice2java/JavaUtil.h +++ b/cpp/src/slice2java/JavaUtil.h @@ -5,7 +5,7 @@ #ifndef JAVA_UTIL_H #define JAVA_UTIL_H -#include "../IceUtil/OutputUtil.h" +#include "../Ice/OutputUtil.h" #include "../Slice/Parser.h" namespace Slice @@ -26,7 +26,7 @@ namespace Slice // bool isValidMethodParameterList(const DataMemberList&, int additionalUnits = 0); - class JavaOutput final : public ::IceUtilInternal::Output + class JavaOutput final : public ::IceInternal::Output { public: JavaOutput(); @@ -74,7 +74,7 @@ namespace Slice // void open(const std::string&, const std::string&); - ::IceUtilInternal::Output& output() const; + ::IceInternal::Output& output() const; // // Check a symbol against any of the Java keywords. If a @@ -174,7 +174,7 @@ namespace Slice std::string getReadFunction(const std::string&, const TypePtr&); void writeMarshalUnmarshalCode( - ::IceUtilInternal::Output&, + ::IceInternal::Output&, const std::string&, const TypePtr&, OptionalMode, @@ -191,7 +191,7 @@ namespace Slice // Generate code to marshal or unmarshal a dictionary type. // void writeDictionaryMarshalUnmarshalCode( - ::IceUtilInternal::Output&, + ::IceInternal::Output&, const std::string&, const DictionaryPtr&, const std::string&, @@ -205,7 +205,7 @@ namespace Slice // Generate code to marshal or unmarshal a sequence type. // void writeSequenceMarshalUnmarshalCode( - ::IceUtilInternal::Output&, + ::IceInternal::Output&, const std::string&, const SequencePtr&, const std::string&, @@ -250,7 +250,7 @@ namespace Slice private: std::string _dir; - ::IceUtilInternal::Output* _out; + ::IceInternal::Output* _out; }; } diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp index de6a01ad0ee..a0f96c61859 100644 --- a/cpp/src/slice2java/Main.cpp +++ b/cpp/src/slice2java/Main.cpp @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" #include "../Slice/FileTracker.h" #include "../Slice/Preprocessor.h" #include "../Slice/Util.h" @@ -16,7 +16,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -56,21 +56,21 @@ usage(const string& n) int compile(const vector& argv) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); opts.addOpt("", "validate"); - opts.addOpt("D", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("U", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + opts.addOpt("D", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("U", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("I", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); opts.addOpt("E"); - opts.addOpt("", "output-dir", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "output-dir", IceInternal::Options::NeedArg); opts.addOpt("", "depend"); opts.addOpt("", "depend-xml"); - opts.addOpt("", "depend-file", IceUtilInternal::Options::NeedArg, ""); + opts.addOpt("", "depend-file", IceInternal::Options::NeedArg, ""); opts.addOpt("", "list-generated"); opts.addOpt("d", "debug"); - opts.addOpt("", "meta", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + opts.addOpt("", "meta", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); bool validate = find(argv.begin(), argv.end(), "--validate") != argv.end(); vector args; @@ -78,7 +78,7 @@ compile(const vector& argv) { args = opts.parse(argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << argv[0] << ": error: " << e.reason << endl; if (!validate) diff --git a/cpp/src/slice2java/Slice2Java.rc b/cpp/src/slice2java/Slice2Java.rc index 79634c5102d..67d807f24de 100644 --- a/cpp/src/slice2java/Slice2Java.rc +++ b/cpp/src/slice2java/Slice2Java.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "slice2java\0" #define ICE_ORIGINALFILENAME "slice2java.exe\0" diff --git a/cpp/src/slice2js/Gen.cpp b/cpp/src/slice2js/Gen.cpp index 73928751ccd..67fe0049d51 100644 --- a/cpp/src/slice2js/Gen.cpp +++ b/cpp/src/slice2js/Gen.cpp @@ -4,7 +4,7 @@ #include "Gen.h" #include "../Ice/Endian.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "../Slice/FileTracker.h" #include "../Slice/Util.h" #include "Ice/StringUtil.h" @@ -18,7 +18,7 @@ using namespace std; using namespace Slice; using namespace Ice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -86,7 +86,7 @@ namespace return "???"; } - void printHeader(IceUtilInternal::Output& out) + void printHeader(IceInternal::Output& out) { static const char* header = "//\n" "// Copyright (c) ZeroC, Inc. All rights reserved.\n" @@ -757,7 +757,7 @@ Slice::Gen::generate(const UnitPtr& p) } } -Slice::Gen::ImportVisitor::ImportVisitor(IceUtilInternal::Output& out, vector includePaths) +Slice::Gen::ImportVisitor::ImportVisitor(IceInternal::Output& out, vector includePaths) : JsVisitor(out), _seenClass(false), _seenInterface(false), @@ -967,7 +967,7 @@ Slice::Gen::ImportVisitor::writeImports(const UnitPtr& p) // For Slice modules mapped to the same JavaScript module, or Slice files that doesn't use "js:module". // We import them using their Slice include relative path. string f = removeExtension(included) + ".js"; - if (IceUtilInternal::isAbsolutePath(f)) + if (IceInternal::isAbsolutePath(f)) { // If the include file is an absolute path, we need to generate a relative path. f = relativePath(f, p->topLevelFile()); @@ -1126,7 +1126,7 @@ Slice::Gen::ImportVisitor::writeImports(const UnitPtr& p) return importedModules; } -Slice::Gen::ExportsVisitor::ExportsVisitor(::IceUtilInternal::Output& out, std::set importedModules) +Slice::Gen::ExportsVisitor::ExportsVisitor(::IceInternal::Output& out, std::set importedModules) : JsVisitor(out), _importedModules(importedModules) { @@ -1176,7 +1176,7 @@ Slice::Gen::ExportsVisitor::exportedModules() const return _exportedModules; } -Slice::Gen::TypesVisitor::TypesVisitor(IceUtilInternal::Output& out) : JsVisitor(out) {} +Slice::Gen::TypesVisitor::TypesVisitor(IceInternal::Output& out) : JsVisitor(out) {} bool Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) @@ -2002,7 +2002,7 @@ Slice::Gen::TypesVisitor::encodeTypeForOperation(const TypePtr& type) return "???"; } -Slice::Gen::TypeScriptImportVisitor::TypeScriptImportVisitor(IceUtilInternal::Output& out) : JsVisitor(out) {} +Slice::Gen::TypeScriptImportVisitor::TypeScriptImportVisitor(IceInternal::Output& out) : JsVisitor(out) {} namespace { @@ -2041,7 +2041,7 @@ Slice::Gen::TypeScriptImportVisitor::addImport(const ContainedPtr& definition) else { string f = removeExtension(filename); - if (IceUtilInternal::isAbsolutePath(f)) + if (IceInternal::isAbsolutePath(f)) { // If the include file is an absolute path, we need to generate a relative path. f = relativePath(f, _filename); @@ -2087,7 +2087,7 @@ Slice::Gen::TypeScriptImportVisitor::visitUnitStart(const UnitPtr& p) if (jsImportedModule.empty()) { string f = removeExtension(included) + ".js"; - if (IceUtilInternal::isAbsolutePath(f)) + if (IceInternal::isAbsolutePath(f)) { // If the include file is an absolute path, we need to generate a relative path. f = relativePath(f, _filename); @@ -2393,7 +2393,7 @@ Slice::Gen::TypeScriptVisitor::typeToTsString(const TypePtr& type, bool nullable } Slice::Gen::TypeScriptVisitor::TypeScriptVisitor( - IceUtilInternal::Output& out, + IceInternal::Output& out, std::map importedTypes) : JsVisitor(out), _importedTypes(std::move(importedTypes)) diff --git a/cpp/src/slice2js/Gen.h b/cpp/src/slice2js/Gen.h index 0095a348132..86320fe3501 100644 --- a/cpp/src/slice2js/Gen.h +++ b/cpp/src/slice2js/Gen.h @@ -13,7 +13,7 @@ namespace Slice { public: JsVisitor( - ::IceUtilInternal::Output&, + ::IceInternal::Output&, const std::vector>& imports = std::vector>()); virtual ~JsVisitor(); @@ -33,7 +33,7 @@ namespace Slice static StringList splitComment(const ContainedPtr&); void writeDocCommentFor(const ContainedPtr&); - ::IceUtilInternal::Output& _out; + ::IceInternal::Output& _out; std::vector> _imports; }; @@ -50,8 +50,8 @@ namespace Slice void generate(const UnitPtr&); private: - IceUtilInternal::Output _javaScriptOutput; - IceUtilInternal::Output _typeScriptOutput; + IceInternal::Output _javaScriptOutput; + IceInternal::Output _typeScriptOutput; std::vector _includePaths; std::string _fileBase; @@ -61,7 +61,7 @@ namespace Slice class ImportVisitor final : public JsVisitor { public: - ImportVisitor(::IceUtilInternal::Output&, std::vector); + ImportVisitor(::IceInternal::Output&, std::vector); bool visitClassDefStart(const ClassDefPtr&) final; bool visitInterfaceDefStart(const InterfaceDefPtr&) final; @@ -95,7 +95,7 @@ namespace Slice class ExportsVisitor final : public JsVisitor { public: - ExportsVisitor(::IceUtilInternal::Output&, std::set); + ExportsVisitor(::IceInternal::Output&, std::set); bool visitModuleStart(const ModulePtr&) final; @@ -111,7 +111,7 @@ namespace Slice class TypesVisitor final : public JsVisitor { public: - TypesVisitor(::IceUtilInternal::Output&); + TypesVisitor(::IceInternal::Output&); bool visitClassDefStart(const ClassDefPtr&) final; bool visitInterfaceDefStart(const InterfaceDefPtr&) final; @@ -129,7 +129,7 @@ namespace Slice class TypeScriptImportVisitor final : public JsVisitor { public: - TypeScriptImportVisitor(::IceUtilInternal::Output&); + TypeScriptImportVisitor(::IceInternal::Output&); bool visitUnitStart(const UnitPtr&) final; bool visitClassDefStart(const ClassDefPtr&) final; @@ -158,7 +158,7 @@ namespace Slice class TypeScriptVisitor final : public JsVisitor { public: - TypeScriptVisitor(::IceUtilInternal::Output&, std::map); + TypeScriptVisitor(::IceInternal::Output&, std::map); bool visitUnitStart(const UnitPtr&) final; void visitUnitEnd(const UnitPtr&) final; diff --git a/cpp/src/slice2js/JsUtil.cpp b/cpp/src/slice2js/JsUtil.cpp index ef0a827f952..3ae2cc9e3e5 100644 --- a/cpp/src/slice2js/JsUtil.cpp +++ b/cpp/src/slice2js/JsUtil.cpp @@ -21,7 +21,6 @@ using namespace std; using namespace Slice; using namespace IceInternal; -using namespace IceUtilInternal; string Slice::relativePath(const string& p1, const string& p2) diff --git a/cpp/src/slice2js/JsUtil.h b/cpp/src/slice2js/JsUtil.h index e808060263a..2b06c0dcecf 100644 --- a/cpp/src/slice2js/JsUtil.h +++ b/cpp/src/slice2js/JsUtil.h @@ -5,7 +5,7 @@ #ifndef JS_UTIL_H #define JS_UTIL_H -#include "../IceUtil/OutputUtil.h" +#include "../Ice/OutputUtil.h" #include "../Slice/Parser.h" namespace Slice @@ -35,8 +35,8 @@ namespace Slice // // Generate code to marshal or unmarshal a type // - void writeMarshalUnmarshalCode(IceUtilInternal::Output&, const TypePtr&, const std::string&, bool); - void writeOptionalMarshalUnmarshalCode(IceUtilInternal::Output&, const TypePtr&, const std::string&, int, bool); + void writeMarshalUnmarshalCode(IceInternal::Output&, const TypePtr&, const std::string&, bool); + void writeOptionalMarshalUnmarshalCode(IceInternal::Output&, const TypePtr&, const std::string&, int, bool); }; } diff --git a/cpp/src/slice2js/Main.cpp b/cpp/src/slice2js/Main.cpp index ca7cf56a661..3ee5637fbb0 100644 --- a/cpp/src/slice2js/Main.cpp +++ b/cpp/src/slice2js/Main.cpp @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" #include "../Slice/FileTracker.h" #include "../Slice/Preprocessor.h" #include "../Slice/Util.h" @@ -17,7 +17,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -58,21 +58,21 @@ usage(const string& n) int compile(const vector& argv) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); opts.addOpt("", "validate"); - opts.addOpt("D", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("U", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + opts.addOpt("D", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("U", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("I", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); opts.addOpt("E"); opts.addOpt("", "stdout"); opts.addOpt("", "typescript"); - opts.addOpt("", "output-dir", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "output-dir", IceInternal::Options::NeedArg); opts.addOpt("", "depend"); opts.addOpt("", "depend-json"); opts.addOpt("", "depend-xml"); - opts.addOpt("", "depend-file", IceUtilInternal::Options::NeedArg, ""); + opts.addOpt("", "depend-file", IceInternal::Options::NeedArg, ""); opts.addOpt("d", "debug"); bool validate = find(argv.begin(), argv.end(), "--validate") != argv.end(); @@ -82,7 +82,7 @@ compile(const vector& argv) { args = opts.parse(argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << argv[0] << ": error: " << e.reason << endl; if (!validate) diff --git a/cpp/src/slice2js/Slice2Js.rc b/cpp/src/slice2js/Slice2Js.rc index 746b8236240..04efa4f7538 100644 --- a/cpp/src/slice2js/Slice2Js.rc +++ b/cpp/src/slice2js/Slice2Js.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "slice2js\0" #define ICE_ORIGINALFILENAME "slice2js.exe\0" diff --git a/cpp/src/slice2matlab/Main.cpp b/cpp/src/slice2matlab/Main.cpp index 67837c59f25..33434f77e41 100644 --- a/cpp/src/slice2matlab/Main.cpp +++ b/cpp/src/slice2matlab/Main.cpp @@ -2,10 +2,10 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/FileUtil.h" -#include "../IceUtil/Options.h" -#include "../IceUtil/OutputUtil.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/FileUtil.h" +#include "../Ice/Options.h" +#include "../Ice/OutputUtil.h" #include "../Slice/FileTracker.h" #include "../Slice/Parser.h" #include "../Slice/Preprocessor.h" @@ -31,7 +31,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -299,7 +299,7 @@ namespace return r; } - void writeCopyright(IceUtilInternal::Output& out, const string& file) + void writeCopyright(IceInternal::Output& out, const string& file) { string f = file; string::size_type pos = f.find_last_of("/"); @@ -313,7 +313,7 @@ namespace out << nl; } - void openClass(const string& abs, const string& dir, IceUtilInternal::Output& out) + void openClass(const string& abs, const string& dir, IceInternal::Output& out) { vector v = splitAbsoluteName(abs); assert(v.size() > 1); @@ -330,12 +330,12 @@ namespace for (vector::size_type i = 0; i < v.size() - 1; i++) { path += "+" + lookupKwd(v[i]); - if (!IceUtilInternal::directoryExists(path)) + if (!IceInternal::directoryExists(path)) { - int err = IceUtilInternal::mkdir(path, 0777); + int err = IceInternal::mkdir(path, 0777); // If slice2matlab is run concurrently, it's possible that another instance of slice2matlab has already // created the directory. - if (err == 0 || (errno == EEXIST && IceUtilInternal::directoryExists(path))) + if (err == 0 || (errno == EEXIST && IceInternal::directoryExists(path))) { // Directory successfully created or already exists. } @@ -680,7 +680,7 @@ namespace } void convertValueType( - IceUtilInternal::Output& out, + IceInternal::Output& out, const string& dest, const string& src, const TypePtr& type, @@ -1048,8 +1048,7 @@ namespace return doc; } - void - writeDocLines(IceUtilInternal::Output& out, const StringList& lines, bool commentFirst, const string& space = " ") + void writeDocLines(IceInternal::Output& out, const StringList& lines, bool commentFirst, const string& space = " ") { StringList l = lines; if (!commentFirst) @@ -1067,7 +1066,7 @@ namespace } } - void writeDocSentence(IceUtilInternal::Output& out, const StringList& lines) + void writeDocSentence(IceInternal::Output& out, const StringList& lines) { // // Write the first sentence. @@ -1120,7 +1119,7 @@ namespace } } - void writeSeeAlso(IceUtilInternal::Output& out, const StringList& seeAlso, const ContainerPtr& container) + void writeSeeAlso(IceInternal::Output& out, const StringList& seeAlso, const ContainerPtr& container) { assert(!seeAlso.empty()); // @@ -1171,7 +1170,7 @@ namespace } } - void writeDocSummary(IceUtilInternal::Output& out, const ContainedPtr& p) + void writeDocSummary(IceInternal::Output& out, const ContainedPtr& p) { DocElements doc = parseComment(p); @@ -1286,7 +1285,7 @@ namespace out << nl; } - void writeOpDocSummary(IceUtilInternal::Output& out, const OperationPtr& p, bool async) + void writeOpDocSummary(IceInternal::Output& out, const OperationPtr& p, bool async) { DocElements doc = parseComment(p); @@ -1442,7 +1441,7 @@ namespace out << nl; } - void writeProxyDocSummary(IceUtilInternal::Output& out, const InterfaceDefPtr& p) + void writeProxyDocSummary(IceInternal::Output& out, const InterfaceDefPtr& p) { DocElements doc = parseComment(p); @@ -1512,7 +1511,7 @@ namespace out << nl; } - void writeMemberDoc(IceUtilInternal::Output& out, const DataMemberPtr& p) + void writeMemberDoc(IceInternal::Output& out, const DataMemberPtr& p) { DocElements doc = parseComment(p); @@ -1623,13 +1622,13 @@ class CodeVisitor final : public ParserVisitor string getOptionalFormat(const TypePtr&); string getFormatType(FormatType); - void marshal(IceUtilInternal::Output&, const string&, const string&, const TypePtr&, bool, int); - void unmarshal(IceUtilInternal::Output&, const string&, const string&, const TypePtr&, bool, int); + void marshal(IceInternal::Output&, const string&, const string&, const TypePtr&, bool, int); + void unmarshal(IceInternal::Output&, const string&, const string&, const TypePtr&, bool, int); - void unmarshalStruct(IceUtilInternal::Output&, const StructPtr&, const string&); - void convertStruct(IceUtilInternal::Output&, const StructPtr&, const string&); + void unmarshalStruct(IceInternal::Output&, const StructPtr&, const string&); + void convertStruct(IceInternal::Output&, const StructPtr&, const string&); - void writeBaseClassArrayParams(IceUtilInternal::Output&, const MemberInfoList&, bool); + void writeBaseClassArrayParams(IceInternal::Output&, const MemberInfoList&, bool); const string _dir; }; @@ -1649,7 +1648,7 @@ CodeVisitor::visitClassDefStart(const ClassDefPtr& p) ClassDefPtr base = p->base(); - IceUtilInternal::Output out; + IceInternal::Output out; openClass(abs, _dir, out); writeDocSummary(out, p); @@ -2054,7 +2053,7 @@ CodeVisitor::visitInterfaceDefStart(const InterfaceDefPtr& p) const string prxName = p->name() + "Prx"; const string prxAbs = getAbsolute(p, "", "Prx"); - IceUtilInternal::Output out; + IceInternal::Output out; openClass(prxAbs, _dir, out); writeProxyDocSummary(out, p); @@ -2600,7 +2599,7 @@ CodeVisitor::visitExceptionStart(const ExceptionPtr& p) const bool basePreserved = p->inheritsMetaData("preserve-slice"); const bool preserved = p->hasMetaData("preserve-slice"); - IceUtilInternal::Output out; + IceInternal::Output out; openClass(abs, _dir, out); writeDocSummary(out, p); @@ -2864,7 +2863,7 @@ CodeVisitor::visitStructStart(const StructPtr& p) const string scoped = p->scoped(); const string abs = getAbsolute(p); - IceUtilInternal::Output out; + IceInternal::Output out; openClass(abs, _dir, out); writeDocSummary(out, p); @@ -3062,7 +3061,7 @@ CodeVisitor::visitSequence(const SequencePtr& p) const bool proxy = isProxy(content); const bool convert = needsConversion(content); - IceUtilInternal::Output out; + IceInternal::Output out; openClass(abs, _dir, out); writeCopyright(out, p->file()); @@ -3321,7 +3320,7 @@ CodeVisitor::visitDictionary(const DictionaryPtr& p) const string abs = getAbsolute(p); const string self = name == "obj" ? "this" : "obj"; - IceUtilInternal::Output out; + IceInternal::Output out; openClass(abs, _dir, out); writeCopyright(out, p->file()); @@ -3556,7 +3555,7 @@ CodeVisitor::visitEnum(const EnumPtr& p) const string abs = getAbsolute(p); const EnumeratorList enumerators = p->enumerators(); - IceUtilInternal::Output out; + IceInternal::Output out; openClass(abs, _dir, out); writeDocSummary(out, p); @@ -3672,7 +3671,7 @@ CodeVisitor::visitConst(const ConstPtr& p) const string scoped = p->scoped(); const string abs = getAbsolute(p); - IceUtilInternal::Output out; + IceInternal::Output out; openClass(abs, _dir, out); writeDocSummary(out, p); @@ -3961,7 +3960,7 @@ CodeVisitor::getFormatType(FormatType type) void CodeVisitor::marshal( - IceUtilInternal::Output& out, + IceInternal::Output& out, const string& stream, const string& v, const TypePtr& type, @@ -4196,7 +4195,7 @@ CodeVisitor::marshal( void CodeVisitor::unmarshal( - IceUtilInternal::Output& out, + IceInternal::Output& out, const string& stream, const string& v, const TypePtr& type, @@ -4440,7 +4439,7 @@ CodeVisitor::unmarshal( } void -CodeVisitor::unmarshalStruct(IceUtilInternal::Output& out, const StructPtr& p, const string& v) +CodeVisitor::unmarshalStruct(IceInternal::Output& out, const StructPtr& p, const string& v) { for (const auto& dm : p->dataMembers()) { @@ -4459,7 +4458,7 @@ CodeVisitor::unmarshalStruct(IceUtilInternal::Output& out, const StructPtr& p, c } void -CodeVisitor::convertStruct(IceUtilInternal::Output& out, const StructPtr& p, const string& v) +CodeVisitor::convertStruct(IceInternal::Output& out, const StructPtr& p, const string& v) { for (const auto& dm : p->dataMembers()) { @@ -4476,7 +4475,7 @@ CodeVisitor::convertStruct(IceUtilInternal::Output& out, const StructPtr& p, con } void -CodeVisitor::writeBaseClassArrayParams(IceUtilInternal::Output& out, const MemberInfoList& members, bool noInit) +CodeVisitor::writeBaseClassArrayParams(IceInternal::Output& out, const MemberInfoList& members, bool noInit) { out << nl << "v = { "; bool first = true; @@ -4536,18 +4535,18 @@ usage(const string& n) int compile(const vector& argv) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); opts.addOpt("", "validate"); - opts.addOpt("D", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("U", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + opts.addOpt("D", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("U", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("I", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); opts.addOpt("E"); - opts.addOpt("", "output-dir", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "output-dir", IceInternal::Options::NeedArg); opts.addOpt("", "depend"); opts.addOpt("", "depend-xml"); - opts.addOpt("", "depend-file", IceUtilInternal::Options::NeedArg, ""); + opts.addOpt("", "depend-file", IceInternal::Options::NeedArg, ""); opts.addOpt("", "list-generated"); opts.addOpt("d", "debug"); opts.addOpt("", "all"); @@ -4559,7 +4558,7 @@ compile(const vector& argv) { args = opts.parse(argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << argv[0] << ": error: " << e.reason << endl; if (!validate) diff --git a/cpp/src/slice2matlab/Slice2Matlab.rc b/cpp/src/slice2matlab/Slice2Matlab.rc index 3205b236e28..8dc719224ef 100644 --- a/cpp/src/slice2matlab/Slice2Matlab.rc +++ b/cpp/src/slice2matlab/Slice2Matlab.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "slice2matlab\0" #define ICE_ORIGINALFILENAME "slice2matlab.exe\0" diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp index 5dc8819a9b4..9bc95826e97 100644 --- a/cpp/src/slice2php/Main.cpp +++ b/cpp/src/slice2php/Main.cpp @@ -2,9 +2,9 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" -#include "../IceUtil/OutputUtil.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" +#include "../Ice/OutputUtil.h" #include "../Slice/FileTracker.h" #include "../Slice/Parser.h" #include "../Slice/Preprocessor.h" @@ -41,7 +41,7 @@ using namespace std; using namespace Slice; using namespace Slice::PHP; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -58,7 +58,7 @@ namespace class CodeVisitor final : public ParserVisitor { public: - CodeVisitor(IceUtilInternal::Output&); + CodeVisitor(IceInternal::Output&); void visitClassDecl(const ClassDeclPtr&) final; bool visitClassDefStart(const ClassDefPtr&) final; @@ -1306,7 +1306,7 @@ generate(const UnitPtr& un, bool all, const vector& includePaths, Output } static void -printHeader(IceUtilInternal::Output& out) +printHeader(IceInternal::Output& out) { static const char* header = "//\n" "// Copyright (c) ZeroC, Inc. All rights reserved.\n" @@ -1355,18 +1355,18 @@ usage(const string& n) int compile(const vector& argv) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); opts.addOpt("", "validate"); - opts.addOpt("D", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("U", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + opts.addOpt("D", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("U", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("I", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); opts.addOpt("E"); - opts.addOpt("", "output-dir", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "output-dir", IceInternal::Options::NeedArg); opts.addOpt("", "depend"); opts.addOpt("", "depend-xml"); - opts.addOpt("", "depend-file", IceUtilInternal::Options::NeedArg, ""); + opts.addOpt("", "depend-file", IceInternal::Options::NeedArg, ""); opts.addOpt("d", "debug"); opts.addOpt("", "all"); @@ -1377,7 +1377,7 @@ compile(const vector& argv) { args = opts.parse(argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << argv[0] << ": error: " << e.reason << endl; if (!validate) @@ -1567,7 +1567,7 @@ compile(const vector& argv) try { - IceUtilInternal::Output out; + IceInternal::Output out; out.open(file.c_str()); if (!out) { diff --git a/cpp/src/slice2php/Slice2PHP.rc b/cpp/src/slice2php/Slice2PHP.rc index ecd094c5c82..e8661c1774c 100644 --- a/cpp/src/slice2php/Slice2PHP.rc +++ b/cpp/src/slice2php/Slice2PHP.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "slice2php\0" #define ICE_ORIGINALFILENAME "slice2php.exe\0" diff --git a/cpp/src/slice2py/Main.cpp b/cpp/src/slice2py/Main.cpp index 558a48d5819..1f48a8aab66 100644 --- a/cpp/src/slice2py/Main.cpp +++ b/cpp/src/slice2py/Main.cpp @@ -2,14 +2,14 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" +#include "../Ice/ConsoleUtil.h" #include "../Slice/Util.h" #include "PythonUtil.h" using namespace std; using namespace Slice; using namespace Slice::Python; -using namespace IceUtilInternal; +using namespace IceInternal; #ifdef _WIN32 int diff --git a/cpp/src/slice2py/Python.cpp b/cpp/src/slice2py/Python.cpp index 6a90b371ade..b29aa1aead6 100644 --- a/cpp/src/slice2py/Python.cpp +++ b/cpp/src/slice2py/Python.cpp @@ -2,12 +2,12 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" #include "Ice/CtrlCHandler.h" #include "Ice/StringUtil.h" // BUGFIX: With MSVC2013 if this isn't included you get strange linker errors. -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "../Slice/FileTracker.h" #include "../Slice/Preprocessor.h" #include "../Slice/Util.h" @@ -30,7 +30,7 @@ using namespace std; using namespace Slice; using namespace Slice::Python; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -46,8 +46,8 @@ namespace void createDirectory(const string& dir) { - IceUtilInternal::structstat st; - if (!IceUtilInternal::stat(dir, &st)) + IceInternal::structstat st; + if (!IceInternal::stat(dir, &st)) { if (!(st.st_mode & S_IFDIR)) { @@ -58,7 +58,7 @@ namespace return; } - if (IceUtilInternal::mkdir(dir, 0777) != 0) + if (IceInternal::mkdir(dir, 0777) != 0) { ostringstream os; os << "cannot create directory '" << dir << "': " << IceInternal::errorToString(errno); @@ -72,7 +72,7 @@ namespace // void createPackageDirectory(const string& output, const string& pkgdir) { - assert(output.empty() || IceUtilInternal::directoryExists(output)); + assert(output.empty() || IceInternal::directoryExists(output)); assert(!pkgdir.empty()); vector elements; @@ -94,10 +94,10 @@ namespace path += "/"; } path += *p; - IceUtilInternal::structstat st; - if (IceUtilInternal::stat(path, &st) < 0) + IceInternal::structstat st; + if (IceInternal::stat(path, &st) < 0) { - if (IceUtilInternal::mkdir(path, 0777) != 0) + if (IceInternal::mkdir(path, 0777) != 0) { ostringstream os; os << "cannot create directory '" << path << "': " << IceInternal::errorToString(errno); @@ -118,12 +118,12 @@ namespace // can be empty. // const string initFile = path + "/__init__.py"; - if (!IceUtilInternal::fileExists(initFile)) + if (!IceInternal::fileExists(initFile)) { // // Create an empty file. // - IceUtilInternal::Output out; + IceInternal::Output out; out.open(initFile.c_str()); if (!out) { @@ -278,10 +278,10 @@ namespace { string initPath = dir + "/__init__.py"; - IceUtilInternal::structstat st; - if (!IceUtilInternal::stat(initPath, &st)) + IceInternal::structstat st; + if (!IceInternal::stat(initPath, &st)) { - ifstream in(IceUtilInternal::streamFilename(initPath).c_str()); + ifstream in(IceInternal::streamFilename(initPath).c_str()); if (!in) { ostringstream os; @@ -376,7 +376,7 @@ namespace { string initPath = dir + "/__init__.py"; - ofstream os(IceUtilInternal::streamFilename(initPath).c_str()); + ofstream os(IceInternal::streamFilename(initPath).c_str()); if (!os) { ostringstream oss; @@ -425,29 +425,29 @@ namespace int Slice::Python::compile(const vector& argv) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); - opts.addOpt("D", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("U", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + opts.addOpt("D", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("U", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("I", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); opts.addOpt("E"); - opts.addOpt("", "output-dir", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "output-dir", IceInternal::Options::NeedArg); opts.addOpt("", "depend"); opts.addOpt("", "depend-xml"); - opts.addOpt("", "depend-file", IceUtilInternal::Options::NeedArg, ""); + opts.addOpt("", "depend-file", IceInternal::Options::NeedArg, ""); opts.addOpt("d", "debug"); opts.addOpt("", "all"); opts.addOpt("", "no-package"); opts.addOpt("", "build-package"); - opts.addOpt("", "prefix", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "prefix", IceInternal::Options::NeedArg); vector args; try { args = opts.parse(argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << argv[0] << ": error: " << e.reason << endl; usage(argv[0]); @@ -526,7 +526,7 @@ Slice::Python::compile(const vector& argv) return EXIT_FAILURE; } - if (!output.empty() && !IceUtilInternal::directoryExists(output)) + if (!output.empty() && !IceInternal::directoryExists(output)) { consoleErr << argv[0] << ": error: argument for --output-dir does not exist or is not a directory" << endl; return EXIT_FAILURE; @@ -698,7 +698,7 @@ Slice::Python::compile(const vector& argv) // path += "_ice.py"; - IceUtilInternal::Output out; + IceInternal::Output out; out.open(path.c_str()); if (!out) { diff --git a/cpp/src/slice2py/PythonUtil.cpp b/cpp/src/slice2py/PythonUtil.cpp index d727cd0d64e..57681742778 100644 --- a/cpp/src/slice2py/PythonUtil.cpp +++ b/cpp/src/slice2py/PythonUtil.cpp @@ -13,7 +13,6 @@ using namespace std; using namespace Slice; using namespace IceInternal; -using namespace IceUtilInternal; namespace { @@ -95,7 +94,7 @@ namespace Slice class CodeVisitor final : public ParserVisitor { public: - CodeVisitor(IceUtilInternal::Output&, set&); + CodeVisitor(IceInternal::Output&, set&); bool visitModuleStart(const ModulePtr&) final; void visitModuleEnd(const ModulePtr&) final; @@ -2886,7 +2885,7 @@ Slice::Python::getAbsolute(const ContainedPtr& cont, const string& suffix, const } void -Slice::Python::printHeader(IceUtilInternal::Output& out) +Slice::Python::printHeader(IceInternal::Output& out) { static const char* header = "#\n" "# Copyright (c) ZeroC, Inc. All rights reserved.\n" diff --git a/cpp/src/slice2py/PythonUtil.h b/cpp/src/slice2py/PythonUtil.h index 407d1255bcd..df6ac9562af 100644 --- a/cpp/src/slice2py/PythonUtil.h +++ b/cpp/src/slice2py/PythonUtil.h @@ -5,7 +5,7 @@ #ifndef SLICE_PYTHON_UTIL_H #define SLICE_PYTHON_UTIL_H -#include "../IceUtil/OutputUtil.h" +#include "../Ice/OutputUtil.h" #include "../Slice/Parser.h" namespace Slice @@ -26,7 +26,7 @@ namespace Slice // // Generate Python code for a translation unit. // - void generate(const Slice::UnitPtr&, bool, const std::vector&, IceUtilInternal::Output&); + void generate(const Slice::UnitPtr&, bool, const std::vector&, IceInternal::Output&); // // Convert a scoped name into a Python name. @@ -59,7 +59,7 @@ namespace Slice // // Emit a comment header. // - void printHeader(IceUtilInternal::Output&); + void printHeader(IceInternal::Output&); int compile(const std::vector&); diff --git a/cpp/src/slice2py/Slice2Py.rc b/cpp/src/slice2py/Slice2Py.rc index af3eb0332dd..34d06bc8744 100644 --- a/cpp/src/slice2py/Slice2Py.rc +++ b/cpp/src/slice2py/Slice2Py.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "slice2py\0" #define ICE_ORIGINALFILENAME "slice2py.exe\0" diff --git a/cpp/src/slice2rb/Main.cpp b/cpp/src/slice2rb/Main.cpp index cbfe0622541..1d5a187c7f8 100644 --- a/cpp/src/slice2rb/Main.cpp +++ b/cpp/src/slice2rb/Main.cpp @@ -2,14 +2,14 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" +#include "../Ice/ConsoleUtil.h" #include "../Slice/Util.h" #include "RubyUtil.h" using namespace std; using namespace Slice; using namespace Slice::Ruby; -using namespace IceUtilInternal; +using namespace IceInternal; #ifdef _WIN32 int diff --git a/cpp/src/slice2rb/Ruby.cpp b/cpp/src/slice2rb/Ruby.cpp index f5cecac4cfa..3b895b3999e 100644 --- a/cpp/src/slice2rb/Ruby.cpp +++ b/cpp/src/slice2rb/Ruby.cpp @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" #include "../Slice/FileTracker.h" #include "../Slice/Preprocessor.h" #include "../Slice/Util.h" @@ -19,7 +19,7 @@ using namespace std; using namespace Slice; using namespace Slice::Ruby; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -55,17 +55,17 @@ namespace int Slice::Ruby::compile(const vector& argv) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); - opts.addOpt("D", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("U", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + opts.addOpt("D", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("U", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("I", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); opts.addOpt("E"); - opts.addOpt("", "output-dir", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "output-dir", IceInternal::Options::NeedArg); opts.addOpt("", "depend"); opts.addOpt("", "depend-xml"); - opts.addOpt("", "depend-file", IceUtilInternal::Options::NeedArg, ""); + opts.addOpt("", "depend-file", IceInternal::Options::NeedArg, ""); opts.addOpt("d", "debug"); opts.addOpt("", "all"); @@ -74,7 +74,7 @@ Slice::Ruby::compile(const vector& argv) { args = opts.parse(argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << argv[0] << ": error: " << e.reason << endl; usage(argv[0]); @@ -252,7 +252,7 @@ Slice::Ruby::compile(const vector& argv) try { - IceUtilInternal::Output out; + IceInternal::Output out; out.open(file.c_str()); if (!out) { diff --git a/cpp/src/slice2rb/RubyUtil.cpp b/cpp/src/slice2rb/RubyUtil.cpp index 8cb13df1550..05327893b82 100644 --- a/cpp/src/slice2rb/RubyUtil.cpp +++ b/cpp/src/slice2rb/RubyUtil.cpp @@ -3,7 +3,7 @@ // #include "RubyUtil.h" -#include "../IceUtil/FileUtil.h" +#include "../Ice/FileUtil.h" #include "../Slice/Util.h" #include @@ -12,7 +12,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -41,7 +41,7 @@ namespace Slice class CodeVisitor final : public ParserVisitor { public: - CodeVisitor(IceUtilInternal::Output&); + CodeVisitor(IceInternal::Output&); bool visitModuleStart(const ModulePtr&) final; void visitModuleEnd(const ModulePtr&) final; @@ -1494,7 +1494,7 @@ Slice::Ruby::getAbsolute(const ContainedPtr& cont, IdentStyle style, const strin } void -Slice::Ruby::printHeader(IceUtilInternal::Output& out) +Slice::Ruby::printHeader(IceInternal::Output& out) { static const char* header = "#\n" "# Copyright (c) ZeroC, Inc. All rights reserved.\n" diff --git a/cpp/src/slice2rb/RubyUtil.h b/cpp/src/slice2rb/RubyUtil.h index d2eb8cb3c81..1fdda3d4048 100644 --- a/cpp/src/slice2rb/RubyUtil.h +++ b/cpp/src/slice2rb/RubyUtil.h @@ -5,7 +5,7 @@ #ifndef SLICE_RUBY_UTIL_H #define SLICE_RUBY_UTIL_H -#include "../IceUtil/OutputUtil.h" +#include "../Ice/OutputUtil.h" #include "../Slice/Parser.h" namespace Slice @@ -15,7 +15,7 @@ namespace Slice // // Generate Ruby code for a translation unit. // - void generate(const Slice::UnitPtr&, bool, const std::vector&, IceUtilInternal::Output&); + void generate(const Slice::UnitPtr&, bool, const std::vector&, IceInternal::Output&); // // Check the given identifier against Ruby's list of reserved words. If it matches @@ -38,7 +38,7 @@ namespace Slice // // Emit a comment header. // - void printHeader(IceUtilInternal::Output&); + void printHeader(IceInternal::Output&); int compile(const std::vector&); diff --git a/cpp/src/slice2rb/Slice2Rb.rc b/cpp/src/slice2rb/Slice2Rb.rc index a1f9ed15785..0aacbd497b8 100644 --- a/cpp/src/slice2rb/Slice2Rb.rc +++ b/cpp/src/slice2rb/Slice2Rb.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "slice2rb\0" #define ICE_ORIGINALFILENAME "slice2rb.exe\0" diff --git a/cpp/src/slice2swift/Gen.cpp b/cpp/src/slice2swift/Gen.cpp index 50e76b2b45c..c71703ba5c0 100644 --- a/cpp/src/slice2swift/Gen.cpp +++ b/cpp/src/slice2swift/Gen.cpp @@ -3,7 +3,7 @@ // // -#include "../IceUtil/OutputUtil.h" +#include "../Ice/OutputUtil.h" #include "../Slice/FileTracker.h" #include "../Slice/Parser.h" #include "../Slice/Util.h" @@ -17,7 +17,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -116,7 +116,7 @@ Gen::printHeader() _out << "//\n"; } -Gen::ImportVisitor::ImportVisitor(IceUtilInternal::Output& o) : out(o) {} +Gen::ImportVisitor::ImportVisitor(IceInternal::Output& o) : out(o) {} bool Gen::ImportVisitor::visitModuleStart(const ModulePtr& p) @@ -308,7 +308,7 @@ Gen::ImportVisitor::addImport(const string& module) } } -Gen::TypesVisitor::TypesVisitor(IceUtilInternal::Output& o) : out(o) {} +Gen::TypesVisitor::TypesVisitor(IceInternal::Output& o) : out(o) {} bool Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) @@ -1080,7 +1080,7 @@ Gen::TypesVisitor::visitConst(const ConstPtr& p) out << nl; } -Gen::ProxyVisitor::ProxyVisitor(::IceUtilInternal::Output& o) : out(o) {} +Gen::ProxyVisitor::ProxyVisitor(::IceInternal::Output& o) : out(o) {} bool Gen::ProxyVisitor::visitModuleStart(const ModulePtr& p) @@ -1275,7 +1275,7 @@ Gen::ProxyVisitor::visitOperation(const OperationPtr& op) writeProxyAsyncOperation(out, op); } -Gen::ValueVisitor::ValueVisitor(::IceUtilInternal::Output& o) : out(o) {} +Gen::ValueVisitor::ValueVisitor(::IceInternal::Output& o) : out(o) {} bool Gen::ValueVisitor::visitClassDefStart(const ClassDefPtr& p) @@ -1439,7 +1439,7 @@ Gen::ValueVisitor::visitClassDefEnd(const ClassDefPtr&) out << eb; } -Gen::ObjectVisitor::ObjectVisitor(::IceUtilInternal::Output& o) : out(o) {} +Gen::ObjectVisitor::ObjectVisitor(::IceInternal::Output& o) : out(o) {} bool Gen::ObjectVisitor::visitInterfaceDefStart(const InterfaceDefPtr& p) @@ -1603,7 +1603,7 @@ Gen::ObjectVisitor::visitOperation(const OperationPtr& op) } } -Gen::ObjectExtVisitor::ObjectExtVisitor(::IceUtilInternal::Output& o) : out(o) {} +Gen::ObjectExtVisitor::ObjectExtVisitor(::IceInternal::Output& o) : out(o) {} bool Gen::ObjectExtVisitor::visitInterfaceDefStart(const InterfaceDefPtr& p) diff --git a/cpp/src/slice2swift/Gen.h b/cpp/src/slice2swift/Gen.h index e455a2f777f..2a028045988 100644 --- a/cpp/src/slice2swift/Gen.h +++ b/cpp/src/slice2swift/Gen.h @@ -25,7 +25,7 @@ namespace Slice void printHeader(); private: - IceUtilInternal::Output _out; + IceInternal::Output _out; std::vector _includePaths; std::string _fileBase; @@ -33,7 +33,7 @@ namespace Slice class ImportVisitor final : public SwiftGenerator, public ParserVisitor { public: - ImportVisitor(IceUtilInternal::Output&); + ImportVisitor(IceInternal::Output&); bool visitModuleStart(const ModulePtr&) final; bool visitClassDefStart(const ClassDefPtr&) final; @@ -50,14 +50,14 @@ namespace Slice void addImport(const ContainedPtr&, const ContainedPtr&); void addImport(const std::string&); - IceUtilInternal::Output& out; + IceInternal::Output& out; std::vector _imports; }; class TypesVisitor final : public SwiftGenerator, public ParserVisitor { public: - TypesVisitor(IceUtilInternal::Output&); + TypesVisitor(IceInternal::Output&); bool visitClassDefStart(const ClassDefPtr&) final; bool visitInterfaceDefStart(const InterfaceDefPtr&) final; @@ -69,13 +69,13 @@ namespace Slice void visitConst(const ConstPtr&) final; private: - IceUtilInternal::Output& out; + IceInternal::Output& out; }; class ProxyVisitor final : public SwiftGenerator, public ParserVisitor { public: - ProxyVisitor(::IceUtilInternal::Output&); + ProxyVisitor(::IceInternal::Output&); bool visitModuleStart(const ModulePtr&) final; bool visitInterfaceDefStart(const InterfaceDefPtr&) final; @@ -83,45 +83,45 @@ namespace Slice void visitOperation(const OperationPtr&) final; private: - IceUtilInternal::Output& out; + IceInternal::Output& out; }; class ValueVisitor final : public SwiftGenerator, public ParserVisitor { public: - ValueVisitor(::IceUtilInternal::Output&); + ValueVisitor(::IceInternal::Output&); bool visitClassDefStart(const ClassDefPtr&) final; void visitClassDefEnd(const ClassDefPtr&) final; private: - IceUtilInternal::Output& out; + IceInternal::Output& out; }; class ObjectVisitor final : public SwiftGenerator, public ParserVisitor { public: - ObjectVisitor(::IceUtilInternal::Output&); + ObjectVisitor(::IceInternal::Output&); bool visitInterfaceDefStart(const InterfaceDefPtr&) final; void visitInterfaceDefEnd(const InterfaceDefPtr&) final; void visitOperation(const OperationPtr&) final; private: - IceUtilInternal::Output& out; + IceInternal::Output& out; }; class ObjectExtVisitor final : public SwiftGenerator, public ParserVisitor { public: - ObjectExtVisitor(::IceUtilInternal::Output&); + ObjectExtVisitor(::IceInternal::Output&); bool visitInterfaceDefStart(const InterfaceDefPtr&) final; void visitInterfaceDefEnd(const InterfaceDefPtr&) final; void visitOperation(const OperationPtr&) final; private: - IceUtilInternal::Output& out; + IceInternal::Output& out; }; }; } diff --git a/cpp/src/slice2swift/Main.cpp b/cpp/src/slice2swift/Main.cpp index 360bdb45aa3..2de725f4044 100644 --- a/cpp/src/slice2swift/Main.cpp +++ b/cpp/src/slice2swift/Main.cpp @@ -2,8 +2,8 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../IceUtil/ConsoleUtil.h" -#include "../IceUtil/Options.h" +#include "../Ice/ConsoleUtil.h" +#include "../Ice/Options.h" #include "../Slice/FileTracker.h" #include "../Slice/Parser.h" #include "../Slice/Preprocessor.h" @@ -18,7 +18,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -56,18 +56,18 @@ usage(const string& n) int compile(const vector& argv) { - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); opts.addOpt("", "validate"); - opts.addOpt("D", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("U", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + opts.addOpt("D", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("U", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("I", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); opts.addOpt("E"); - opts.addOpt("", "output-dir", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "output-dir", IceInternal::Options::NeedArg); opts.addOpt("", "depend"); opts.addOpt("", "depend-xml"); - opts.addOpt("", "depend-file", IceUtilInternal::Options::NeedArg, ""); + opts.addOpt("", "depend-file", IceInternal::Options::NeedArg, ""); opts.addOpt("d", "debug"); bool validate = find(argv.begin(), argv.end(), "--validate") != argv.end(); @@ -77,7 +77,7 @@ compile(const vector& argv) { args = opts.parse(argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { consoleErr << argv[0] << ": error: " << e.reason << endl; if (!validate) diff --git a/cpp/src/slice2swift/Slice2Swift.rc b/cpp/src/slice2swift/Slice2Swift.rc index c9cce7d9858..cc391343bfe 100644 --- a/cpp/src/slice2swift/Slice2Swift.rc +++ b/cpp/src/slice2swift/Slice2Swift.rc @@ -1,4 +1,4 @@ -#include "../IceUtil/ResourceConfig.h" +#include "../Ice/ResourceConfig.h" #define ICE_INTERNALNAME "slice2swift\0" #define ICE_ORIGINALFILENAME "slice2swift.exe\0" diff --git a/cpp/src/slice2swift/SwiftUtil.cpp b/cpp/src/slice2swift/SwiftUtil.cpp index 8eb9d070fcd..860422b7628 100644 --- a/cpp/src/slice2swift/SwiftUtil.cpp +++ b/cpp/src/slice2swift/SwiftUtil.cpp @@ -3,7 +3,7 @@ // // -#include "../IceUtil/OutputUtil.h" +#include "../Ice/OutputUtil.h" #include "Ice/StringUtil.h" #include "../Slice/Util.h" @@ -15,7 +15,7 @@ using namespace std; using namespace Slice; -using namespace IceUtilInternal; +using namespace IceInternal; namespace { @@ -558,11 +558,7 @@ SwiftGenerator::parseComment(const ContainedPtr& p) } void -SwiftGenerator::writeDocLines( - IceUtilInternal::Output& out, - const StringList& lines, - bool commentFirst, - const string& space) +SwiftGenerator::writeDocLines(IceInternal::Output& out, const StringList& lines, bool commentFirst, const string& space) { StringList l = lines; if (!commentFirst) @@ -582,7 +578,7 @@ SwiftGenerator::writeDocLines( } void -SwiftGenerator::writeDocSentence(IceUtilInternal::Output& out, const StringList& lines) +SwiftGenerator::writeDocSentence(IceInternal::Output& out, const StringList& lines) { // // Write the first sentence. @@ -636,7 +632,7 @@ SwiftGenerator::writeDocSentence(IceUtilInternal::Output& out, const StringList& } void -SwiftGenerator::writeDocSummary(IceUtilInternal::Output& out, const ContainedPtr& p) +SwiftGenerator::writeDocSummary(IceInternal::Output& out, const ContainedPtr& p) { DocElements doc = parseComment(p); @@ -668,7 +664,7 @@ SwiftGenerator::writeDocSummary(IceUtilInternal::Output& out, const ContainedPtr } void -SwiftGenerator::writeOpDocSummary(IceUtilInternal::Output& out, const OperationPtr& p, bool async, bool dispatch) +SwiftGenerator::writeOpDocSummary(IceInternal::Output& out, const OperationPtr& p, bool async, bool dispatch) { DocElements doc = parseComment(p); if (!doc.overview.empty()) @@ -815,7 +811,7 @@ SwiftGenerator::writeOpDocSummary(IceUtilInternal::Output& out, const OperationP } void -SwiftGenerator::writeProxyDocSummary(IceUtilInternal::Output& out, const InterfaceDefPtr& p, const string& swiftModule) +SwiftGenerator::writeProxyDocSummary(IceInternal::Output& out, const InterfaceDefPtr& p, const string& swiftModule) { DocElements doc = parseComment(p); @@ -863,10 +859,7 @@ SwiftGenerator::writeProxyDocSummary(IceUtilInternal::Output& out, const Interfa } void -SwiftGenerator::writeServantDocSummary( - IceUtilInternal::Output& out, - const InterfaceDefPtr& p, - const string& swiftModule) +SwiftGenerator::writeServantDocSummary(IceInternal::Output& out, const InterfaceDefPtr& p, const string& swiftModule) { DocElements doc = parseComment(p); @@ -906,7 +899,7 @@ SwiftGenerator::writeServantDocSummary( } void -SwiftGenerator::writeMemberDoc(IceUtilInternal::Output& out, const DataMemberPtr& p) +SwiftGenerator::writeMemberDoc(IceInternal::Output& out, const DataMemberPtr& p) { DocElements doc = parseComment(p); @@ -1046,7 +1039,7 @@ SwiftGenerator::getValue(const string& swiftModule, const TypePtr& type) void SwiftGenerator::writeConstantValue( - IceUtilInternal::Output& out, + IceInternal::Output& out, const TypePtr& type, const SyntaxTreeBasePtr& valueType, const string& value, @@ -1404,7 +1397,7 @@ SwiftGenerator::isProxyType(const TypePtr& p) } void -SwiftGenerator::writeDefaultInitializer(IceUtilInternal::Output& out, bool required, bool rootClass) +SwiftGenerator::writeDefaultInitializer(IceInternal::Output& out, bool required, bool rootClass) { out << sp; out << nl << "public "; @@ -1428,7 +1421,7 @@ SwiftGenerator::writeDefaultInitializer(IceUtilInternal::Output& out, bool requi void SwiftGenerator::writeMemberwiseInitializer( - IceUtilInternal::Output& out, + IceInternal::Output& out, const DataMemberList& members, const ContainedPtr& p) { @@ -1437,7 +1430,7 @@ SwiftGenerator::writeMemberwiseInitializer( void SwiftGenerator::writeMemberwiseInitializer( - IceUtilInternal::Output& out, + IceInternal::Output& out, const DataMemberList& members, const DataMemberList& baseMembers, const DataMemberList& allMembers, @@ -1490,7 +1483,7 @@ SwiftGenerator::writeMemberwiseInitializer( void SwiftGenerator::writeMembers( - IceUtilInternal::Output& out, + IceInternal::Output& out, const DataMemberList& members, const ContainedPtr& p, int typeCtx) @@ -2144,7 +2137,7 @@ SwiftGenerator::getOutParams(const OperationPtr& op, ParamInfoList& required, Pa } void -SwiftGenerator::writeMarshalInParams(::IceUtilInternal::Output& out, const OperationPtr& op) +SwiftGenerator::writeMarshalInParams(::IceInternal::Output& out, const OperationPtr& op) { ParamInfoList requiredInParams, optionalInParams; getInParams(op, requiredInParams, optionalInParams); @@ -2176,7 +2169,7 @@ SwiftGenerator::writeMarshalInParams(::IceUtilInternal::Output& out, const Opera } void -SwiftGenerator::writeMarshalOutParams(::IceUtilInternal::Output& out, const OperationPtr& op) +SwiftGenerator::writeMarshalOutParams(::IceInternal::Output& out, const OperationPtr& op) { ParamInfoList requiredOutParams, optionalOutParams; getOutParams(op, requiredOutParams, optionalOutParams); @@ -2204,7 +2197,7 @@ SwiftGenerator::writeMarshalOutParams(::IceUtilInternal::Output& out, const Oper } void -SwiftGenerator::writeMarshalAsyncOutParams(::IceUtilInternal::Output& out, const OperationPtr& op) +SwiftGenerator::writeMarshalAsyncOutParams(::IceInternal::Output& out, const OperationPtr& op) { ParamInfoList requiredOutParams, optionalOutParams; getOutParams(op, requiredOutParams, optionalOutParams); @@ -2233,7 +2226,7 @@ SwiftGenerator::writeMarshalAsyncOutParams(::IceUtilInternal::Output& out, const } void -SwiftGenerator::writeUnmarshalOutParams(::IceUtilInternal::Output& out, const OperationPtr& op) +SwiftGenerator::writeUnmarshalOutParams(::IceInternal::Output& out, const OperationPtr& op) { TypePtr returnType = op->returnType(); @@ -2312,7 +2305,7 @@ SwiftGenerator::writeUnmarshalOutParams(::IceUtilInternal::Output& out, const Op } void -SwiftGenerator::writeUnmarshalInParams(::IceUtilInternal::Output& out, const OperationPtr& op) +SwiftGenerator::writeUnmarshalInParams(::IceInternal::Output& out, const OperationPtr& op) { ParamInfoList requiredInParams, optionalInParams; getInParams(op, requiredInParams, optionalInParams); @@ -2362,7 +2355,7 @@ SwiftGenerator::writeUnmarshalInParams(::IceUtilInternal::Output& out, const Ope } void -SwiftGenerator::writeUnmarshalUserException(::IceUtilInternal::Output& out, const OperationPtr& op) +SwiftGenerator::writeUnmarshalUserException(::IceInternal::Output& out, const OperationPtr& op) { const string swiftModule = getSwiftModule(getTopLevelModule(dynamic_pointer_cast(op))); ExceptionList throws = op->throws(); @@ -2387,7 +2380,7 @@ SwiftGenerator::writeUnmarshalUserException(::IceUtilInternal::Output& out, cons } void -SwiftGenerator::writeSwiftAttributes(::IceUtilInternal::Output& out, const StringList& metadata) +SwiftGenerator::writeSwiftAttributes(::IceInternal::Output& out, const StringList& metadata) { static const string prefix = "swift:attribute:"; for (StringList::const_iterator q = metadata.begin(); q != metadata.end(); ++q) @@ -2400,7 +2393,7 @@ SwiftGenerator::writeSwiftAttributes(::IceUtilInternal::Output& out, const Strin } void -SwiftGenerator::writeProxyOperation(::IceUtilInternal::Output& out, const OperationPtr& op) +SwiftGenerator::writeProxyOperation(::IceInternal::Output& out, const OperationPtr& op) { const string opName = fixIdent(op->name()); @@ -2486,7 +2479,7 @@ SwiftGenerator::writeProxyOperation(::IceUtilInternal::Output& out, const Operat } void -SwiftGenerator::writeProxyAsyncOperation(::IceUtilInternal::Output& out, const OperationPtr& op) +SwiftGenerator::writeProxyAsyncOperation(::IceInternal::Output& out, const OperationPtr& op) { const string opName = fixIdent(op->name() + "Async"); @@ -2577,7 +2570,7 @@ SwiftGenerator::writeProxyAsyncOperation(::IceUtilInternal::Output& out, const O } void -SwiftGenerator::writeDispatchOperation(::IceUtilInternal::Output& out, const OperationPtr& op) +SwiftGenerator::writeDispatchOperation(::IceInternal::Output& out, const OperationPtr& op) { const string opName = op->name(); diff --git a/cpp/src/slice2swift/SwiftUtil.h b/cpp/src/slice2swift/SwiftUtil.h index b61b8318175..e4f9ae999e8 100644 --- a/cpp/src/slice2swift/SwiftUtil.h +++ b/cpp/src/slice2swift/SwiftUtil.h @@ -5,7 +5,7 @@ #ifndef SWIFT_UTIL_H #define SWIFT_UTIL_H -#include "../IceUtil/OutputUtil.h" +#include "../Ice/OutputUtil.h" #include "../Slice/Parser.h" typedef std::list> StringPairList; @@ -64,18 +64,18 @@ namespace Slice bool parseCommentLine(const std::string&, const std::string&, bool, std::string&, std::string&); DocElements parseComment(const ContainedPtr&); void writeDocLines( - IceUtilInternal::Output&, + IceInternal::Output&, const StringList&, bool commentFirst = true, const std::string& space = " "); - void writeDocSentence(IceUtilInternal::Output&, const StringList&); - void writeSeeAlso(IceUtilInternal::Output&, const StringList&, const ContainerPtr&); - void writeDocSummary(IceUtilInternal::Output&, const ContainedPtr&); - void writeOpDocSummary(IceUtilInternal::Output&, const OperationPtr&, bool, bool); + void writeDocSentence(IceInternal::Output&, const StringList&); + void writeSeeAlso(IceInternal::Output&, const StringList&, const ContainerPtr&); + void writeDocSummary(IceInternal::Output&, const ContainedPtr&); + void writeOpDocSummary(IceInternal::Output&, const OperationPtr&, bool, bool); - void writeProxyDocSummary(IceUtilInternal::Output&, const InterfaceDefPtr&, const std::string&); - void writeServantDocSummary(IceUtilInternal::Output&, const InterfaceDefPtr&, const std::string&); - void writeMemberDoc(IceUtilInternal::Output&, const DataMemberPtr&); + void writeProxyDocSummary(IceInternal::Output&, const InterfaceDefPtr&, const std::string&); + void writeServantDocSummary(IceInternal::Output&, const InterfaceDefPtr&, const std::string&); + void writeMemberDoc(IceInternal::Output&, const DataMemberPtr&); std::string paramLabel(const std::string&, const ParamDeclList&); std::string operationReturnType(const OperationPtr&, int typeCtx = 0); @@ -115,27 +115,27 @@ namespace Slice std::string getValue(const std::string&, const TypePtr&); void writeConstantValue( - IceUtilInternal::Output& out, + IceInternal::Output& out, const TypePtr&, const SyntaxTreeBasePtr&, const std::string&, const StringList&, const std::string&, bool optional = false); - void writeDefaultInitializer(IceUtilInternal::Output&, bool, bool); - void writeMemberwiseInitializer(IceUtilInternal::Output&, const DataMemberList&, const ContainedPtr&); + void writeDefaultInitializer(IceInternal::Output&, bool, bool); + void writeMemberwiseInitializer(IceInternal::Output&, const DataMemberList&, const ContainedPtr&); void writeMemberwiseInitializer( - IceUtilInternal::Output&, + IceInternal::Output&, const DataMemberList&, const DataMemberList&, const DataMemberList&, const ContainedPtr&, bool rootClass = false, const StringPairList& = StringPairList()); - void writeMembers(IceUtilInternal::Output&, const DataMemberList&, const ContainedPtr&, int = 0); + void writeMembers(IceInternal::Output&, const DataMemberList&, const ContainedPtr&, int = 0); void writeMarshalUnmarshalCode( - ::IceUtilInternal::Output&, + ::IceInternal::Output&, const TypePtr&, const ContainedPtr&, const std::string&, @@ -143,16 +143,16 @@ namespace Slice int = -1); bool usesMarshalHelper(const TypePtr&); - void writeMarshalInParams(::IceUtilInternal::Output&, const OperationPtr&); - void writeMarshalOutParams(::IceUtilInternal::Output&, const OperationPtr&); - void writeMarshalAsyncOutParams(::IceUtilInternal::Output&, const OperationPtr&); - void writeUnmarshalInParams(::IceUtilInternal::Output&, const OperationPtr&); - void writeUnmarshalOutParams(::IceUtilInternal::Output&, const OperationPtr&); - void writeUnmarshalUserException(::IceUtilInternal::Output& out, const OperationPtr&); - void writeSwiftAttributes(::IceUtilInternal::Output&, const StringList&); - void writeProxyOperation(::IceUtilInternal::Output&, const OperationPtr&); - void writeProxyAsyncOperation(::IceUtilInternal::Output&, const OperationPtr&); - void writeDispatchOperation(::IceUtilInternal::Output&, const OperationPtr&); + void writeMarshalInParams(::IceInternal::Output&, const OperationPtr&); + void writeMarshalOutParams(::IceInternal::Output&, const OperationPtr&); + void writeMarshalAsyncOutParams(::IceInternal::Output&, const OperationPtr&); + void writeUnmarshalInParams(::IceInternal::Output&, const OperationPtr&); + void writeUnmarshalOutParams(::IceInternal::Output&, const OperationPtr&); + void writeUnmarshalUserException(::IceInternal::Output& out, const OperationPtr&); + void writeSwiftAttributes(::IceInternal::Output&, const StringList&); + void writeProxyOperation(::IceInternal::Output&, const OperationPtr&); + void writeProxyAsyncOperation(::IceInternal::Output&, const OperationPtr&); + void writeDispatchOperation(::IceInternal::Output&, const OperationPtr&); private: class MetaDataVisitor final : public ParserVisitor diff --git a/cpp/test/Ice/ami/AllTests.cpp b/cpp/test/Ice/ami/AllTests.cpp index 9919e42d615..3ba21bafb1a 100644 --- a/cpp/test/Ice/ami/AllTests.cpp +++ b/cpp/test/Ice/ami/AllTests.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Random.h" +#include "../../src/Ice/Random.h" #include "Ice/Ice.h" #include "Test.h" #include "TestHelper.h" @@ -1101,7 +1101,7 @@ allTests(TestHelper* helper, bool collocated) seq.resize(1024 * 10); for (ByteSeq::iterator q = seq.begin(); q != seq.end(); ++q) { - *q = static_cast(IceUtilInternal::random(255)); + *q = static_cast(IceInternal::random(255)); } // diff --git a/cpp/test/Ice/background/AllTests.cpp b/cpp/test/Ice/background/AllTests.cpp index 488c3c1a95e..9823ccc2e4c 100644 --- a/cpp/test/Ice/background/AllTests.cpp +++ b/cpp/test/Ice/background/AllTests.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Random.h" +#include "../../src/Ice/Random.h" #include "Configuration.h" #include "Ice/Ice.h" #include "PluginI.h" @@ -1112,7 +1112,7 @@ readWriteTests( seq.resize(10024); // Make sure the request doesn't compress too well. for (Ice::ByteSeq::iterator p = seq.begin(); p != seq.end(); ++p) { - *p = static_cast(IceUtilInternal::random(255)); + *p = static_cast(IceInternal::random(255)); } // Fill up the receive and send buffers diff --git a/cpp/test/Ice/binding/AllTests.cpp b/cpp/test/Ice/binding/AllTests.cpp index 909cc474acd..4e360bb3164 100644 --- a/cpp/test/Ice/binding/AllTests.cpp +++ b/cpp/test/Ice/binding/AllTests.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Random.h" +#include "../../src/Ice/Random.h" #include "Ice/Ice.h" #include "Test.h" #include "TestHelper.h" @@ -99,9 +99,9 @@ allTests(Test::TestHelper* helper) vector> adpts = adapters; TestIntfPrx test1 = createTestIntfPrx(adpts); - IceUtilInternal::shuffle(adpts.begin(), adpts.end()); + IceInternal::shuffle(adpts.begin(), adpts.end()); TestIntfPrx test2 = createTestIntfPrx(adpts); - IceUtilInternal::shuffle(adpts.begin(), adpts.end()); + IceInternal::shuffle(adpts.begin(), adpts.end()); TestIntfPrx test3 = createTestIntfPrx(adpts); test(test1->ice_getConnection() == test2->ice_getConnection()); @@ -147,9 +147,9 @@ allTests(Test::TestHelper* helper) vector> adpts = adapters; TestIntfPrx test1 = createTestIntfPrx(adpts); - IceUtilInternal::shuffle(adpts.begin(), adpts.end()); + IceInternal::shuffle(adpts.begin(), adpts.end()); TestIntfPrx test2 = createTestIntfPrx(adpts); - IceUtilInternal::shuffle(adpts.begin(), adpts.end()); + IceInternal::shuffle(adpts.begin(), adpts.end()); TestIntfPrx test3 = createTestIntfPrx(adpts); test(test1->ice_getConnection() == test2->ice_getConnection()); @@ -203,14 +203,14 @@ allTests(Test::TestHelper* helper) for (i = 0; i < proxies.size(); ++i) { vector> adpts; - adpts.resize(IceUtilInternal::random(static_cast(adapters.size()))); + adpts.resize(IceInternal::random(static_cast(adapters.size()))); if (adpts.empty()) { adpts.resize(1); } for (vector>::iterator p = adpts.begin(); p != adpts.end(); ++p) { - *p = adapters[IceUtilInternal::random(static_cast(adapters.size()))]; + *p = adapters[IceInternal::random(static_cast(adapters.size()))]; } proxies[i] = createTestIntfPrx(adpts); } @@ -274,9 +274,9 @@ allTests(Test::TestHelper* helper) vector> adpts = adapters; TestIntfPrx test1 = createTestIntfPrx(adpts); - IceUtilInternal::shuffle(adpts.begin(), adpts.end()); + IceInternal::shuffle(adpts.begin(), adpts.end()); TestIntfPrx test2 = createTestIntfPrx(adpts); - IceUtilInternal::shuffle(adpts.begin(), adpts.end()); + IceInternal::shuffle(adpts.begin(), adpts.end()); TestIntfPrx test3 = createTestIntfPrx(adpts); test(test1->ice_getConnection() == test2->ice_getConnection()); @@ -323,9 +323,9 @@ allTests(Test::TestHelper* helper) vector> adpts = adapters; TestIntfPrx test1 = createTestIntfPrx(adpts); - IceUtilInternal::shuffle(adpts.begin(), adpts.end()); + IceInternal::shuffle(adpts.begin(), adpts.end()); TestIntfPrx test2 = createTestIntfPrx(adpts); - IceUtilInternal::shuffle(adpts.begin(), adpts.end()); + IceInternal::shuffle(adpts.begin(), adpts.end()); TestIntfPrx test3 = createTestIntfPrx(adpts); test(test1->ice_getConnection() == test2->ice_getConnection()); diff --git a/cpp/test/Ice/executor/AllTests.cpp b/cpp/test/Ice/executor/AllTests.cpp index 40044ba3016..bd91e739b0d 100644 --- a/cpp/test/Ice/executor/AllTests.cpp +++ b/cpp/test/Ice/executor/AllTests.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Random.h" +#include "../../src/Ice/Random.h" #include "Executor.h" #include "Ice/Ice.h" #include "Test.h" @@ -151,7 +151,7 @@ allTests(TestHelper* helper) seq.resize(1024); // Make sure the request doesn't compress too well. for (ByteSeq::iterator q = seq.begin(); q != seq.end(); ++q) { - *q = static_cast(IceUtilInternal::random(255)); + *q = static_cast(IceInternal::random(255)); } vector>> completed; diff --git a/cpp/test/Ice/hash/Client.cpp b/cpp/test/Ice/hash/Client.cpp index a4e017d9ebd..7529ecf63a7 100644 --- a/cpp/test/Ice/hash/Client.cpp +++ b/cpp/test/Ice/hash/Client.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Random.h" +#include "../../src/Ice/Random.h" #include "Ice/Ice.h" #include "TestHelper.h" @@ -39,8 +39,8 @@ Client::run(int argc, char** argv) for (i = 0; proxyCollisions < maxCollisions && i < maxIterations; ++i) { ostringstream os; - os << i << ":tcp -p " << IceUtilInternal::random(65536) << " -t 10" << IceUtilInternal::random(1000000) - << ":udp -p " << IceUtilInternal::random(65536) << " -h " << IceUtilInternal::random(100); + os << i << ":tcp -p " << IceInternal::random(65536) << " -t 10" << IceInternal::random(1000000) << ":udp -p " + << IceInternal::random(65536) << " -h " << IceInternal::random(100); ObjectPrx obj(communicator, os.str()); EndpointSeq endpoints = obj->ice_getEndpoints(); diff --git a/cpp/test/Ice/hold/AllTests.cpp b/cpp/test/Ice/hold/AllTests.cpp index e9c49ea72f8..fa594d04dbf 100644 --- a/cpp/test/Ice/hold/AllTests.cpp +++ b/cpp/test/Ice/hold/AllTests.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Random.h" +#include "../../src/Ice/Random.h" #include "Ice/Ice.h" #include "Test.h" #include "TestHelper.h" @@ -75,7 +75,7 @@ allTests(Test::TestHelper* helper) auto expected = value; hold->setAsync( value + 1, - static_cast(IceUtilInternal::random(5)), + static_cast(IceInternal::random(5)), [cond, expected, completed](int val) { if (val != expected) @@ -118,7 +118,7 @@ allTests(Test::TestHelper* helper) auto expected = value; holdSerialized->setAsync( value + 1, - static_cast(IceUtilInternal::random(1)), + static_cast(IceInternal::random(1)), [cond, expected, completed](int val) { if (val != expected) diff --git a/cpp/test/Ice/invoke/Server.cpp b/cpp/test/Ice/invoke/Server.cpp index 6892978539b..24bcf5b49be 100644 --- a/cpp/test/Ice/invoke/Server.cpp +++ b/cpp/test/Ice/invoke/Server.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Options.h" +#include "../../src/Ice/Options.h" #include "BlobjectI.h" #include "Ice/Ice.h" #include "TestHelper.h" @@ -58,7 +58,7 @@ void Server::run(int argc, char** argv) { Ice::CommunicatorHolder communicator = initialize(argc, argv); - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("", "array"); opts.addOpt("", "async"); @@ -67,7 +67,7 @@ Server::run(int argc, char** argv) { args = opts.parse(argc, (const char**)argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { cout << argv[0] << ": error: " << e.reason << endl; throw; diff --git a/cpp/test/Ice/optional/TestAMDI.cpp b/cpp/test/Ice/optional/TestAMDI.cpp index 8b05d8b47f8..83dc8d5ee31 100644 --- a/cpp/test/Ice/optional/TestAMDI.cpp +++ b/cpp/test/Ice/optional/TestAMDI.cpp @@ -7,7 +7,6 @@ using namespace Test; using namespace Ice; -using namespace Ice; using namespace std; InitialI::InitialI() {} diff --git a/cpp/test/Ice/optional/TestI.cpp b/cpp/test/Ice/optional/TestI.cpp index 63afada14ed..fc503a8921a 100644 --- a/cpp/test/Ice/optional/TestI.cpp +++ b/cpp/test/Ice/optional/TestI.cpp @@ -7,7 +7,6 @@ using namespace Test; using namespace Ice; -using namespace Ice; using namespace std; InitialI::InitialI() {} diff --git a/cpp/test/IceGrid/deployer/Server.cpp b/cpp/test/IceGrid/deployer/Server.cpp index 7bb0a4e13a9..279bf15cf21 100644 --- a/cpp/test/IceGrid/deployer/Server.cpp +++ b/cpp/test/IceGrid/deployer/Server.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/DisableWarnings.h" +#include "../../src/Ice/DisableWarnings.h" #include "Ice/Ice.h" #include "TestHelper.h" #include "TestI.h" diff --git a/cpp/test/IceStorm/federation2/Publisher.cpp b/cpp/test/IceStorm/federation2/Publisher.cpp index 56dc39d9260..90dcb564bf9 100644 --- a/cpp/test/IceStorm/federation2/Publisher.cpp +++ b/cpp/test/IceStorm/federation2/Publisher.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Options.h" +#include "../../src/Ice/Options.h" #include "Event.h" #include "Ice/Ice.h" #include "IceStorm/IceStorm.h" @@ -25,8 +25,8 @@ Publisher::run(int argc, char** argv) { Ice::CommunicatorHolder ich = initialize(argc, argv); auto communicator = ich.communicator(); - IceUtilInternal::Options opts; - opts.addOpt("", "count", IceUtilInternal::Options::NeedArg); + IceInternal::Options opts; + opts.addOpt("", "count", IceInternal::Options::NeedArg); opts.parse(argc, (const char**)argv); auto properties = communicator->getProperties(); diff --git a/cpp/test/IceStorm/rep1/Publisher.cpp b/cpp/test/IceStorm/rep1/Publisher.cpp index 1e9689d5ea8..f29c46036a9 100644 --- a/cpp/test/IceStorm/rep1/Publisher.cpp +++ b/cpp/test/IceStorm/rep1/Publisher.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Options.h" +#include "../../src/Ice/Options.h" #include "Ice/Ice.h" #include "IceStorm/IceStorm.h" #include "Single.h" @@ -26,14 +26,14 @@ Publisher::run(int argc, char** argv) { Ice::CommunicatorHolder ich = initialize(argc, argv); auto communicator = ich.communicator(); - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("", "cycle"); try { opts.parse(argc, (const char**)argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { ostringstream os; os << argv[0] << ": " << e.reason; diff --git a/cpp/test/IceStorm/rep1/Sub.cpp b/cpp/test/IceStorm/rep1/Sub.cpp index 4ab1e2cf955..e42ff956064 100644 --- a/cpp/test/IceStorm/rep1/Sub.cpp +++ b/cpp/test/IceStorm/rep1/Sub.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Options.h" +#include "../../src/Ice/Options.h" #include "Ice/Ice.h" #include "IceStorm/IceStorm.h" #include "Single.h" @@ -31,15 +31,15 @@ void Sub::run(int argc, char** argv) { Ice::CommunicatorHolder communicator = initialize(argc, argv); - IceUtilInternal::Options opts; - opts.addOpt("", "id", IceUtilInternal::Options::NeedArg); + IceInternal::Options opts; + opts.addOpt("", "id", IceInternal::Options::NeedArg); opts.addOpt("", "unsub"); try { opts.parse(argc, (const char**)argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { ostringstream os; os << argv[0] << ": error: " << e.reason; diff --git a/cpp/test/IceStorm/rep1/Subscriber.cpp b/cpp/test/IceStorm/rep1/Subscriber.cpp index 1e4d6e766f8..c26d1326993 100644 --- a/cpp/test/IceStorm/rep1/Subscriber.cpp +++ b/cpp/test/IceStorm/rep1/Subscriber.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Options.h" +#include "../../src/Ice/Options.h" #include "Ice/Ice.h" #include "IceStorm/IceStorm.h" #include "Single.h" @@ -74,16 +74,16 @@ void Subscriber::run(int argc, char** argv) { Ice::CommunicatorHolder communicator = initialize(argc, argv); - IceUtilInternal::Options opts; + IceInternal::Options opts; opts.addOpt("", "ordered"); opts.addOpt("", "twoway"); - opts.addOpt("", "events", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "events", IceInternal::Options::NeedArg); try { opts.parse(argc, (const char**)argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { ostringstream os; os << argv[0] << ": error: " << e.reason; diff --git a/cpp/test/IceStorm/stress/Publisher.cpp b/cpp/test/IceStorm/stress/Publisher.cpp index d044672bd36..0d37930081f 100644 --- a/cpp/test/IceStorm/stress/Publisher.cpp +++ b/cpp/test/IceStorm/stress/Publisher.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Options.h" +#include "../../src/Ice/Options.h" #include "Event.h" #include "Ice/Ice.h" #include "IceStorm/IceStorm.h" @@ -26,8 +26,8 @@ void Publisher::run(int argc, char** argv) { Ice::CommunicatorHolder communicator = initialize(argc, argv); - IceUtilInternal::Options opts; - opts.addOpt("", "events", IceUtilInternal::Options::NeedArg); + IceInternal::Options opts; + opts.addOpt("", "events", IceInternal::Options::NeedArg); opts.addOpt("", "oneway"); opts.addOpt("", "maxQueueTest"); @@ -35,7 +35,7 @@ Publisher::run(int argc, char** argv) { opts.parse(argc, (const char**)argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { ostringstream os; os << argv[0] << ": error: " << e.reason; diff --git a/cpp/test/IceStorm/stress/Subscriber.cpp b/cpp/test/IceStorm/stress/Subscriber.cpp index 16d0f645c86..87ed10ff655 100644 --- a/cpp/test/IceStorm/stress/Subscriber.cpp +++ b/cpp/test/IceStorm/stress/Subscriber.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Options.h" +#include "../../src/Ice/Options.h" #include "Event.h" #include "Ice/Ice.h" #include "IceStorm/IceStorm.h" @@ -241,19 +241,19 @@ Subscriber::run(int argc, char** argv) { Ice::CommunicatorHolder ich = initialize(argc, argv); auto communicator = ich.communicator(); - IceUtilInternal::Options opts; - opts.addOpt("", "events", IceUtilInternal::Options::NeedArg); - opts.addOpt("", "qos", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + IceInternal::Options opts; + opts.addOpt("", "events", IceInternal::Options::NeedArg); + opts.addOpt("", "qos", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); opts.addOpt("", "slow"); - opts.addOpt("", "erratic", IceUtilInternal::Options::NeedArg); - opts.addOpt("", "maxQueueDropEvents", IceUtilInternal::Options::NeedArg); - opts.addOpt("", "maxQueueRemoveSub", IceUtilInternal::Options::NeedArg); + opts.addOpt("", "erratic", IceInternal::Options::NeedArg); + opts.addOpt("", "maxQueueDropEvents", IceInternal::Options::NeedArg); + opts.addOpt("", "maxQueueRemoveSub", IceInternal::Options::NeedArg); try { opts.parse(argc, (const char**)argv); } - catch (const IceUtilInternal::BadOptException& e) + catch (const IceInternal::BadOptException& e) { ostringstream os; os << argv[0] << ": error: " << e.reason; diff --git a/cpp/test/IceUtil/stacktrace/Client.cpp b/cpp/test/IceUtil/stacktrace/Client.cpp index 684746592e6..1e2218d0a8b 100644 --- a/cpp/test/IceUtil/stacktrace/Client.cpp +++ b/cpp/test/IceUtil/stacktrace/Client.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Exception.h" +#include "../../src/Ice/StackTrace.h" #include "Ice/StringUtil.h" #include "TestHelper.h" @@ -12,7 +12,7 @@ using namespace Ice; using namespace std; -namespace IceUtilInternal +namespace IceInternal { extern bool ICE_API printStackTraces; } @@ -81,12 +81,12 @@ class Client : public Test::TestHelper void Client::run(int, char*[]) { - if (IceUtilInternal::stackTraceImpl() == IceUtilInternal::STNone) + if (IceInternal::stackTraceImpl() == IceInternal::STNone) { cout << "This Ice build cannot capture stack traces" << endl; return; } - IceUtilInternal::printStackTraces = true; + IceInternal::printStackTraces = true; cout << "checking stacktrace... "; diff --git a/cpp/test/IceUtil/timer/Client.cpp b/cpp/test/IceUtil/timer/Client.cpp index 097671d6fe7..7d52f948e02 100644 --- a/cpp/test/IceUtil/timer/Client.cpp +++ b/cpp/test/IceUtil/timer/Client.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Random.h" +#include "../../src/Ice/Random.h" #include "Ice/Timer.h" #include "TestHelper.h" @@ -177,7 +177,7 @@ Client::run(int, char*[]) tasks.push_back(make_shared(chrono::milliseconds(500 + i * 50))); } - IceUtilInternal::shuffle(tasks.begin(), tasks.end()); + IceInternal::shuffle(tasks.begin(), tasks.end()); vector::const_iterator p; for (p = tasks.begin(); p != tasks.end(); ++p) { diff --git a/cpp/test/IceUtil/uuid/Client.cpp b/cpp/test/IceUtil/uuid/Client.cpp index 5661d8d4b20..d99e022fa94 100644 --- a/cpp/test/IceUtil/uuid/Client.cpp +++ b/cpp/test/IceUtil/uuid/Client.cpp @@ -2,7 +2,7 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include "../../src/IceUtil/Random.h" +#include "../../src/Ice/Random.h" #include "Ice/UUID.h" #include "TestHelper.h" @@ -82,7 +82,7 @@ struct GenerateRandomString string s; s.resize(21); char buf[21]; - IceUtilInternal::generateRandom(buf, sizeof(buf)); + IceInternal::generateRandom(buf, sizeof(buf)); for (unsigned int i = 0; i < sizeof(buf); ++i) { s[i] = @@ -96,7 +96,7 @@ struct GenerateRandomString struct GenerateRandomInt { public: - int operator()() { return static_cast(IceUtilInternal::random()); } + int operator()() { return static_cast(IceInternal::random()); } }; template diff --git a/matlab/src/ice.rc b/matlab/src/ice.rc index 4606a1f9d0a..e09fbce17af 100644 --- a/matlab/src/ice.rc +++ b/matlab/src/ice.rc @@ -1,4 +1,4 @@ -#include "../../cpp/src/IceUtil/ResourceConfig.h" +#include "../../cpp/src/Ice/ResourceConfig.h" #ifdef _DEBUG # define ICE_INTERNALNAME "ice\0" diff --git a/php/src/Communicator.cpp b/php/src/Communicator.cpp index 2e73039d547..02d6ab890a6 100644 --- a/php/src/Communicator.cpp +++ b/php/src/Communicator.cpp @@ -9,9 +9,9 @@ #include "Types.h" #include "Util.h" +#include "Ice/Options.h" #include "Ice/StringUtil.h" #include "Ice/Timer.h" -#include "IceUtil/Options.h" #include #include @@ -23,7 +23,7 @@ # undef getcwd #endif -#include "IceUtil/FileUtil.h" +#include "Ice/FileUtil.h" using namespace std; using namespace IcePHP; @@ -1532,7 +1532,7 @@ createProfile(const string& name, const string& config, const string& options) vector args; try { - args = IceUtilInternal::Options::split(options); + args = IceInternal::Options::split(options); } catch (const Ice::Exception& ex) { @@ -1562,7 +1562,7 @@ parseProfiles(const string& file) // [profile-name] // ice.config = config-file // ice.options = args - ifstream in(IceUtilInternal::streamFilename(file).c_str()); + ifstream in(IceInternal::streamFilename(file).c_str()); if (!in) { php_error_docref(0, E_WARNING, "unable to open Ice profiles in %s", file.c_str()); diff --git a/php/src/Types.cpp b/php/src/Types.cpp index bac4c0fadea..d69537acf7b 100644 --- a/php/src/Types.cpp +++ b/php/src/Types.cpp @@ -3,8 +3,8 @@ // #include "Types.h" +#include "Ice/OutputUtil.h" #include "Ice/SlicedData.h" -#include "IceUtil/OutputUtil.h" #include "Proxy.h" #include "Util.h" #include "slice2php/PHPUtil.h" @@ -16,7 +16,7 @@ using namespace std; using namespace IcePHP; using namespace Ice; -using namespace IceUtilInternal; +using namespace IceInternal; ZEND_EXTERN_MODULE_GLOBALS(ice) @@ -936,7 +936,7 @@ IcePHP::PrimitiveInfo::unmarshal( } void -IcePHP::PrimitiveInfo::print(zval* zv, IceUtilInternal::Output& out, PrintObjectHistory*) +IcePHP::PrimitiveInfo::print(zval* zv, IceInternal::Output& out, PrintObjectHistory*) { if (!validate(zv, false)) { @@ -1046,7 +1046,7 @@ IcePHP::EnumInfo::unmarshal( } void -IcePHP::EnumInfo::print(zval* zv, IceUtilInternal::Output& out, PrintObjectHistory*) +IcePHP::EnumInfo::print(zval* zv, IceInternal::Output& out, PrintObjectHistory*) { if (!validate(zv, false)) { @@ -1331,7 +1331,7 @@ IcePHP::StructInfo::unmarshal( } void -IcePHP::StructInfo::print(zval* zv, IceUtilInternal::Output& out, PrintObjectHistory* history) +IcePHP::StructInfo::print(zval* zv, IceInternal::Output& out, PrintObjectHistory* history) { if (!validate(zv, false)) { @@ -1530,7 +1530,7 @@ IcePHP::SequenceInfo::unmarshal( } void -IcePHP::SequenceInfo::print(zval* zv, IceUtilInternal::Output& out, PrintObjectHistory* history) +IcePHP::SequenceInfo::print(zval* zv, IceInternal::Output& out, PrintObjectHistory* history) { if (!validate(zv, false)) { @@ -2149,7 +2149,7 @@ IcePHP::DictionaryInfo::unmarshal( } void -IcePHP::DictionaryInfo::print(zval* zv, IceUtilInternal::Output& out, PrintObjectHistory* history) +IcePHP::DictionaryInfo::print(zval* zv, IceInternal::Output& out, PrintObjectHistory* history) { if (!validate(zv, false)) { @@ -2407,7 +2407,7 @@ IcePHP::ClassInfo::unmarshal( } void -IcePHP::ClassInfo::print(zval* zv, IceUtilInternal::Output& out, PrintObjectHistory* history) +IcePHP::ClassInfo::print(zval* zv, IceInternal::Output& out, PrintObjectHistory* history) { if (!validate(zv, false)) { @@ -2454,7 +2454,7 @@ IcePHP::ClassInfo::destroy() } void -IcePHP::ClassInfo::printMembers(zval* zv, IceUtilInternal::Output& out, PrintObjectHistory* history) +IcePHP::ClassInfo::printMembers(zval* zv, IceInternal::Output& out, PrintObjectHistory* history) { if (base) { @@ -2663,7 +2663,7 @@ IcePHP::ProxyInfo::unmarshal( } void -IcePHP::ProxyInfo::print(zval* zv, IceUtilInternal::Output& out, PrintObjectHistory*) +IcePHP::ProxyInfo::print(zval* zv, IceInternal::Output& out, PrintObjectHistory*) { if (!validate(zv, false)) { @@ -3123,7 +3123,7 @@ IcePHP::ExceptionInfo::unmarshal(Ice::InputStream* is, const CommunicatorInfoPtr } void -IcePHP::ExceptionInfo::print(zval* zv, IceUtilInternal::Output& out) +IcePHP::ExceptionInfo::print(zval* zv, IceInternal::Output& out) { out << "exception " << id; out.sb(); @@ -3153,7 +3153,7 @@ IcePHP::ExceptionInfo::print(zval* zv, IceUtilInternal::Output& out) } void -IcePHP::ExceptionInfo::printMembers(zval* zv, IceUtilInternal::Output& out, PrintObjectHistory* history) +IcePHP::ExceptionInfo::printMembers(zval* zv, IceInternal::Output& out, PrintObjectHistory* history) { if (base) { @@ -3642,7 +3642,7 @@ ZEND_FUNCTION(IcePHP_stringify) assert(type); ostringstream ostr; - IceUtilInternal::Output out(ostr); + IceInternal::Output out(ostr); PrintObjectHistory history; history.index = 0; type->print(v, out, &history); @@ -3670,7 +3670,7 @@ ZEND_FUNCTION(IcePHP_stringifyException) assert(ex); ostringstream ostr; - IceUtilInternal::Output out(ostr); + IceInternal::Output out(ostr); ex->print(v, out); string str = ostr.str(); diff --git a/php/src/Types.h b/php/src/Types.h index bc895b5e92a..a951ec046f0 100644 --- a/php/src/Types.h +++ b/php/src/Types.h @@ -6,7 +6,7 @@ #define ICEPHP_TYPES_H #include "Communicator.h" -#include "IceUtil/OutputUtil.h" +#include "Ice/OutputUtil.h" #include "Operation.h" // @@ -134,7 +134,7 @@ namespace IcePHP virtual void marshal(zval*, Ice::OutputStream*, ObjectMap*, bool) = 0; virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, const CommunicatorInfoPtr&, zval*, void*, bool) = 0; - virtual void print(zval*, IceUtilInternal::Output&, PrintObjectHistory*) = 0; + virtual void print(zval*, IceInternal::Output&, PrintObjectHistory*) = 0; }; using TypeInfoPtr = std::shared_ptr; @@ -153,7 +153,7 @@ namespace IcePHP void marshal(zval*, Ice::OutputStream*, ObjectMap*, bool) final; void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, const CommunicatorInfoPtr&, zval*, void*, bool) final; - void print(zval*, IceUtilInternal::Output&, PrintObjectHistory*) final; + void print(zval*, IceInternal::Output&, PrintObjectHistory*) final; enum Kind { @@ -188,7 +188,7 @@ namespace IcePHP void marshal(zval*, Ice::OutputStream*, ObjectMap*, bool) final; void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, const CommunicatorInfoPtr&, zval*, void*, bool) final; - void print(zval*, IceUtilInternal::Output&, PrintObjectHistory*) final; + void print(zval*, IceInternal::Output&, PrintObjectHistory*) final; const std::string id; const std::map enumerators; @@ -230,7 +230,7 @@ namespace IcePHP void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, const CommunicatorInfoPtr&, zval*, void*, bool) final; - void print(zval*, IceUtilInternal::Output&, PrintObjectHistory*) final; + void print(zval*, IceInternal::Output&, PrintObjectHistory*) final; virtual void destroy(); @@ -265,7 +265,7 @@ namespace IcePHP void marshal(zval*, Ice::OutputStream*, ObjectMap*, bool) final; void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, const CommunicatorInfoPtr&, zval*, void*, bool) final; - void print(zval*, IceUtilInternal::Output&, PrintObjectHistory*) final; + void print(zval*, IceInternal::Output&, PrintObjectHistory*) final; void unmarshaled(zval*, zval*, void*) final; void destroy() final; @@ -301,7 +301,7 @@ namespace IcePHP void marshal(zval*, Ice::OutputStream*, ObjectMap*, bool) final; void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, const CommunicatorInfoPtr&, zval*, void*, bool) final; - void print(zval*, IceUtilInternal::Output&, PrintObjectHistory*) final; + void print(zval*, IceInternal::Output&, PrintObjectHistory*) final; void destroy() final; class KeyCallback final : public UnmarshalCallback @@ -364,9 +364,9 @@ namespace IcePHP void marshal(zval*, Ice::OutputStream*, ObjectMap*, bool) final; void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, const CommunicatorInfoPtr&, zval*, void*, bool) final; - void print(zval*, IceUtilInternal::Output&, PrintObjectHistory*) final; + void print(zval*, IceInternal::Output&, PrintObjectHistory*) final; void destroy() final; - void printMembers(zval*, IceUtilInternal::Output&, PrintObjectHistory*); + void printMembers(zval*, IceInternal::Output&, PrintObjectHistory*); bool isA(std::string_view) const; @@ -404,7 +404,7 @@ namespace IcePHP void marshal(zval*, Ice::OutputStream*, ObjectMap*, bool) final; void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, const CommunicatorInfoPtr&, zval*, void*, bool) final; - void print(zval*, IceUtilInternal::Output&, PrintObjectHistory*) final; + void print(zval*, IceInternal::Output&, PrintObjectHistory*) final; void destroy() final; bool isA(std::string_view) const; @@ -426,8 +426,8 @@ namespace IcePHP public: void unmarshal(Ice::InputStream*, const CommunicatorInfoPtr&, zval*); - void print(zval*, IceUtilInternal::Output&); - void printMembers(zval*, IceUtilInternal::Output&, PrintObjectHistory*); + void print(zval*, IceInternal::Output&); + void printMembers(zval*, IceInternal::Output&, PrintObjectHistory*); bool isA(std::string_view) const; diff --git a/python/modules/IcePy/Communicator.cpp b/python/modules/IcePy/Communicator.cpp index f91e0c7d522..947c0b93fd8 100644 --- a/python/modules/IcePy/Communicator.cpp +++ b/python/modules/IcePy/Communicator.cpp @@ -5,6 +5,7 @@ #include "Communicator.h" #include "BatchRequestInterceptor.h" #include "Dispatcher.h" +#include "Ice/DisableWarnings.h" #include "Ice/Initialize.h" #include "Ice/LocalException.h" #include "Ice/Locator.h" @@ -12,7 +13,6 @@ #include "Ice/Properties.h" #include "Ice/Router.h" #include "Ice/ValueFactory.h" -#include "IceUtil/DisableWarnings.h" #include "ImplicitContext.h" #include "Logger.h" #include "ObjectAdapter.h" diff --git a/python/modules/IcePy/IcePy.rc b/python/modules/IcePy/IcePy.rc index adbf3523d8d..78ef18d9273 100644 --- a/python/modules/IcePy/IcePy.rc +++ b/python/modules/IcePy/IcePy.rc @@ -1,4 +1,4 @@ -#include "../../cpp/src/IceUtil/ResourceConfig.h" +#include "../../cpp/src/Ice/ResourceConfig.h" #ifdef _DEBUG # define ICE_INTERNALNAME "IcePy_d\0" diff --git a/python/modules/IcePy/PropertiesAdmin.cpp b/python/modules/IcePy/PropertiesAdmin.cpp index 17871351675..c49c26437ec 100644 --- a/python/modules/IcePy/PropertiesAdmin.cpp +++ b/python/modules/IcePy/PropertiesAdmin.cpp @@ -3,7 +3,7 @@ // #include "PropertiesAdmin.h" -#include "IceUtil/DisableWarnings.h" +#include "Ice/DisableWarnings.h" #include "Thread.h" #include "Types.h" #include "Util.h" diff --git a/python/modules/IcePy/Proxy.cpp b/python/modules/IcePy/Proxy.cpp index ec8c49bb275..fe2f60858b4 100644 --- a/python/modules/IcePy/Proxy.cpp +++ b/python/modules/IcePy/Proxy.cpp @@ -7,11 +7,11 @@ #include "Connection.h" #include "Endpoint.h" #include "Ice/Communicator.h" +#include "Ice/DisableWarnings.h" #include "Ice/LocalException.h" #include "Ice/Locator.h" #include "Ice/Proxy.h" #include "Ice/Router.h" -#include "IceUtil/DisableWarnings.h" #include "Operation.h" #include "Thread.h" #include "Types.h" diff --git a/python/modules/IcePy/Slice.cpp b/python/modules/IcePy/Slice.cpp index 0ebc6474574..ab15c96178f 100644 --- a/python/modules/IcePy/Slice.cpp +++ b/python/modules/IcePy/Slice.cpp @@ -3,8 +3,8 @@ // #include "Slice.h" -#include "IceUtil/ConsoleUtil.h" -#include "IceUtil/Options.h" +#include "Ice/ConsoleUtil.h" +#include "Ice/Options.h" #include "Slice/Preprocessor.h" #include "Slice/Util.h" #include "Util.h" @@ -25,7 +25,7 @@ using namespace std; using namespace IcePy; using namespace Slice; using namespace Slice::Python; -using namespace IceUtilInternal; +using namespace IceInternal; extern "C" PyObject* IcePy_loadSlice(PyObject* /*self*/, PyObject* args) @@ -40,14 +40,14 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args) vector argSeq; try { - argSeq = IceUtilInternal::Options::split(cmd); + argSeq = IceInternal::Options::split(cmd); } - catch (const IceUtilInternal::BadOptException& ex) + catch (const IceInternal::BadOptException& ex) { PyErr_Format(PyExc_RuntimeError, "error in Slice options: %s", ex.reason.c_str()); return 0; } - catch (const IceUtilInternal::APIException& ex) + catch (const IceInternal::APIException& ex) { PyErr_Format(PyExc_RuntimeError, "error in Slice options: %s", ex.reason.c_str()); return 0; @@ -61,10 +61,10 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args) } } - IceUtilInternal::Options opts; - opts.addOpt("D", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("U", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + IceInternal::Options opts; + opts.addOpt("D", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("U", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("I", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); opts.addOpt("d", "debug"); opts.addOpt("", "all"); @@ -79,12 +79,12 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args) return 0; } } - catch (const IceUtilInternal::BadOptException& ex) + catch (const IceInternal::BadOptException& ex) { PyErr_Format(PyExc_RuntimeError, "error in Slice options: %s", ex.reason.c_str()); return 0; } - catch (const IceUtilInternal::APIException& ex) + catch (const IceInternal::APIException& ex) { PyErr_Format(PyExc_RuntimeError, "error in Slice options: %s", ex.reason.c_str()); return 0; @@ -149,7 +149,7 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args) // Generate the Python code into a string stream. // ostringstream codeStream; - IceUtilInternal::Output out(codeStream); + IceInternal::Output out(codeStream); out.setUseTab(false); // diff --git a/python/modules/IcePy/Types.cpp b/python/modules/IcePy/Types.cpp index aad50d2648f..ea4c2175d22 100644 --- a/python/modules/IcePy/Types.cpp +++ b/python/modules/IcePy/Types.cpp @@ -9,11 +9,11 @@ #include "Types.h" #include "Current.h" +#include "Ice/DisableWarnings.h" #include "Ice/InputStream.h" #include "Ice/LocalException.h" #include "Ice/OutputStream.h" #include "Ice/SlicedData.h" -#include "IceUtil/DisableWarnings.h" #include "Proxy.h" #include "Thread.h" #include "Util.h" @@ -24,7 +24,7 @@ using namespace std; using namespace IcePy; using namespace Ice; -using namespace IceUtilInternal; +using namespace IceInternal; typedef map> ClassInfoMap; static ClassInfoMap _classInfoMap; @@ -962,7 +962,7 @@ IcePy::PrimitiveInfo::unmarshal( } void -IcePy::PrimitiveInfo::print(PyObject* value, IceUtilInternal::Output& out, PrintObjectHistory*) +IcePy::PrimitiveInfo::print(PyObject* value, IceInternal::Output& out, PrintObjectHistory*) { if (!validate(value)) { @@ -1076,7 +1076,7 @@ IcePy::EnumInfo::unmarshal( } void -IcePy::EnumInfo::print(PyObject* value, IceUtilInternal::Output& out, PrintObjectHistory*) +IcePy::EnumInfo::print(PyObject* value, IceInternal::Output& out, PrintObjectHistory*) { if (!validate(value)) { @@ -1392,7 +1392,7 @@ IcePy::StructInfo::unmarshal( } void -IcePy::StructInfo::print(PyObject* value, IceUtilInternal::Output& out, PrintObjectHistory* history) +IcePy::StructInfo::print(PyObject* value, IceInternal::Output& out, PrintObjectHistory* history) { if (!validate(value)) { @@ -1679,7 +1679,7 @@ IcePy::SequenceInfo::unmarshal( } void -IcePy::SequenceInfo::print(PyObject* value, IceUtilInternal::Output& out, PrintObjectHistory* history) +IcePy::SequenceInfo::print(PyObject* value, IceInternal::Output& out, PrintObjectHistory* history) { if (!validate(value)) { @@ -2722,7 +2722,7 @@ IcePy::CustomInfo::unmarshal( } void -IcePy::CustomInfo::print(PyObject* value, IceUtilInternal::Output& out, PrintObjectHistory*) +IcePy::CustomInfo::print(PyObject* value, IceInternal::Output& out, PrintObjectHistory*) { if (!validate(value)) { @@ -2926,7 +2926,7 @@ IcePy::DictionaryInfo::unmarshaled(PyObject* val, PyObject* target, void* closur } void -IcePy::DictionaryInfo::print(PyObject* value, IceUtilInternal::Output& out, PrintObjectHistory* history) +IcePy::DictionaryInfo::print(PyObject* value, IceInternal::Output& out, PrintObjectHistory* history) { if (!validate(value)) { @@ -3075,7 +3075,7 @@ IcePy::ClassInfo::unmarshal( } void -IcePy::ClassInfo::print(PyObject* value, IceUtilInternal::Output& out, PrintObjectHistory* history) +IcePy::ClassInfo::print(PyObject* value, IceInternal::Output& out, PrintObjectHistory* history) { if (!validate(value)) { @@ -3280,7 +3280,7 @@ IcePy::ValueInfo::unmarshal( } void -IcePy::ValueInfo::print(PyObject* value, IceUtilInternal::Output& out, PrintObjectHistory* history) +IcePy::ValueInfo::print(PyObject* value, IceInternal::Output& out, PrintObjectHistory* history) { if (!validate(value)) { @@ -3335,7 +3335,7 @@ IcePy::ValueInfo::destroy() } void -IcePy::ValueInfo::printMembers(PyObject* value, IceUtilInternal::Output& out, PrintObjectHistory* history) +IcePy::ValueInfo::printMembers(PyObject* value, IceInternal::Output& out, PrintObjectHistory* history) { if (base) { @@ -3490,7 +3490,7 @@ IcePy::ProxyInfo::unmarshal( } void -IcePy::ProxyInfo::print(PyObject* value, IceUtilInternal::Output& out, PrintObjectHistory*) +IcePy::ProxyInfo::print(PyObject* value, IceInternal::Output& out, PrintObjectHistory*) { if (!validate(value)) { @@ -3947,7 +3947,7 @@ IcePy::ExceptionInfo::unmarshal(Ice::InputStream* is) } void -IcePy::ExceptionInfo::print(PyObject* value, IceUtilInternal::Output& out) +IcePy::ExceptionInfo::print(PyObject* value, IceInternal::Output& out) { if (!PyObject_IsInstance(value, pythonType)) { @@ -3965,7 +3965,7 @@ IcePy::ExceptionInfo::print(PyObject* value, IceUtilInternal::Output& out) } void -IcePy::ExceptionInfo::printMembers(PyObject* value, IceUtilInternal::Output& out, PrintObjectHistory* history) +IcePy::ExceptionInfo::printMembers(PyObject* value, IceInternal::Output& out, PrintObjectHistory* history) { if (base) { @@ -4829,7 +4829,7 @@ IcePy_stringify(PyObject*, PyObject* args) assert(info); ostringstream ostr; - IceUtilInternal::Output out(ostr); + IceInternal::Output out(ostr); PrintObjectHistory history; history.index = 0; info->print(value, out, &history); @@ -4853,7 +4853,7 @@ IcePy_stringifyException(PyObject*, PyObject* args) assert(info); ostringstream ostr; - IceUtilInternal::Output out(ostr); + IceInternal::Output out(ostr); info->print(value, out); string str = ostr.str(); diff --git a/python/modules/IcePy/Types.h b/python/modules/IcePy/Types.h index 8745be81113..f0d13f88e9e 100644 --- a/python/modules/IcePy/Types.h +++ b/python/modules/IcePy/Types.h @@ -9,9 +9,9 @@ #include "Ice/FactoryTable.h" #include "Ice/InputStream.h" #include "Ice/OutputStream.h" +#include "Ice/OutputUtil.h" #include "Ice/SlicedDataF.h" #include "Ice/Value.h" -#include "IceUtil/OutputUtil.h" #include "Util.h" #include @@ -161,7 +161,7 @@ namespace IcePy bool, const Ice::StringSeq* = 0) = 0; - virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*) = 0; + virtual void print(PyObject*, IceInternal::Output&, PrintObjectHistory*) = 0; }; using TypeInfoPtr = std::shared_ptr; @@ -197,7 +197,7 @@ namespace IcePy virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); - virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); + virtual void print(PyObject*, IceInternal::Output&, PrintObjectHistory*); const Kind kind; }; @@ -225,7 +225,7 @@ namespace IcePy virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); - virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); + virtual void print(PyObject*, IceInternal::Output&, PrintObjectHistory*); virtual void destroy(); @@ -275,7 +275,7 @@ namespace IcePy virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); - virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); + virtual void print(PyObject*, IceInternal::Output&, PrintObjectHistory*); virtual void destroy(); @@ -314,7 +314,7 @@ namespace IcePy virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); - virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); + virtual void print(PyObject*, IceInternal::Output&, PrintObjectHistory*); virtual void destroy(); @@ -400,7 +400,7 @@ namespace IcePy virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); - virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); + virtual void print(PyObject*, IceInternal::Output&, PrintObjectHistory*); const std::string id; PyObject* pythonType; // Borrowed reference - the enclosing Python module owns the reference. @@ -430,7 +430,7 @@ namespace IcePy unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); virtual void unmarshaled(PyObject*, PyObject*, void*); - virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); + virtual void print(PyObject*, IceInternal::Output&, PrintObjectHistory*); virtual void destroy(); @@ -476,7 +476,7 @@ namespace IcePy virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); - virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); + virtual void print(PyObject*, IceInternal::Output&, PrintObjectHistory*); virtual void destroy(); @@ -514,11 +514,11 @@ namespace IcePy virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); - virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); + virtual void print(PyObject*, IceInternal::Output&, PrintObjectHistory*); virtual void destroy(); - void printMembers(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); + void printMembers(PyObject*, IceInternal::Output&, PrintObjectHistory*); const std::string id; const std::int32_t compactId; @@ -554,7 +554,7 @@ namespace IcePy virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); - virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); + virtual void print(PyObject*, IceInternal::Output&, PrintObjectHistory*); const std::string id; PyObject* pythonType; // Borrowed reference - the enclosing Python module owns the reference. @@ -571,8 +571,8 @@ namespace IcePy void marshal(PyObject*, Ice::OutputStream*, ObjectMap*); PyObject* unmarshal(Ice::InputStream*); - void print(PyObject*, IceUtilInternal::Output&); - void printMembers(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); + void print(PyObject*, IceInternal::Output&); + void printMembers(PyObject*, IceInternal::Output&, PrintObjectHistory*); std::string id; ExceptionInfoPtr base; diff --git a/python/modules/IcePy/Util.cpp b/python/modules/IcePy/Util.cpp index 99bcf6e8a5a..4be101eae9b 100644 --- a/python/modules/IcePy/Util.cpp +++ b/python/modules/IcePy/Util.cpp @@ -3,8 +3,8 @@ // #include "Util.h" +#include "Ice/DisableWarnings.h" #include "Ice/Protocol.h" -#include "IceUtil/DisableWarnings.h" #include "slice2py/PythonUtil.h" #include diff --git a/ruby/src/IceRuby/Proxy.cpp b/ruby/src/IceRuby/Proxy.cpp index ce0e06dfff1..bb9d7dd1941 100644 --- a/ruby/src/IceRuby/Proxy.cpp +++ b/ruby/src/IceRuby/Proxy.cpp @@ -6,11 +6,11 @@ #include "Communicator.h" #include "Connection.h" #include "Endpoint.h" +#include "Ice/DisableWarnings.h" #include "Ice/LocalException.h" #include "Ice/Locator.h" #include "Ice/Proxy.h" #include "Ice/Router.h" -#include "IceUtil/DisableWarnings.h" #include "Types.h" #include "Util.h" diff --git a/ruby/src/IceRuby/Slice.cpp b/ruby/src/IceRuby/Slice.cpp index e50e4b37608..49cd267bd6e 100644 --- a/ruby/src/IceRuby/Slice.cpp +++ b/ruby/src/IceRuby/Slice.cpp @@ -3,7 +3,7 @@ // #include "Slice.h" -#include "IceUtil/Options.h" +#include "Ice/Options.h" #include "Slice/Preprocessor.h" #include "Slice/Util.h" #include "Util.h" @@ -30,13 +30,13 @@ IceRuby_loadSlice(int argc, VALUE* argv, VALUE /*self*/) vector argSeq; try { - argSeq = IceUtilInternal::Options::split(cmd); + argSeq = IceInternal::Options::split(cmd); } - catch (const IceUtilInternal::BadOptException& ex) + catch (const IceInternal::BadOptException& ex) { throw RubyException(rb_eArgError, "error in Slice options: %s", ex.reason.c_str()); } - catch (const IceUtilInternal::APIException& ex) + catch (const IceInternal::APIException& ex) { throw RubyException(rb_eArgError, "error in Slice options: %s", ex.reason.c_str()); } @@ -49,10 +49,10 @@ IceRuby_loadSlice(int argc, VALUE* argv, VALUE /*self*/) } } - IceUtilInternal::Options opts; - opts.addOpt("D", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("U", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); - opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); + IceInternal::Options opts; + opts.addOpt("D", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("U", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); + opts.addOpt("I", "", IceInternal::Options::NeedArg, "", IceInternal::Options::Repeat); opts.addOpt("d", "debug"); opts.addOpt("", "all"); @@ -66,11 +66,11 @@ IceRuby_loadSlice(int argc, VALUE* argv, VALUE /*self*/) throw RubyException(rb_eArgError, "no Slice files specified in `%s'", cmd.c_str()); } } - catch (const IceUtilInternal::BadOptException& ex) + catch (const IceInternal::BadOptException& ex) { throw RubyException(rb_eArgError, "error in Slice options: %s", ex.reason.c_str()); } - catch (const IceUtilInternal::APIException& ex) + catch (const IceInternal::APIException& ex) { throw RubyException(rb_eArgError, "error in Slice options: %s", ex.reason.c_str()); } @@ -130,7 +130,7 @@ IceRuby_loadSlice(int argc, VALUE* argv, VALUE /*self*/) // Generate the Ruby code into a string stream. // ostringstream codeStream; - IceUtilInternal::Output out(codeStream); + IceInternal::Output out(codeStream); out.setUseTab(false); // // Ruby magic comment to set the file encoding, it must be first or second line diff --git a/ruby/src/IceRuby/Types.cpp b/ruby/src/IceRuby/Types.cpp index f3dd69fa1aa..5437630286a 100644 --- a/ruby/src/IceRuby/Types.cpp +++ b/ruby/src/IceRuby/Types.cpp @@ -6,8 +6,8 @@ #include "Ice/InputStream.h" #include "Ice/LocalException.h" #include "Ice/OutputStream.h" +#include "Ice/OutputUtil.h" #include "Ice/SlicedData.h" -#include "IceUtil/OutputUtil.h" #include "Proxy.h" #include "Util.h" #include @@ -29,7 +29,7 @@ using namespace std; using namespace IceRuby; using namespace Ice; -using namespace IceUtilInternal; +using namespace IceInternal; static VALUE _typeInfoClass, _exceptionInfoClass, _unsetTypeClass; @@ -685,7 +685,7 @@ IceRuby::PrimitiveInfo::unmarshal( } void -IceRuby::PrimitiveInfo::print(VALUE value, IceUtilInternal::Output& out, PrintObjectHistory*) +IceRuby::PrimitiveInfo::print(VALUE value, IceInternal::Output& out, PrintObjectHistory*) { switch (kind) { @@ -837,7 +837,7 @@ IceRuby::EnumInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& c } void -IceRuby::EnumInfo::print(VALUE value, IceUtilInternal::Output& out, PrintObjectHistory*) +IceRuby::EnumInfo::print(VALUE value, IceInternal::Output& out, PrintObjectHistory*) { if (!validate(value)) { @@ -1059,7 +1059,7 @@ IceRuby::StructInfo::unmarshal( } void -IceRuby::StructInfo::print(VALUE value, IceUtilInternal::Output& out, PrintObjectHistory* history) +IceRuby::StructInfo::print(VALUE value, IceInternal::Output& out, PrintObjectHistory* history) { if (!validate(value)) { @@ -1297,7 +1297,7 @@ IceRuby::SequenceInfo::unmarshaled(VALUE val, VALUE target, void* closure) } void -IceRuby::SequenceInfo::print(VALUE value, IceUtilInternal::Output& out, PrintObjectHistory* history) +IceRuby::SequenceInfo::print(VALUE value, IceInternal::Output& out, PrintObjectHistory* history) { if (!validate(value)) { @@ -1880,7 +1880,7 @@ namespace { struct DictionaryPrintIterator : public IceRuby::HashIterator { - DictionaryPrintIterator(const DictionaryInfoPtr& d, IceUtilInternal::Output& o, PrintObjectHistory* h) + DictionaryPrintIterator(const DictionaryInfoPtr& d, IceInternal::Output& o, PrintObjectHistory* h) : dict(d), out(o), history(h) @@ -1890,13 +1890,13 @@ namespace virtual void element(VALUE key, VALUE value) { dict->printElement(key, value, out, history); } IceRuby::DictionaryInfoPtr dict; - IceUtilInternal::Output& out; + IceInternal::Output& out; IceRuby::PrintObjectHistory* history; }; } void -IceRuby::DictionaryInfo::print(VALUE value, IceUtilInternal::Output& out, PrintObjectHistory* history) +IceRuby::DictionaryInfo::print(VALUE value, IceInternal::Output& out, PrintObjectHistory* history) { if (!validate(value)) { @@ -1930,7 +1930,7 @@ IceRuby::DictionaryInfo::print(VALUE value, IceUtilInternal::Output& out, PrintO } void -IceRuby::DictionaryInfo::printElement(VALUE key, VALUE value, IceUtilInternal::Output& out, PrintObjectHistory* history) +IceRuby::DictionaryInfo::printElement(VALUE key, VALUE value, IceInternal::Output& out, PrintObjectHistory* history) { out << nl << "key = "; keyType->print(key, out, history); @@ -2127,7 +2127,7 @@ IceRuby::ClassInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& } void -IceRuby::ClassInfo::print(VALUE value, IceUtilInternal::Output& out, PrintObjectHistory* history) +IceRuby::ClassInfo::print(VALUE value, IceInternal::Output& out, PrintObjectHistory* history) { if (!validate(value)) { @@ -2180,7 +2180,7 @@ IceRuby::ClassInfo::destroy() } void -IceRuby::ClassInfo::printMembers(VALUE value, IceUtilInternal::Output& out, PrintObjectHistory* history) +IceRuby::ClassInfo::printMembers(VALUE value, IceInternal::Output& out, PrintObjectHistory* history) { if (base) { @@ -2380,7 +2380,7 @@ IceRuby::ProxyInfo::unmarshal( } void -IceRuby::ProxyInfo::print(VALUE value, IceUtilInternal::Output& out, PrintObjectHistory*) +IceRuby::ProxyInfo::print(VALUE value, IceInternal::Output& out, PrintObjectHistory*) { if (!validate(value)) { @@ -2767,7 +2767,7 @@ IceRuby::ExceptionInfo::unmarshal(Ice::InputStream* is) } void -IceRuby::ExceptionInfo::print(VALUE value, IceUtilInternal::Output& out) +IceRuby::ExceptionInfo::print(VALUE value, IceInternal::Output& out) { if (callRuby(rb_obj_is_kind_of, value, rubyClass) == Qfalse) { @@ -2785,7 +2785,7 @@ IceRuby::ExceptionInfo::print(VALUE value, IceUtilInternal::Output& out) } void -IceRuby::ExceptionInfo::printMembers(VALUE value, IceUtilInternal::Output& out, PrintObjectHistory* history) +IceRuby::ExceptionInfo::printMembers(VALUE value, IceInternal::Output& out, PrintObjectHistory* history) { if (base) { @@ -3083,7 +3083,7 @@ IceRuby_stringify(VALUE /*self*/, VALUE obj, VALUE type) TypeInfoPtr info = getType(type); ostringstream ostr; - IceUtilInternal::Output out(ostr); + IceInternal::Output out(ostr); PrintObjectHistory history; history.index = 0; info->print(obj, out, &history); @@ -3105,7 +3105,7 @@ IceRuby_stringifyException(VALUE /*self*/, VALUE exc) ExceptionInfoPtr info = getException(type); ostringstream ostr; - IceUtilInternal::Output out(ostr); + IceInternal::Output out(ostr); info->print(exc, out); string str = ostr.str(); diff --git a/ruby/src/IceRuby/Types.h b/ruby/src/IceRuby/Types.h index ac3ec83044b..5fd15cc6c29 100644 --- a/ruby/src/IceRuby/Types.h +++ b/ruby/src/IceRuby/Types.h @@ -10,8 +10,8 @@ #include "Ice/FactoryTable.h" #include "Ice/Object.h" +#include "Ice/OutputUtil.h" #include "Ice/SlicedData.h" -#include "IceUtil/OutputUtil.h" namespace IceRuby { @@ -152,7 +152,7 @@ namespace IceRuby virtual void marshal(VALUE, Ice::OutputStream*, ValueMap*, bool) = 0; virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, VALUE, void*, bool) = 0; - virtual void print(VALUE, IceUtilInternal::Output&, PrintObjectHistory*) = 0; + virtual void print(VALUE, IceInternal::Output&, PrintObjectHistory*) = 0; }; using TypeInfoPtr = std::shared_ptr; @@ -186,7 +186,7 @@ namespace IceRuby void marshal(VALUE, Ice::OutputStream*, ValueMap*, bool) final; void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, VALUE, void*, bool) final; - void print(VALUE, IceUtilInternal::Output&, PrintObjectHistory*) final; + void print(VALUE, IceInternal::Output&, PrintObjectHistory*) final; static double toDouble(VALUE); @@ -213,7 +213,7 @@ namespace IceRuby void marshal(VALUE, Ice::OutputStream*, ValueMap*, bool) final; void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, VALUE, void*, bool) final; - void print(VALUE, IceUtilInternal::Output&, PrintObjectHistory*) final; + void print(VALUE, IceInternal::Output&, PrintObjectHistory*) final; const std::string id; const VALUE rubyClass; @@ -255,7 +255,7 @@ namespace IceRuby void marshal(VALUE, Ice::OutputStream*, ValueMap*, bool) final; void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, VALUE, void*, bool) final; - void print(VALUE, IceUtilInternal::Output&, PrintObjectHistory*) final; + void print(VALUE, IceInternal::Output&, PrintObjectHistory*) final; void destroy() final; @@ -290,7 +290,7 @@ namespace IceRuby void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, VALUE, void*, bool) final; void unmarshaled(VALUE, VALUE, void*) final; - void print(VALUE, IceUtilInternal::Output&, PrintObjectHistory*) final; + void print(VALUE, IceInternal::Output&, PrintObjectHistory*) final; void destroy() final; @@ -329,8 +329,8 @@ namespace IceRuby void marshalElement(VALUE, VALUE, Ice::OutputStream*, ValueMap*); void unmarshaled(VALUE, VALUE, void*) final; - void print(VALUE, IceUtilInternal::Output&, PrintObjectHistory*) final; - void printElement(VALUE, VALUE, IceUtilInternal::Output&, PrintObjectHistory*); + void print(VALUE, IceInternal::Output&, PrintObjectHistory*) final; + void printElement(VALUE, VALUE, IceInternal::Output&, PrintObjectHistory*); virtual void destroy(); @@ -375,11 +375,11 @@ namespace IceRuby void marshal(VALUE, Ice::OutputStream*, ValueMap*, bool) final; void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, VALUE, void*, bool) final; - void print(VALUE, IceUtilInternal::Output&, PrintObjectHistory*) final; + void print(VALUE, IceInternal::Output&, PrintObjectHistory*) final; void destroy() final; - void printMembers(VALUE, IceUtilInternal::Output&, PrintObjectHistory*); + void printMembers(VALUE, IceInternal::Output&, PrintObjectHistory*); bool isA(const ClassInfoPtr&); @@ -416,7 +416,7 @@ namespace IceRuby void marshal(VALUE, Ice::OutputStream*, ValueMap*, bool) final; void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, VALUE, void*, bool) final; - void print(VALUE, IceUtilInternal::Output&, PrintObjectHistory*) final; + void print(VALUE, IceInternal::Output&, PrintObjectHistory*) final; void destroy() final; @@ -436,8 +436,8 @@ namespace IceRuby public: VALUE unmarshal(Ice::InputStream*); - void print(VALUE, IceUtilInternal::Output&); - void printMembers(VALUE, IceUtilInternal::Output&, PrintObjectHistory*); + void print(VALUE, IceInternal::Output&); + void printMembers(VALUE, IceInternal::Output&, PrintObjectHistory*); std::string id; ExceptionInfoPtr base;