diff options
Diffstat (limited to 'cpp')
243 files changed, 1231 insertions, 1231 deletions
diff --git a/cpp/BuildInstructionsLinux.md b/cpp/BuildInstructionsLinux.md index 2a656abda77..4c789483351 100644 --- a/cpp/BuildInstructionsLinux.md +++ b/cpp/BuildInstructionsLinux.md @@ -16,7 +16,7 @@ compiler versions listed for our [supported platforms][2]. ### Third-Party Packages -Ice has dependencies on a number of third-party packages. Install these packages +Ice has dependencies on a number of third-party packages. Install these packages before building Ice for C++: - [bzip][3] 1.0 @@ -25,9 +25,9 @@ before building Ice for C++: - [mcpp][6] 2.7.2 (with patches) - [OpenSSL][7] 1.0.0 or later -Bzip, Expat and OpenSSL are included with most Linux distributions. +Bzip, Expat and OpenSSL are included with most Linux distributions. -ZeroC supplies binary packages for LMDB and mcpp for several Linux distributions +ZeroC supplies binary packages for LMDB and mcpp for several Linux distributions that do not include them. You can install these packages as shown below: #### Amazon Linux @@ -115,7 +115,7 @@ On an x86_64 system: When compiling Ice programs, you must pass the location of the `<prefix>/include` directory to the compiler with the `-I` option, and the location of the library -directory with the `-L` option. +directory with the `-L` option. If building a C++11 program, you must define the `ICE_CPP11_MAPPING` macro during compilation with the `-D` option (`g++ -DICE_CPP11_MAPPING`) and add @@ -135,7 +135,7 @@ After a successful source build, you can run the tests as follows: This command is equivalent to: $ python allTests.py - + For the C++11 mapping it also includes the `--c++11` argument: $ python allTests.py --c++11 diff --git a/cpp/BuildInstructionsMacOS.md b/cpp/BuildInstructionsMacOS.md index c1f236a8fef..d86502c04ef 100644 --- a/cpp/BuildInstructionsMacOS.md +++ b/cpp/BuildInstructionsMacOS.md @@ -21,7 +21,7 @@ Ice has dependencies on a number of third-party libraries: - [LMDB][5] 0.9.16 (LMDB is not required with the C++11 mapping) - [mcpp][6] 2.7.2 (with patches) -Expat and bzip are included with your system. +Expat and bzip are included with your system. You can install LMDB and mcpp using [Homebrew][7]: diff --git a/cpp/BuildInstructionsWindows.md b/cpp/BuildInstructionsWindows.md index 0b47aeda484..b08c89425b2 100644 --- a/cpp/BuildInstructionsWindows.md +++ b/cpp/BuildInstructionsWindows.md @@ -14,7 +14,7 @@ unnecessary. Ice was extensively tested using the operating systems and compiler versions listed on [supported platforms][2]. -The build requires the [Ice Builder for Visual Studio][8]; you need version +The build requires the [Ice Builder for Visual Studio][8]; you need version 4.3.6 or greater to build Ice. ### Third-Party Libraries @@ -41,7 +41,7 @@ can open one of: - VS2015 x86 Native Tools Command Prompt - VS2015 x64 Native Tools Command Prompt -Using the first Command Prompt produces `Win32` binaries by default, while +Using the first Command Prompt produces `Win32` binaries by default, while the second Command Promt produces `x64` binaries by default. In the Command Prompt, change to the `cpp` subdirectory: @@ -52,7 +52,7 @@ Now you're ready to build Ice: msbuild msbuild\ice.proj -This builds the Ice for C++ SDK and the Ice for C++ test suite, with +This builds the Ice for C++ SDK and the Ice for C++ test suite, with Release binaries for the default platform. Set the MSBuild `Configuration` property to `Debug` to build debug binaries @@ -89,7 +89,7 @@ The build will automatically install ZeroC's official Ice binary NuGet packages ## Building Ice for UWP -The steps are the same as for Building Ice for C++ above, except you must also use a +The steps are the same as for Building Ice for C++ above, except you must also use a `UWP` target. To build Ice for UWP: @@ -114,15 +114,15 @@ You can create a NuGet package with the following command: msbuild msbuild\ice.proj /t:NuGetPack /p:BuildAllConfigurations=yes -This creates zeroc.ice.v120\zeroc.ice.v120.nupkg`, `zeroc.ice.v140\zeroc.ice.v140.nupkg` or +This creates zeroc.ice.v120\zeroc.ice.v120.nupkg`, `zeroc.ice.v140\zeroc.ice.v140.nupkg` or `zeroc.ice.v141\zeroc.ice.v141.nupkg` depending on the compiler you are using. To create UWP NuGet packages, use the `UWPNuGetPack` target instead: msbuild msbuild\ice.proj /t:UWPNuGetPack /p:BuildAllConfigurations=yes -This creates `zeroc.ice.uwp.v140\zeroc.ice.uwp.v140.nupkg`, `zeroc.ice.uwp.v140.x64\zeroc.ice.uwp.v140.x64.nupkg` -and `zeroc.ice.uwp.v140.x86\zeroc.ice.uwp.v140.x86.nupkg` for Visual Studio 2015 builds or +This creates `zeroc.ice.uwp.v140\zeroc.ice.uwp.v140.nupkg`, `zeroc.ice.uwp.v140.x64\zeroc.ice.uwp.v140.x64.nupkg` +and `zeroc.ice.uwp.v140.x86\zeroc.ice.uwp.v140.x86.nupkg` for Visual Studio 2015 builds or `zeroc.ice.uwp.v140\zeroc.ice.uwp.v140.nupkg`, `zeroc.ice.uwp.v140.x64\zeroc.ice.uwp.v140.x64.nupkg` and `zeroc.ice.uwp.v140.x86\zeroc.ice.uwp.v140.x86.nupkg` for Visual Studio 2017 builds. diff --git a/cpp/config/icegridnode.cfg b/cpp/config/icegridnode.cfg index 996c4960eb2..01521fd63ba 100644 --- a/cpp/config/icegridnode.cfg +++ b/cpp/config/icegridnode.cfg @@ -38,20 +38,20 @@ IceGrid.Node.Endpoints=tcp -h localhost IceGrid.Node.Data=C:\Windows\ServiceProfiles\LocalService\AppData\Local\ZeroC\icegrid\node1 # -# Redirect the stdout and stderr of servers started by icegridnode to +# Redirect the stdout and stderr of servers started by icegridnode to # files in the specified directory. # IceGrid.Node.Output=C:\Windows\ServiceProfiles\LocalService\AppData\Local\ZeroC\icegrid\node1 # -# Uncomment to redirect the stderr of each server to this server's stdout +# Uncomment to redirect the stderr of each server to this server's stdout # file. # #IceGrid.Node.RedirectErrToOut=1 # -# Trace properties. -# You can comment-out these trace properties if you find the resulting +# Trace properties. +# You can comment-out these trace properties if you find the resulting # traces too verbose. # IceGrid.Node.Trace.Replica=2 diff --git a/cpp/config/icegridregistry.cfg b/cpp/config/icegridregistry.cfg index fa1b0213bc1..380bbb29b5f 100644 --- a/cpp/config/icegridregistry.cfg +++ b/cpp/config/icegridregistry.cfg @@ -48,7 +48,7 @@ IceGrid.Registry.Internal.Endpoints=tcp -h localhost # This directory must already exist when the registry starts. # # The path name below is merely a suggestion, based on the assumption -# that the registry is running under the LocalService account. +# that the registry is running under the LocalService account. # IceGrid.Registry.LMDB.Path=C:\Windows\ServiceProfiles\LocalService\AppData\Local\ZeroC\icegrid\registry diff --git a/cpp/include/Ice/Handle.h b/cpp/include/Ice/Handle.h index 4e11cffca2a..c9ee481d622 100644 --- a/cpp/include/Ice/Handle.h +++ b/cpp/include/Ice/Handle.h @@ -46,7 +46,7 @@ public: upCast(this->_ptr)->__incRef(); } } - + template<typename Y> Handle(const Handle<Y>& r) { @@ -78,7 +78,7 @@ public: upCast(this->_ptr)->__incRef(); } } - + ~Handle() { if(this->_ptr) @@ -86,7 +86,7 @@ public: upCast(this->_ptr)->__decRef(); } } - + Handle& operator=(T* p) { if(this->_ptr != p) @@ -106,7 +106,7 @@ public: } return *this; } - + template<typename Y> Handle& operator=(const Handle<Y>& r) { @@ -168,7 +168,7 @@ public: } return *this; } - + template<class Y> static Handle dynamicCast(const ::IceUtil::HandleBase<Y>& r) { diff --git a/cpp/include/Ice/MetricsFunctional.h b/cpp/include/Ice/MetricsFunctional.h index 89f3d4b4312..50bb1fe4d10 100644 --- a/cpp/include/Ice/MetricsFunctional.h +++ b/cpp/include/Ice/MetricsFunctional.h @@ -53,7 +53,7 @@ template<typename R> struct ReferenceWrapper<const IceInternal::ProxyHandle<R>& return v.get(); } }; - + template<typename R> struct ReferenceWrapper<IceInternal::Handle<R> > { static R* get(const IceInternal::Handle<R>& v) @@ -70,7 +70,7 @@ template<typename R> struct ReferenceWrapper<const IceInternal::Handle<R>& > } }; #endif - + template<typename R> struct ReferenceWrapper<R*> { static R* get(R* v) diff --git a/cpp/include/Ice/Protocol.h b/cpp/include/Ice/Protocol.h index e29cd892f1d..2d1b87580ad 100644 --- a/cpp/include/Ice/Protocol.h +++ b/cpp/include/Ice/Protocol.h @@ -96,9 +96,9 @@ isSupported(const T& version, const T& supported) return version.major == supported.major && version.minor <= supported.minor; } -ICE_API void throwUnsupportedProtocolException(const char*, int, const Ice::ProtocolVersion&, +ICE_API void throwUnsupportedProtocolException(const char*, int, const Ice::ProtocolVersion&, const Ice::ProtocolVersion&); -ICE_API void throwUnsupportedEncodingException(const char*, int, const Ice::EncodingVersion&, +ICE_API void throwUnsupportedEncodingException(const char*, int, const Ice::EncodingVersion&, const Ice::EncodingVersion&); const ::Ice::Byte OPTIONAL_END_MARKER = 0xFF; @@ -126,25 +126,25 @@ ICE_API extern const EncodingVersion currentProtocolEncoding; ICE_API extern const EncodingVersion currentEncoding; -inline ::std::string +inline ::std::string protocolVersionToString(const Ice::ProtocolVersion& v) { return IceInternal::versionToString<ProtocolVersion>(v); } -inline ::Ice::ProtocolVersion +inline ::Ice::ProtocolVersion stringToProtocolVersion(const ::std::string& v) { return IceInternal::stringToVersion<ProtocolVersion>(v); } -inline ::std::string +inline ::std::string encodingVersionToString(const Ice::EncodingVersion& v) { return IceInternal::versionToString<EncodingVersion>(v); } -inline ::Ice::EncodingVersion +inline ::Ice::EncodingVersion stringToEncodingVersion(const ::std::string& v) { return IceInternal::stringToVersion<EncodingVersion>(v); @@ -215,7 +215,7 @@ getCompatibleProtocol(const Ice::ProtocolVersion& v) // Unsupported but compatible, use the currently supported // protocol, that's the best we can do. // - return Ice::currentProtocol; + return Ice::currentProtocol; } } @@ -240,7 +240,7 @@ getCompatibleEncoding(const Ice::EncodingVersion& v) // Unsupported but compatible, use the currently supported // encoding, that's the best we can do. // - return Ice::currentEncoding; + return Ice::currentEncoding; } } diff --git a/cpp/include/Ice/SHA1.h b/cpp/include/Ice/SHA1.h index afb201b7e8a..3d42be66430 100644 --- a/cpp/include/Ice/SHA1.h +++ b/cpp/include/Ice/SHA1.h @@ -18,26 +18,26 @@ namespace IceInternal { -ICE_API void +ICE_API void sha1(const unsigned char*, std::size_t, std::vector<unsigned char>&); - + #ifndef ICE_OS_UWP class ICE_API SHA1 { public: - + SHA1(); ~SHA1(); - + void update(const unsigned char*, std::size_t); void finalize(std::vector<unsigned char>&); - + private: - + // noncopyable SHA1(const SHA1&); SHA1 operator=(const SHA1&); - + class Hasher; UniquePtr<Hasher> _hasher; }; diff --git a/cpp/include/Ice/UniquePtr.h b/cpp/include/Ice/UniquePtr.h index 4ce661221cc..081f9650c37 100644 --- a/cpp/include/Ice/UniquePtr.h +++ b/cpp/include/Ice/UniquePtr.h @@ -62,7 +62,7 @@ public: { return *_ptr; } - + T* operator->() const { return _ptr; diff --git a/cpp/include/IceGrid/ReplicaGroupFilter.h b/cpp/include/IceGrid/ReplicaGroupFilter.h index 26104c8ae78..418b92a3608 100644 --- a/cpp/include/IceGrid/ReplicaGroupFilter.h +++ b/cpp/include/IceGrid/ReplicaGroupFilter.h @@ -17,10 +17,10 @@ class ReplicaGroupFilter : public IceUtil::Shared { public: - virtual Ice::StringSeq filter(const string& replicaGroupId, const Ice::StringSeq& adapterIds, + virtual Ice::StringSeq filter(const string& replicaGroupId, const Ice::StringSeq& adapterIds, const Ice::ConnectionPtr&, const Ice::Context&) = 0; }; - + }; #endif diff --git a/cpp/include/IcePatch2/ClientUtil.h b/cpp/include/IcePatch2/ClientUtil.h index 4c1cfa2fa0b..0d6de453098 100644 --- a/cpp/include/IcePatch2/ClientUtil.h +++ b/cpp/include/IcePatch2/ClientUtil.h @@ -21,7 +21,7 @@ namespace IcePatch2 // // The IcePatch2::PatcherFeedback class is implemented by IcePatch2 clients to -// allow the user to interact with the patching and report progress +// allow the user to interact with the patching and report progress // on the patching. // class ICEPATCH2_API PatcherFeedback : public IceUtil::Shared @@ -87,7 +87,7 @@ public: // files if no summary file exists or if a thorough patch was // specified. This method also computes the list of files to be // patched. This should be called once before any call to patch(). - // + // // Returns true if the patch preparation was successful, false if // preparation failed (for example, because a thorough patch is // necessary, but the user chose not to patch thorough), or raises @@ -120,10 +120,10 @@ typedef IceUtil::Handle<Patcher> PatcherPtr; class ICEPATCH2_API PatcherFactory : public IceUtil::noncopyable { public: - + // // Create a patcher using configuration properties. The following - // properties are used to configure the patcher: + // properties are used to configure the patcher: // // - IcePatch2.InstanceName // - IcePatch2.Endpoints diff --git a/cpp/include/IceSSL/OpenSSL.h b/cpp/include/IceSSL/OpenSSL.h index 8de814d1d5c..b280387417a 100644 --- a/cpp/include/IceSSL/OpenSSL.h +++ b/cpp/include/IceSSL/OpenSSL.h @@ -119,7 +119,7 @@ public: // Changes made to this value have no effect on existing connections. // virtual SSL_CTX* getContext() = 0; - + }; ICE_DEFINE_PTR(PluginPtr, Plugin); diff --git a/cpp/include/IceSSL/Plugin.h b/cpp/include/IceSSL/Plugin.h index 2d9b5372e8b..fecebc76975 100644 --- a/cpp/include/IceSSL/Plugin.h +++ b/cpp/include/IceSSL/Plugin.h @@ -230,7 +230,7 @@ public: // virtual bool operator==(const Certificate&) const = 0; virtual bool operator!=(const Certificate&) const = 0; - + // // Authority key identifier // @@ -346,11 +346,11 @@ public: virtual std::string toString() const = 0; // - // Return a list with the X509v3 extensions contained in the + // Return a list with the X509v3 extensions contained in the // certificate. // virtual std::vector<X509ExtensionPtr> getX509Extensions() const = 0; - + // // Return the extension with the given OID or null if the certificate // does not contain a extension with the given OID. diff --git a/cpp/include/IceUtil/Cond.h b/cpp/include/IceUtil/Cond.h index a2d6bb683ac..439e8c7f913 100644 --- a/cpp/include/IceUtil/Cond.h +++ b/cpp/include/IceUtil/Cond.h @@ -167,7 +167,7 @@ private: throw; } } - + #else template <typename M> void waitImpl(const M&) const; @@ -177,7 +177,7 @@ private: #ifdef _WIN32 # ifdef ICE_HAS_WIN32_CONDVAR - mutable CONDITION_VARIABLE _cond; + mutable CONDITION_VARIABLE _cond; # else void wake(bool); void preWait() const; @@ -212,12 +212,12 @@ template <typename M> inline void Cond::waitImpl(const M& mutex) const { typedef typename M::LockState LockState; - + LockState state; mutex.unlock(state); - BOOL ok = SleepConditionVariableCS(&_cond, state.mutex, INFINITE); + BOOL ok = SleepConditionVariableCS(&_cond, state.mutex, INFINITE); mutex.lock(state); - + if(!ok) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); @@ -231,19 +231,19 @@ Cond::timedWaitImpl(const M& mutex, const Time& timeout) const if(msTimeout < 0 || msTimeout > 0x7FFFFFFF) { throw IceUtil::InvalidTimeoutException(__FILE__, __LINE__, timeout); - } + } typedef typename M::LockState LockState; LockState state; mutex.unlock(state); - BOOL ok = SleepConditionVariableCS(&_cond, state.mutex, static_cast<DWORD>(msTimeout)); + BOOL ok = SleepConditionVariableCS(&_cond, state.mutex, static_cast<DWORD>(msTimeout)); mutex.lock(state); - + if(!ok) { DWORD err = GetLastError(); - + if(err != ERROR_TIMEOUT) { throw ThreadSyscallException(__FILE__, __LINE__, err); @@ -260,12 +260,12 @@ template <typename M> inline void Cond::waitImpl(const M& mutex) const { typedef typename M::LockState LockState; - + LockState state; mutex.unlock(state); int rc = pthread_cond_wait(&_cond, state.mutex); mutex.lock(state); - + if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); @@ -281,10 +281,10 @@ Cond::timedWaitImpl(const M& mutex, const Time& timeout) const } typedef typename M::LockState LockState; - + LockState state; mutex.unlock(state); - + # ifdef __APPLE__ // // The monotonic time is based on mach_absolute_time and pthread @@ -300,7 +300,7 @@ Cond::timedWaitImpl(const M& mutex, const Time& timeout) const ts.tv_nsec = tv.tv_usec * 1000; int rc = pthread_cond_timedwait(&_cond, state.mutex, &ts); mutex.lock(state); - + if(rc != 0) { // diff --git a/cpp/include/IceUtil/ConsoleUtil.h b/cpp/include/IceUtil/ConsoleUtil.h index 4a9c4649631..7841034189b 100644 --- a/cpp/include/IceUtil/ConsoleUtil.h +++ b/cpp/include/IceUtil/ConsoleUtil.h @@ -68,7 +68,7 @@ operator<<(ConsoleOut& out, const T& val) ICE_API ConsoleOut& endl(ConsoleOut&); ICE_API ConsoleOut& flush(ConsoleOut&); - + template<typename T> ConsoleErr& operator<<(ConsoleErr& err, const T& val) diff --git a/cpp/include/IceUtil/CountDownLatch.h b/cpp/include/IceUtil/CountDownLatch.h index 4f1adce478e..81bfea779d8 100644 --- a/cpp/include/IceUtil/CountDownLatch.h +++ b/cpp/include/IceUtil/CountDownLatch.h @@ -22,16 +22,16 @@ namespace IceUtilInternal class ICE_API CountDownLatch { public: - + CountDownLatch(int); ~CountDownLatch(); void await() const; void countDown(); int getCount() const; - + private: - + #ifdef _WIN32 mutable LONG _count; HANDLE _event; diff --git a/cpp/include/IceUtil/Handle.h b/cpp/include/IceUtil/Handle.h index ea26c9e5921..1f4e214d966 100644 --- a/cpp/include/IceUtil/Handle.h +++ b/cpp/include/IceUtil/Handle.h @@ -26,7 +26,7 @@ class HandleBase public: typedef T element_type; - + T* get() const { return _ptr; @@ -43,7 +43,7 @@ public: // than just a function call). This maximises the chances // of inlining by compiler optimization. // - throwNullHandleException(__FILE__, __LINE__); + throwNullHandleException(__FILE__, __LINE__); } return _ptr; @@ -60,7 +60,7 @@ public: // than just a function call). This maximises the chances // of inlining by compiler optimization. // - throwNullHandleException(__FILE__, __LINE__); + throwNullHandleException(__FILE__, __LINE__); } return *_ptr; @@ -83,7 +83,7 @@ private: void throwNullHandleException(const char *, int) const; }; -template<typename T> inline void +template<typename T> inline void HandleBase<T>::throwNullHandleException(const char* file, int line) const { throw NullHandleException(file, line); @@ -147,7 +147,7 @@ template<typename T> class Handle : public HandleBase<T> { public: - + Handle(T* p = 0) { this->_ptr = p; @@ -157,7 +157,7 @@ public: this->_ptr->__incRef(); } } - + template<typename Y> Handle(const Handle<Y>& r) { @@ -178,7 +178,7 @@ public: this->_ptr->__incRef(); } } - + ~Handle() { if(this->_ptr) @@ -186,7 +186,7 @@ public: this->_ptr->__decRef(); } } - + Handle& operator=(T* p) { if(this->_ptr != p) @@ -206,7 +206,7 @@ public: } return *this; } - + template<typename Y> Handle& operator=(const Handle<Y>& r) { @@ -247,7 +247,7 @@ public: } return *this; } - + template<class Y> static Handle dynamicCast(const HandleBase<Y>& r) { diff --git a/cpp/include/IceUtil/Iterator.h b/cpp/include/IceUtil/Iterator.h index 7c54993d9d5..14b43ccada6 100644 --- a/cpp/include/IceUtil/Iterator.h +++ b/cpp/include/IceUtil/Iterator.h @@ -20,7 +20,7 @@ inline typename ForwardIterator::difference_type distance(ForwardIterator first, ForwardIterator last) { // -// Work-around for a limitation in the standard library provided +// Work-around for a limitation in the standard library provided // with the Sun C++ 5.x compilers #if defined(__SUNPRO_CC) && defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) diff --git a/cpp/include/IceUtil/Lock.h b/cpp/include/IceUtil/Lock.h index d2eaf8664eb..943a816d46c 100644 --- a/cpp/include/IceUtil/Lock.h +++ b/cpp/include/IceUtil/Lock.h @@ -25,9 +25,9 @@ class Cond; // LockT and TryLockT are the preferred construct to lock/tryLock/unlock // simple and recursive mutexes. You typically allocate them on the // stack to hold a lock on a mutex. -// LockT and TryLockT are not recursive: you cannot acquire several times +// LockT and TryLockT are not recursive: you cannot acquire several times // in a row a lock with the same Lock or TryLock object. -// +// // We must name this LockT instead of Lock, because otherwise some // compilers (such as Sun C++ 5.4) have problems with constructs // such as: @@ -42,7 +42,7 @@ template <typename T> class LockT { public: - + LockT(const T& mutex) : _mutex(mutex) { @@ -57,7 +57,7 @@ public: _mutex.unlock(); } } - + void acquire() const { if (_acquired) @@ -93,9 +93,9 @@ public: { return _acquired; } - + protected: - + // TryLockT's contructor LockT(const T& mutex, bool) : _mutex(mutex) @@ -104,7 +104,7 @@ protected: } private: - + // Not implemented; prevents accidental use. // LockT(const LockT&); diff --git a/cpp/include/IceUtil/Mutex.h b/cpp/include/IceUtil/Mutex.h index 01bb41b23c1..745e72f9ad8 100644 --- a/cpp/include/IceUtil/Mutex.h +++ b/cpp/include/IceUtil/Mutex.h @@ -51,7 +51,7 @@ public: // Note that lock/tryLock & unlock in general should not be used // directly. Instead use Lock & TryLock. // - + void lock() const; // @@ -64,9 +64,9 @@ public: // // Returns true if the mutex will unlock when calling unlock() // (false otherwise). For non-recursive mutexes, this will always - // return true. - // This function is used by the Monitor implementation to know whether - // the Mutex has been locked for the first time, or unlocked for the + // return true. + // This function is used by the Monitor implementation to know whether + // the Mutex has been locked for the first time, or unlocked for the // last time (that is another thread is able to acquire the mutex). // Pre-condition: the mutex must be locked. // @@ -88,7 +88,7 @@ private: { # ifdef ICE_HAS_WIN32_CONDVAR CRITICAL_SECTION* mutex; -# endif +# endif }; #else struct LockState @@ -211,7 +211,7 @@ Mutex::lock(LockState&) const #else inline void -Mutex::init(MutexProtocol +Mutex::init(MutexProtocol #if defined(_POSIX_THREAD_PRIO_INHERIT) && _POSIX_THREAD_PRIO_INHERIT > 0 protocol #endif @@ -344,7 +344,7 @@ Mutex::lock(LockState&) const { } -#endif +#endif inline bool Mutex::willUnlock() const diff --git a/cpp/include/IceUtil/MutexPtrLock.h b/cpp/include/IceUtil/MutexPtrLock.h index 1132471175b..256b6a7b14b 100644 --- a/cpp/include/IceUtil/MutexPtrLock.h +++ b/cpp/include/IceUtil/MutexPtrLock.h @@ -20,7 +20,7 @@ template<class T> class MutexPtrLock { public: - + MutexPtrLock<T>(const T* mutex) : _mutex(mutex), _acquired(false) @@ -66,9 +66,9 @@ public: { return _acquired; } - + private: - + // Not implemented; prevents accidental use. // MutexPtrLock<T>(const MutexPtrLock<T>&); diff --git a/cpp/include/IceUtil/MutexPtrTryLock.h b/cpp/include/IceUtil/MutexPtrTryLock.h index 1d01733c0b8..41874abb450 100644 --- a/cpp/include/IceUtil/MutexPtrTryLock.h +++ b/cpp/include/IceUtil/MutexPtrTryLock.h @@ -20,7 +20,7 @@ template<class T> class MutexPtrTryLock { public: - + MutexPtrTryLock<T>(const T* mutex) : _mutex(mutex), _acquired(false) @@ -65,9 +65,9 @@ public: { return _acquired; } - + private: - + // Not implemented; prevents accidental use. // MutexPtrTryLock<T>(const MutexPtrTryLock&); diff --git a/cpp/include/IceUtil/Optional.h b/cpp/include/IceUtil/Optional.h index 73b898c72f6..edc93c5dcc3 100644 --- a/cpp/include/IceUtil/Optional.h +++ b/cpp/include/IceUtil/Optional.h @@ -17,7 +17,7 @@ namespace IceUtilInternal { -struct NoneType +struct NoneType { }; @@ -52,11 +52,11 @@ public: Optional(const Optional<Y>& r) : _value(r._value), _isSet(r._isSet) { } - + ~Optional() { } - + Optional& operator=(IceUtilInternal::NoneType) { _value = T(); @@ -71,7 +71,7 @@ public: _isSet = true; return *this; } - + template<typename Y> Optional& operator=(const Optional<Y>& r) { @@ -132,8 +132,8 @@ public: return _isSet; } - bool operator!() const - { + bool operator!() const + { return !_isSet; } @@ -157,20 +157,20 @@ private: throwOptionalNotSetException(__FILE__, __LINE__); } } - + void throwOptionalNotSetException(const char *, int) const; T _value; bool _isSet; }; -template<class T> inline Optional<T> +template<class T> inline Optional<T> makeOptional(const T& v) { return Optional<T>(v); } -template<typename T> inline void +template<typename T> inline void Optional<T>::throwOptionalNotSetException(const char* file, int line) const { throw OptionalNotSetException(file, line); @@ -235,7 +235,7 @@ inline bool operator==(const Optional<T>& lhs, const Y& rhs) { return false; } - else + else { return *lhs == rhs; } @@ -287,7 +287,7 @@ inline bool operator==(const Y& lhs, const Optional<T>& rhs) { return false; } - else + else { return lhs == *rhs; } diff --git a/cpp/include/IceUtil/PopDisableWarnings.h b/cpp/include/IceUtil/PopDisableWarnings.h index 498a77e116f..93523a8afbd 100644 --- a/cpp/include/IceUtil/PopDisableWarnings.h +++ b/cpp/include/IceUtil/PopDisableWarnings.h @@ -7,7 +7,7 @@ // // ********************************************************************** -// No pragma once as this file can be included several times in a translation +// No pragma once as this file can be included several times in a translation // unit #if defined(_MSC_VER) diff --git a/cpp/include/IceUtil/PushDisableWarnings.h b/cpp/include/IceUtil/PushDisableWarnings.h index 7268eeea46a..10f5e4017a7 100644 --- a/cpp/include/IceUtil/PushDisableWarnings.h +++ b/cpp/include/IceUtil/PushDisableWarnings.h @@ -7,7 +7,7 @@ // // ********************************************************************** -// No pragma once as this file can be included several times in a translation +// No pragma once as this file can be included several times in a translation // unit #if defined(_MSC_VER) diff --git a/cpp/include/IceUtil/RecMutex.h b/cpp/include/IceUtil/RecMutex.h index 2aae35187ff..11b8b2474e6 100644 --- a/cpp/include/IceUtil/RecMutex.h +++ b/cpp/include/IceUtil/RecMutex.h @@ -44,7 +44,7 @@ public: // Note that lock/tryLock & unlock in general should not be used // directly. Instead use Lock & TryLock. // - + void lock() const; // @@ -53,15 +53,15 @@ public: // bool tryLock() const; - + void unlock() const; // // Returns true if the mutex will unlock when calling unlock() // (false otherwise). For non-recursive mutexes, this will always - // return true. - // This function is used by the Monitor implementation to know whether - // the Mutex has been locked for the first time, or unlocked for the + // return true. + // This function is used by the Monitor implementation to know whether + // the Mutex has been locked for the first time, or unlocked for the // last time (that is another thread is able to acquire the mutex). // Pre-condition: the mutex must be locked. // @@ -103,7 +103,7 @@ private: mutable CRITICAL_SECTION _mutex; #else mutable pthread_mutex_t _mutex; -#endif +#endif mutable int _count; }; diff --git a/cpp/include/IceUtil/Shared.h b/cpp/include/IceUtil/Shared.h index 2e2a4bbc080..b2ba4b0f949 100644 --- a/cpp/include/IceUtil/Shared.h +++ b/cpp/include/IceUtil/Shared.h @@ -120,7 +120,7 @@ public: { return (_flags & flag) > 0; } - + protected: IceUtilInternal::Atomic _ref; diff --git a/cpp/include/IceUtil/StopWatch.h b/cpp/include/IceUtil/StopWatch.h index 2c6215c7795..e91258ed530 100644 --- a/cpp/include/IceUtil/StopWatch.h +++ b/cpp/include/IceUtil/StopWatch.h @@ -25,7 +25,7 @@ public: { _s = IceUtil::Time::now(IceUtil::Time::Monotonic); } - + IceUtil::Int64 stop() { assert(isStarted()); diff --git a/cpp/include/IceUtil/Thread.h b/cpp/include/IceUtil/Thread.h index 304a0b5a8e2..10989862fd6 100644 --- a/cpp/include/IceUtil/Thread.h +++ b/cpp/include/IceUtil/Thread.h @@ -86,7 +86,7 @@ public: typedef DWORD ID; #else typedef pthread_t ID; -#endif +#endif ID id() const; static void sleep(const Time&); @@ -173,7 +173,7 @@ private: }; typedef Handle<Thread> ThreadPtr; - + } #endif diff --git a/cpp/include/IceUtil/ThreadException.h b/cpp/include/IceUtil/ThreadException.h index 2652805ff81..29c2abc7196 100644 --- a/cpp/include/IceUtil/ThreadException.h +++ b/cpp/include/IceUtil/ThreadException.h @@ -93,7 +93,7 @@ private: Time _timeout; }; - + } #endif diff --git a/cpp/include/IceUtil/Timer.h b/cpp/include/IceUtil/Timer.h index 925e4dd291f..ba409582ae1 100644 --- a/cpp/include/IceUtil/Timer.h +++ b/cpp/include/IceUtil/Timer.h @@ -43,7 +43,7 @@ ICE_DEFINE_PTR(TimerTaskPtr, TimerTask); // // The timer class is used to schedule tasks for one-time execution or -// repeated execution. Tasks are executed by the dedicated timer thread +// repeated execution. Tasks are executed by the dedicated timer thread // sequentially. // class ICE_API Timer : public virtual IceUtil::Shared, private IceUtil::Thread @@ -62,7 +62,7 @@ public: Timer(int priority); // - // Destroy the timer and detach its execution thread if the calling thread + // Destroy the timer and detach its execution thread if the calling thread // is the timer thread, join the timer execution thread otherwise. // void destroy(); @@ -104,11 +104,11 @@ protected: IceUtil::Monitor<IceUtil::Mutex> _monitor; bool _destroyed; std::set<Token> _tokens; - + class TimerTaskCompare : public std::binary_function<TimerTaskPtr, TimerTaskPtr, bool> { public: - + bool operator()(const TimerTaskPtr& lhs, const TimerTaskPtr& rhs) const { return lhs.get() < rhs.get(); @@ -119,7 +119,7 @@ protected: }; typedef IceUtil::Handle<Timer> TimerPtr; -inline +inline Timer::Token::Token(const IceUtil::Time& st, const IceUtil::Time& d, const TimerTaskPtr& t) : scheduledTime(st), delay(d), task(t) { @@ -136,7 +136,7 @@ Timer::Token::operator<(const Timer::Token& r) const { return false; } - + return task.get() < r.task.get(); } diff --git a/cpp/msbuild/ice.nuget.targets b/cpp/msbuild/ice.nuget.targets index 37f04aa7d39..c755451356f 100644 --- a/cpp/msbuild/ice.nuget.targets +++ b/cpp/msbuild/ice.nuget.targets @@ -18,7 +18,7 @@ <!-- Win32 Release binaries --> <ItemGroup Condition="'$(Platform)|$(Configuration)' == 'Win32|Release'"> - <Executables Include="$(Ice_SrcRootDir)bin\Win32\Release\*.exe" + <Executables Include="$(Ice_SrcRootDir)bin\Win32\Release\*.exe" Exclude="$(Ice_SrcRootDir)bin\Win32\Release\slice2*.exe" /> </ItemGroup> @@ -50,7 +50,7 @@ <!-- Copy required files to the package specific directories --> <Target Name="NugetPack"> - <Copy Condition="'$(Platform)|$(Configuration)' == 'Win32|Release'" + <Copy Condition="'$(Platform)|$(Configuration)' == 'Win32|Release'" SourceFiles="@(Headers)" DestinationFolder="$(PackageDirectory)\build\native\include\%(Headers.RecursiveDir)" /> <Copy Condition="'$(Platform)|$(Configuration)' == 'Win32|Release'" SourceFiles="@(Slices)" DestinationFolder="$(PackageDirectory)\slice\%(Slices.RecursiveDir)" /> diff --git a/cpp/msbuild/ice.nuget.uwp.targets b/cpp/msbuild/ice.nuget.uwp.targets index a76bee38763..590fd3cf81a 100644 --- a/cpp/msbuild/ice.nuget.uwp.targets +++ b/cpp/msbuild/ice.nuget.uwp.targets @@ -3,7 +3,7 @@ <PropertyGroup> <Ice_SrcRootDir>$(MSBuildThisFileDirectory)..\</Ice_SrcRootDir> </PropertyGroup> - + <ItemGroup> <!-- Slice compiler from x64 Release builds --> <Tools Include="$(Ice_SrcRootDir)bin\x64\Release\slice2cpp.exe; diff --git a/cpp/msbuild/ice.proj b/cpp/msbuild/ice.proj index 7283f771c21..3c1f0e230e9 100644 --- a/cpp/msbuild/ice.proj +++ b/cpp/msbuild/ice.proj @@ -204,7 +204,7 @@ <Properties>Configuration=$(Configuration);Platform=$(Platform)</Properties> </UWPTestSolution> </ItemGroup> - + </Otherwise> </Choose> @@ -283,7 +283,7 @@ BuildInParallel="true" Properties="%(Properties)" Targets="C++98\slice2cpp;C++98\slice2html"/> - + <MSBuild Projects="@(UWPDistSolution)" BuildInParallel="true" Properties="%(Properties)" /> diff --git a/cpp/msbuild/ice.test.props b/cpp/msbuild/ice.test.props index 1986d935936..f9f39a3b87a 100644 --- a/cpp/msbuild/ice.test.props +++ b/cpp/msbuild/ice.test.props @@ -4,7 +4,7 @@ <PropertyGroup> <IceSoVersion>37b0</IceSoVersion> </PropertyGroup> - + <PropertyGroup Condition="'$(Configuration)' == 'Cpp11-Debug' Or '$(Configuration)' == 'Cpp11-Release'"> <Ice_CppMapping>cpp11</Ice_CppMapping> </PropertyGroup> @@ -35,7 +35,7 @@ <PropertyGroup Condition="'$(Configuration)|$(ConfigurationType)' == 'Cpp11-Debug|DynamicLibrary'"> <TargetName>$(ProjectName)$(IceSoVersion)++11d</TargetName> </PropertyGroup> - + <PropertyGroup Condition="'$(Configuration)|$(ConfigurationType)' == 'Cpp11-Release|DynamicLibrary'"> <TargetName>$(ProjectName)$(IceSoVersion)++11</TargetName> </PropertyGroup> @@ -47,7 +47,7 @@ <PropertyGroup Condition="'$(Configuration)|$(ConfigurationType)' == 'Release|DynamicLibrary'"> <TargetName>$(ProjectName)$(IceSoVersion)</TargetName> </PropertyGroup> - + <ItemDefinitionGroup Condition="'$(ConfigurationType)' == 'DynamicLibrary'"> <Link> <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> diff --git a/cpp/src/Glacier2/ClientBlobject.cpp b/cpp/src/Glacier2/ClientBlobject.cpp index b48cb65b2ce..c332c546ba2 100644 --- a/cpp/src/Glacier2/ClientBlobject.cpp +++ b/cpp/src/Glacier2/ClientBlobject.cpp @@ -20,7 +20,7 @@ Glacier2::ClientBlobject::ClientBlobject(const InstancePtr& instance, const FilterManagerPtr& filters, const Ice::Context& sslContext, const RoutingTablePtr& routingTable): - + Glacier2::Blobject(instance, 0, sslContext), _routingTable(routingTable), _filters(filters), @@ -33,14 +33,14 @@ Glacier2::ClientBlobject::~ClientBlobject() } void -Glacier2::ClientBlobject::ice_invoke_async(const Ice::AMD_Object_ice_invokePtr& amdCB, +Glacier2::ClientBlobject::ice_invoke_async(const Ice::AMD_Object_ice_invokePtr& amdCB, const std::pair<const Byte*, const Byte*>& inParams, const Current& current) { bool matched = false; bool hasFilters = false; string rejectedFilters; - + if(!_filters->categories()->empty()) { hasFilters = true; @@ -130,13 +130,13 @@ Glacier2::ClientBlobject::ice_invoke_async(const Ice::AMD_Object_ice_invokePtr& invoke(proxy, amdCB, inParams, current); } -StringSetPtr +StringSetPtr ClientBlobject::categories() { return _filters->categories(); } -StringSetPtr +StringSetPtr ClientBlobject::adapterIds() { return _filters->adapterIds(); diff --git a/cpp/src/Glacier2/ClientBlobject.h b/cpp/src/Glacier2/ClientBlobject.h index 5fdd919318c..61d7568d55c 100644 --- a/cpp/src/Glacier2/ClientBlobject.h +++ b/cpp/src/Glacier2/ClientBlobject.h @@ -29,7 +29,7 @@ class ClientBlobject : public Glacier2::Blobject { public: - ClientBlobject(const InstancePtr&, const FilterManagerPtr&, const Ice::Context&, const RoutingTablePtr&); + ClientBlobject(const InstancePtr&, const FilterManagerPtr&, const Ice::Context&, const RoutingTablePtr&); virtual ~ClientBlobject(); virtual void ice_invoke_async(const Ice::AMD_Object_ice_invokePtr&, diff --git a/cpp/src/Glacier2/FilterI.h b/cpp/src/Glacier2/FilterI.h index b4c93801454..dec17efb19b 100644 --- a/cpp/src/Glacier2/FilterI.h +++ b/cpp/src/Glacier2/FilterI.h @@ -59,15 +59,15 @@ public: return binary_search(_items.begin(), _items.end(), candidate); } - bool + bool empty() const { IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this); return _items.size() == 0; } - + private: - + std::vector<T> _items; }; @@ -115,14 +115,14 @@ FilterT<T, P>::remove(const std::vector<T>& deletions, const Ice::Current&) // match between the current set and the set of items to be removed, // we do not need to traverse the whole of the current set each // time. We also use a list of deletions instead of erasing things - // itemwise. + // itemwise. // // // The presence of the 'typename' is a GCC specific workaround. The // iterator types apparently resolve to a 'void' in GCC type // causing compiler errors. - // + // const_iterator r = toRemove.begin(); iterator mark = _items.begin(); std::list<iterator> deleteList; @@ -162,7 +162,7 @@ FilterT<T, P>::remove(const std::vector<T>& deletions, const Ice::Current&) } } -template<class T, class P> std::vector<T> +template<class T, class P> std::vector<T> FilterT<T, P>::get(const Ice::Current&) { IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this); diff --git a/cpp/src/Glacier2/FilterManager.cpp b/cpp/src/Glacier2/FilterManager.cpp index 030b559e621..a577e32ac61 100644 --- a/cpp/src/Glacier2/FilterManager.cpp +++ b/cpp/src/Glacier2/FilterManager.cpp @@ -27,7 +27,7 @@ static void stringToSeq(const string& str, vector<string>& seq) { IceUtilInternal::splitString(str, " \t", seq); - + // // TODO: do something about unmatched quotes // @@ -83,7 +83,7 @@ stringToSeq(const string& str, vector<Identity>& seq) { ++end; } - } + } if(end != string::npos) { ++end; @@ -108,7 +108,7 @@ Glacier2::FilterManager::~FilterManager() destroy(); } -void +void Glacier2::FilterManager::destroy() { Ice::ObjectAdapterPtr adapter = _instance->serverObjectAdapter(); @@ -147,7 +147,7 @@ Glacier2::FilterManager::destroy() } } -Glacier2::FilterManager::FilterManager(const InstancePtr& instance, const Glacier2::StringSetIPtr& categories, +Glacier2::FilterManager::FilterManager(const InstancePtr& instance, const Glacier2::StringSetIPtr& categories, const Glacier2::StringSetIPtr& adapters, const Glacier2::IdentitySetIPtr& identities) : _categories(categories), @@ -187,7 +187,7 @@ Glacier2::FilterManager::create(const InstancePtr& instance, const string& userI { addUserMode = props->getPropertyAsInt("Glacier2.Filter.Category.AcceptUser"); } - + if(addUserMode > 0 && !userId.empty()) { if(addUserMode == 1) @@ -198,7 +198,7 @@ Glacier2::FilterManager::create(const InstancePtr& instance, const string& userI { allowSeq.push_back('_' + userId); // Add user id with prepended underscore to allowed categories. } - } + } } Glacier2::StringSetIPtr categoryFilter = new Glacier2::StringSetI(allowSeq); @@ -211,7 +211,7 @@ Glacier2::FilterManager::create(const InstancePtr& instance, const string& userI // // TODO: Object id's from configurations? - // + // IdentitySeq allowIdSeq; allow = props->getProperty("Glacier2.Filter.Identity.Accept"); stringToSeq(allow, allowIdSeq); diff --git a/cpp/src/Glacier2/FilterManager.h b/cpp/src/Glacier2/FilterManager.h index eb6243d5712..f7afe95dc03 100644 --- a/cpp/src/Glacier2/FilterManager.h +++ b/cpp/src/Glacier2/FilterManager.h @@ -31,25 +31,25 @@ public: void destroy(); - StringSetIPtr + StringSetIPtr categories() const { return _categories; } - StringSetIPtr + StringSetIPtr adapterIds() const { return _adapters; } - IdentitySetIPtr + IdentitySetIPtr identities() const { return _identities; } - StringSetPrx + StringSetPrx categoriesPrx() const { return _categoriesPrx; @@ -67,7 +67,7 @@ public: return _identitiesPrx; } - static FilterManagerPtr + static FilterManagerPtr create(const InstancePtr&, const std::string&, const bool); private: diff --git a/cpp/src/Glacier2/InstrumentationI.cpp b/cpp/src/Glacier2/InstrumentationI.cpp index bf46dca72f3..9b790a7561d 100644 --- a/cpp/src/Glacier2/InstrumentationI.cpp +++ b/cpp/src/Glacier2/InstrumentationI.cpp @@ -19,7 +19,7 @@ using namespace Glacier2; using namespace Glacier2::Instrumentation; using namespace IceMX; -namespace +namespace { class SessionHelper : public MetricsHelperT<SessionMetrics> @@ -29,7 +29,7 @@ public: class Attributes : public AttributeResolverT<SessionHelper> { public: - + Attributes() { add("parent", &SessionHelper::getInstanceName); @@ -39,7 +39,7 @@ public: } }; static Attributes attributes; - + SessionHelper(const string& instanceName, const string& id, const ::Ice::ConnectionPtr& connection, int rtSize) : _instanceName(instanceName), _id(id), _connection(connection), _routingTableSize(rtSize) { @@ -64,7 +64,7 @@ public: { return _id; } - + ::Ice::ConnectionInfoPtr getConnectionInfo() const { @@ -178,7 +178,7 @@ SessionObserverI::routingTableSize(int delta) forEach(add(&SessionMetrics::routingTableSize, delta)); } -RouterObserverI::RouterObserverI(const IceInternal::MetricsAdminIPtr& metrics, const string& instanceName) : +RouterObserverI::RouterObserverI(const IceInternal::MetricsAdminIPtr& metrics, const string& instanceName) : _metrics(metrics), _instanceName(instanceName), _sessions(metrics, "Session") { } @@ -190,8 +190,8 @@ RouterObserverI::setObserverUpdater(const ObserverUpdaterPtr& updater) } SessionObserverPtr -RouterObserverI::getSessionObserver(const string& id, - const ::Ice::ConnectionPtr& connection, +RouterObserverI::getSessionObserver(const string& id, + const ::Ice::ConnectionPtr& connection, int routingTableSize, const SessionObserverPtr& old) { diff --git a/cpp/src/Glacier2/InstrumentationI.h b/cpp/src/Glacier2/InstrumentationI.h index d2faab60d06..37a9c0940ff 100644 --- a/cpp/src/Glacier2/InstrumentationI.h +++ b/cpp/src/Glacier2/InstrumentationI.h @@ -18,7 +18,7 @@ namespace Glacier2 { -class SessionObserverI : public Glacier2::Instrumentation::SessionObserver, +class SessionObserverI : public Glacier2::Instrumentation::SessionObserver, public IceMX::ObserverT<IceMX::SessionMetrics> { public: @@ -36,7 +36,7 @@ public: RouterObserverI(const IceInternal::MetricsAdminIPtr&, const std::string&); virtual void setObserverUpdater(const Glacier2::Instrumentation::ObserverUpdaterPtr&); - + virtual Glacier2::Instrumentation::SessionObserverPtr getSessionObserver( const std::string&, const Ice::ConnectionPtr&, int, const Glacier2::Instrumentation::SessionObserverPtr&); diff --git a/cpp/src/Glacier2/ProxyVerifier.cpp b/cpp/src/Glacier2/ProxyVerifier.cpp index 24f0318b6f3..1ecdd5c076f 100644 --- a/cpp/src/Glacier2/ProxyVerifier.cpp +++ b/cpp/src/Glacier2/ProxyVerifier.cpp @@ -105,7 +105,7 @@ parseGroup(const string& parameter, vector<int>& validPorts, vector<Range>& rang class AddressMatcher { public: - virtual ~AddressMatcher() {} + virtual ~AddressMatcher() {} virtual bool match(const string&, string::size_type& pos) = 0; virtual const char* toString() const = 0; @@ -116,7 +116,7 @@ protected: class MatchesAny : public AddressMatcher { public: - MatchesAny() + MatchesAny() { } @@ -136,7 +136,7 @@ public: // // Match the start of a string (i.e. position == 0). Occurs when filter // string starts with a set of characters followed by a wildcard or -// numeric range. +// numeric range. // class StartsWithString : public AddressMatcher { @@ -147,7 +147,7 @@ public: { } - bool + bool match(const string& space, string::size_type& pos) { assert(pos == 0); @@ -183,7 +183,7 @@ public: { } - bool + bool match(const string& space, string::size_type& pos) { if(space.size() - pos < _criteria.size()) @@ -216,7 +216,7 @@ private: class MatchesString : public AddressMatcher { -public: +public: MatchesString(const string& criteria): _criteria(criteria), _description("matches " + criteria) @@ -289,7 +289,7 @@ private: class MatchesNumber : public AddressMatcher { public: - MatchesNumber(const vector<int>& values, const vector<Range>& ranges, + MatchesNumber(const vector<int>& values, const vector<Range>& ranges, const char* descriptionPrefix = "matches "): _values(values), _ranges(ranges) @@ -393,10 +393,10 @@ public: { } - bool + bool match(const string& space, string::size_type& pos) { - while(true) + while(true) { pos = space.find_first_of("0123456789", pos); if(pos == string::npos) @@ -421,7 +421,7 @@ public: { } - bool + bool match(const string& space, string::size_type& pos) { pos = space.find_last_not_of("0123456789", pos); @@ -446,25 +446,25 @@ public: class AddressMatcherFactory { public: - virtual ~AddressMatcherFactory() {} + virtual ~AddressMatcherFactory() {} - virtual AddressMatcher* + virtual AddressMatcher* create(const string& criteria) = 0; - virtual AddressMatcher* + virtual AddressMatcher* create(const vector<int>& ports, const vector<Range>& ranges) = 0; }; class StartFactory : public AddressMatcherFactory { public: - AddressMatcher* + AddressMatcher* create(const string& criteria) { return new StartsWithString(criteria); } - AddressMatcher* + AddressMatcher* create(const vector<int>& ports, const vector<Range>& ranges) { return new MatchesNumber(ports, ranges); @@ -474,13 +474,13 @@ public: class WildCardFactory : public AddressMatcherFactory { public: - AddressMatcher* + AddressMatcher* create(const string& criteria) { return new ContainsString(criteria); } - AddressMatcher* + AddressMatcher* create(const vector<int>& ports, const vector<Range>& ranges) { return new ContainsNumberMatch(ports, ranges); @@ -490,13 +490,13 @@ public: class FollowingFactory : public AddressMatcherFactory { public: - AddressMatcher* + AddressMatcher* create(const string& criteria) { return new MatchesString(criteria); } - AddressMatcher* + AddressMatcher* create(const vector<int>& ports, const vector<Range>& ranges) { return new MatchesNumber(ports, ranges); @@ -512,7 +512,7 @@ public: return new EndsWithString(criteria); } - AddressMatcher* + AddressMatcher* create(const vector<int>& ports, const vector<Range>& ranges) { return new EndsWithNumber(ports, ranges); @@ -543,7 +543,7 @@ public: delete _portMatcher; } - virtual bool + virtual bool check(const ObjectPrx& prx) const { EndpointSeq endpoints = prx->ice_getEndpoints(); @@ -599,7 +599,7 @@ public: return true; } - void + void dump() const { consoleErr << "address("; @@ -616,7 +616,7 @@ public: private: - bool + bool extractPart(const char* opt, const string& source, string& result) const { string::size_type start = source.find(opt); @@ -644,7 +644,7 @@ private: }; static void -parseProperty(const Ice::CommunicatorPtr& communicator, const string& property, vector<ProxyRule*>& rules, +parseProperty(const Ice::CommunicatorPtr& communicator, const string& property, vector<ProxyRule*>& rules, const int traceLevel) { StartFactory startsWithFactory; @@ -806,7 +806,7 @@ parseProperty(const Ice::CommunicatorPtr& communicator, const string& property, } // -// Helper function for checking a rule set. +// Helper function for checking a rule set. // static bool match(const vector<ProxyRule*>& rules, const ObjectPrx& proxy) @@ -823,7 +823,7 @@ match(const vector<ProxyRule*>& rules, const ObjectPrx& proxy) // // ProxyLengthRule returns 'true' if the string form of the proxy exceeds the configured -// length. +// length. // class ProxyLengthRule : public ProxyRule { @@ -851,7 +851,7 @@ public: if(_traceLevel >= 1) { Trace out(_communicator->getLogger(), "Glacier2"); - out << _communicator->proxyToString(p) << (result ? " exceeds " : " meets ") + out << _communicator->proxyToString(p) << (result ? " exceeds " : " meets ") << "proxy size restriction\n"; } return result; @@ -871,7 +871,7 @@ Glacier2::ProxyVerifier::ProxyVerifier(const CommunicatorPtr& communicator): { // // Evaluation order is dependant on how the rules are stored to the - // rules vectors. + // rules vectors. // string s = communicator->getProperties()->getProperty("Glacier2.Filter.Address.Accept"); if(s != "") diff --git a/cpp/src/Glacier2/ProxyVerifier.h b/cpp/src/Glacier2/ProxyVerifier.h index 307e1b6c655..f3f602b0fa1 100644 --- a/cpp/src/Glacier2/ProxyVerifier.h +++ b/cpp/src/Glacier2/ProxyVerifier.h @@ -17,7 +17,7 @@ namespace Glacier2 { // -// Base class for proxy rule implementations. +// Base class for proxy rule implementations. // class ProxyRule diff --git a/cpp/src/Glacier2/RoutingTable.cpp b/cpp/src/Glacier2/RoutingTable.cpp index 0b214c7a07d..c1b6f18c01a 100644 --- a/cpp/src/Glacier2/RoutingTable.cpp +++ b/cpp/src/Glacier2/RoutingTable.cpp @@ -55,7 +55,7 @@ Glacier2::RoutingTable::add(const ObjectProxySeq& unfiltered, const Current& cur // ensures that our state is not modified if this operation results // in a rejection. // - ObjectProxySeq proxies; + ObjectProxySeq proxies; for(ObjectProxySeq::const_iterator prx = unfiltered.begin(); prx != unfiltered.end(); ++prx) { if(!*prx) // We ignore null proxies. @@ -77,7 +77,7 @@ Glacier2::RoutingTable::add(const ObjectProxySeq& unfiltered, const Current& cur { ObjectPrx proxy = *prx; EvictorMap::iterator p = _map.find(proxy->ice_getIdentity()); - + if(p == _map.end()) { if(_traceLevel == 1 || _traceLevel >= 3) @@ -85,7 +85,7 @@ Glacier2::RoutingTable::add(const ObjectProxySeq& unfiltered, const Current& cur Trace out(_communicator->getLogger(), "Glacier2"); out << "adding proxy to routing table:\n" << _communicator->proxyToString(proxy); } - + EvictorEntryPtr entry = new EvictorEntry; p = _map.insert(_map.begin(), pair<const Identity, EvictorEntryPtr>(proxy->ice_getIdentity(), entry)); EvictorQueue::iterator q = _queue.insert(_queue.end(), p); @@ -99,23 +99,23 @@ Glacier2::RoutingTable::add(const ObjectProxySeq& unfiltered, const Current& cur Trace out(_communicator->getLogger(), "Glacier2"); out << "proxy already in routing table:\n" << _communicator->proxyToString(proxy); } - + EvictorEntryPtr entry = p->second; _queue.erase(entry->pos); EvictorQueue::iterator q = _queue.insert(_queue.end(), p); entry->pos = q; } - + while(static_cast<int>(_map.size()) > _maxSize) { p = _queue.front(); - + if(_traceLevel >= 2) { Trace out(_communicator->getLogger(), "Glacier2"); out << "evicting proxy from routing table:\n" << _communicator->proxyToString(p->second->proxy); } - + evictedProxies.push_back(p->second->proxy); _map.erase(p); diff --git a/cpp/src/Glacier2/RoutingTable.h b/cpp/src/Glacier2/RoutingTable.h index 8428ca1c138..68673377615 100644 --- a/cpp/src/Glacier2/RoutingTable.h +++ b/cpp/src/Glacier2/RoutingTable.h @@ -33,9 +33,9 @@ public: void destroy(); - Glacier2::Instrumentation::SessionObserverPtr + Glacier2::Instrumentation::SessionObserverPtr updateObserver(const Glacier2::Instrumentation::RouterObserverPtr&, const std::string&, const Ice::ConnectionPtr&); - + // Returns evicted proxies. Ice::ObjectProxySeq add(const Ice::ObjectProxySeq&, const Ice::Current&); Ice::ObjectPrx get(const Ice::Identity&); // Returns null if no proxy can be found. @@ -45,7 +45,7 @@ private: const Ice::CommunicatorPtr _communicator; const int _traceLevel; const int _maxSize; - const ProxyVerifierPtr _verifier; + const ProxyVerifierPtr _verifier; struct EvictorEntry; typedef IceUtil::Handle<EvictorEntry> EvictorEntryPtr; diff --git a/cpp/src/Glacier2Lib/NullPermissionsVerifier.cpp b/cpp/src/Glacier2Lib/NullPermissionsVerifier.cpp index d438b2640fc..28e75721d91 100644 --- a/cpp/src/Glacier2Lib/NullPermissionsVerifier.cpp +++ b/cpp/src/Glacier2Lib/NullPermissionsVerifier.cpp @@ -50,11 +50,11 @@ public: class Init { public: - + Init(const CommunicatorPtr&, const string&, const vector<string>&); - + private: - + string checkPermissionVerifier(const string&); void createObjects(); @@ -73,7 +73,7 @@ Init::Init(const CommunicatorPtr& communicator, const string& category, const ve _nullSSLPVId.name = "NullSSLPermissionsVerifier"; _nullSSLPVId.category = category; - + Ice::PropertiesPtr properties = _communicator->getProperties(); for(vector<string>::const_iterator p = props.begin(); p != props.end(); ++p) { @@ -110,7 +110,7 @@ Init::checkPermissionVerifier(const string& val) { // check if it's actually a stringified identity // (with typically missing " " because the category contains a space) - + if(val == _communicator->identityToString(_nullPVId)) { createObjects(); @@ -121,18 +121,18 @@ Init::checkPermissionVerifier(const string& val) createObjects(); return _adapter->createProxy(_nullSSLPVId)->ice_toString(); // Return valid proxy to rewrite the property } - + // Otherwise let the service report this incorrectly formatted proxy } return string(); } - + void Init::createObjects() { if(!_adapter) { - _adapter = _communicator->createObjectAdapter(""); // colloc-only adapter + _adapter = _communicator->createObjectAdapter(""); // colloc-only adapter _adapter->add(ICE_MAKE_SHARED(NullPermissionsVerifier), _nullPVId); _adapter->add(ICE_MAKE_SHARED(NullSSLPermissionsVerifier), _nullSSLPVId); _adapter->activate(); diff --git a/cpp/src/Ice/Base64.cpp b/cpp/src/Ice/Base64.cpp index 3895b56b21f..cfdd5d4c4a2 100644 --- a/cpp/src/Ice/Base64.cpp +++ b/cpp/src/Ice/Base64.cpp @@ -17,16 +17,16 @@ IceInternal::Base64::encode(const vector<unsigned char>& plainSeq) { string retval; - if(plainSeq.size() == 0) + if(plainSeq.size() == 0) { return retval; } - + // Reserve enough space for the returned base64 string size_t base64Bytes = (((plainSeq.size() * 4) / 3) + 1); size_t newlineBytes = (((base64Bytes * 2) / 76) + 1); size_t totalBytes = base64Bytes + newlineBytes; - + retval.reserve(totalBytes); unsigned char by1 = 0; @@ -52,7 +52,7 @@ IceInternal::Base64::encode(const vector<unsigned char>& plainSeq) { by3 = plainSeq[i+2]; } - + by4 = by1 >> 2; by5 = ((by1 & 0x3) << 4) | (by2 >> 4); by6 = ((by2 & 0xf) << 2) | (by3 >> 6); @@ -60,7 +60,7 @@ IceInternal::Base64::encode(const vector<unsigned char>& plainSeq) retval += encode(by4); retval += encode(by5); - + if((i + 1) < plainSeq.size()) { retval += encode(by6); @@ -69,7 +69,7 @@ IceInternal::Base64::encode(const vector<unsigned char>& plainSeq) { retval += "="; } - + if((i + 2) < plainSeq.size()) { retval += encode(by7); @@ -223,17 +223,17 @@ IceInternal::Base64::encode(unsigned char uc) { return 'A' + uc; } - + if(uc < 52) { return 'a' + (uc - 26); } - + if(uc < 62) { return '0' + (uc - 52); } - + if(uc == 62) { return '+'; @@ -264,6 +264,6 @@ IceInternal::Base64::decode(char c) { return 62; } - + return 63; } diff --git a/cpp/src/Ice/Cond.cpp b/cpp/src/Ice/Cond.cpp index a319f066e93..ba79bddab1c 100644 --- a/cpp/src/Ice/Cond.cpp +++ b/cpp/src/Ice/Cond.cpp @@ -71,7 +71,7 @@ IceUtilInternal::Semaphore::timedWait(const IceUtil::Time& timeout) const if(msTimeout < 0 || msTimeout > 0x7FFFFFFF) { throw IceUtil::InvalidTimeoutException(__FILE__, __LINE__, timeout); - } + } DWORD rc = WaitForSingleObject(_sem, static_cast<DWORD>(msTimeout)); if(rc != WAIT_TIMEOUT && rc != WAIT_OBJECT_0) @@ -333,7 +333,7 @@ IceUtil::Cond::Cond() } #if !defined(__hppa) && !defined(__APPLE__) - rc = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); + rc = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); diff --git a/cpp/src/Ice/GCObject.cpp b/cpp/src/Ice/GCObject.cpp index b5092f1552a..65aec850ab5 100644 --- a/cpp/src/Ice/GCObject.cpp +++ b/cpp/src/Ice/GCObject.cpp @@ -18,7 +18,7 @@ using namespace std; using namespace IceUtil; using namespace IceInternal; -namespace +namespace { typedef ::map<GCObject*, int> GCCountMap; @@ -41,11 +41,11 @@ public: }; Init init; - + class ClearMembers : public GCVisitor { public: - + virtual bool visit(GCObject*); }; ClearMembers clearMembers; @@ -53,7 +53,7 @@ ClearMembers clearMembers; class DecreaseRefCounts : public GCVisitor { public: - + DecreaseRefCounts(GCCountMap&); virtual bool visit(GCObject*); @@ -66,7 +66,7 @@ private: class RestoreRefCountsIfReachable : public GCVisitor { public: - + RestoreRefCountsIfReachable(GCCountMap&); virtual bool visit(GCObject*); @@ -111,7 +111,7 @@ private: class ClearCollectable : public GCVisitor { public: - + virtual bool visit(GCObject*); }; @@ -127,7 +127,7 @@ DecreaseRefCounts::DecreaseRefCounts(GCCountMap& counts) : _counts(counts) { } -bool +bool DecreaseRefCounts::visit(GCObject* obj) { // @@ -159,7 +159,7 @@ RestoreRefCountsIfReachable::RestoreRefCountsIfReachable(GCCountMap& counts) : _ { } -bool +bool RestoreRefCountsIfReachable::visit(GCObject* obj) { GCCountMap::iterator p = _counts.find(obj); @@ -170,7 +170,7 @@ RestoreRefCountsIfReachable::visit(GCObject* obj) // it's reachable. // return false; - } + } else if(_reachable) { // @@ -198,8 +198,8 @@ RestoreRefCountsIfReachable::visit(GCObject* obj) // and visit its sub-graph to remove children wobjects from // the counts map since they are also reachable. // - _counts.erase(p); - + _counts.erase(p); + _reachable = true; obj->_iceGcVisitMembers(*this); _reachable = false; @@ -212,7 +212,7 @@ MarkCollectable::MarkCollectable() : _counter(0) _neighborsVisitor.setVisitor(this); } -bool +bool MarkCollectable::visit(GCObject* obj) { // @@ -229,7 +229,7 @@ MarkCollectable::visit(GCObject* obj) return false; } obj->__setFlag(GCObject::Collectable); - + _numbers[obj] = ++_counter; _p.push(obj); _s.push(obj); @@ -274,14 +274,14 @@ MarkCollectable::VisitNeighbors::setVisitor(MarkCollectable* visitor) _visitor = visitor; } -bool +bool MarkCollectable::VisitNeighbors::visit(GCObject* obj) { _visitor->visitNeighbor(obj); return false; } -bool +bool ClearCollectable::visit(GCObject* obj) { // diff --git a/cpp/src/Ice/HashUtil.h b/cpp/src/Ice/HashUtil.h index 74794141f12..4f9edbb854e 100644 --- a/cpp/src/Ice/HashUtil.h +++ b/cpp/src/Ice/HashUtil.h @@ -31,7 +31,7 @@ hashAdd(Ice::Int& hashCode, const std::string& value) for(std::string::const_iterator p = value.begin(); p != value.end(); ++p) { hashCode = ((hashCode << 5) + hashCode) ^ *p; - } + } } template<typename T> void diff --git a/cpp/src/Ice/NetworkProxy.cpp b/cpp/src/Ice/NetworkProxy.cpp index ee90a907e59..1eedf5ee4fe 100644 --- a/cpp/src/Ice/NetworkProxy.cpp +++ b/cpp/src/Ice/NetworkProxy.cpp @@ -124,7 +124,7 @@ SOCKSNetworkProxy::beginWrite(const Address& addr, Buffer& buf) SocketOperation SOCKSNetworkProxy::endWrite(Buffer& buf) { - // Once the request is sent, read the response + // Once the request is sent, read the response return buf.i != buf.b.end() ? SocketOperationWrite : SocketOperationRead; } @@ -190,14 +190,14 @@ SOCKSNetworkProxy::getProtocolSupport() const return EnableIPv4; } -HTTPNetworkProxy::HTTPNetworkProxy(const string& host, int port) : +HTTPNetworkProxy::HTTPNetworkProxy(const string& host, int port) : _host(host), _port(port), _protocol(EnableBoth) { assert(!host.empty()); memset(&_address, 0, sizeof(_address)); } -HTTPNetworkProxy::HTTPNetworkProxy(const Address& addr, ProtocolSupport protocol) : +HTTPNetworkProxy::HTTPNetworkProxy(const Address& addr, ProtocolSupport protocol) : _port(0), _address(addr), _protocol(protocol) { } @@ -219,7 +219,7 @@ HTTPNetworkProxy::beginWrite(const Address& addr, Buffer& buf) SocketOperation HTTPNetworkProxy::endWrite(Buffer& buf) { - // Once the request is sent, read the response + // Once the request is sent, read the response return buf.i != buf.b.end() ? SocketOperationWrite : SocketOperationRead; } @@ -247,7 +247,7 @@ HTTPNetworkProxy::endRead(Buffer& buf) // Read one more byte, we can't easily read bytes in advance // since the transport implenentation might be be able to read // the data from the memory instead of the socket. This is for - // instance the case with the OpenSSL transport (or we would + // instance the case with the OpenSSL transport (or we would // have to use a buffering BIO). // buf.b.resize(buf.b.size() + 1); @@ -325,6 +325,6 @@ IceInternal::createNetworkProxy(const Ice::PropertiesPtr& properties, ProtocolSu return new HTTPNetworkProxy(proxyHost, properties->getPropertyAsIntWithDefault("Ice.HTTPProxyPort", 1080)); #endif } - + return 0; } diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp index e44b6b2ea2a..19d052ae2d7 100644 --- a/cpp/src/Ice/PropertyNames.cpp +++ b/cpp/src/Ice/PropertyNames.cpp @@ -12,7 +12,7 @@ #include <Ice/PropertyNames.h> -const IceInternal::Property IcePropsData[] = +const IceInternal::Property IcePropsData[] = { IceInternal::Property("Ice.ACM.Client", true, 0), IceInternal::Property("Ice.ACM.Server", true, 0), @@ -197,7 +197,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::IceProps(IcePropsData, sizeof(IcePropsData)/sizeof(IcePropsData[0])); -const IceInternal::Property IceMXPropsData[] = +const IceInternal::Property IceMXPropsData[] = { IceInternal::Property("IceMX.Metrics.*.GroupBy", false, 0), IceInternal::Property("IceMX.Metrics.*.Map", false, 0), @@ -211,7 +211,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::IceMXProps(IceMXPropsData, sizeof(IceMXPropsData)/sizeof(IceMXPropsData[0])); -const IceInternal::Property IceDiscoveryPropsData[] = +const IceInternal::Property IceDiscoveryPropsData[] = { IceInternal::Property("IceDiscovery.Multicast.ACM.Timeout", false, 0), IceInternal::Property("IceDiscovery.Multicast.ACM.Heartbeat", false, 0), @@ -338,7 +338,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::IceDiscoveryProps(IceDiscoveryPropsData, sizeof(IceDiscoveryPropsData)/sizeof(IceDiscoveryPropsData[0])); -const IceInternal::Property IceLocatorDiscoveryPropsData[] = +const IceInternal::Property IceLocatorDiscoveryPropsData[] = { IceInternal::Property("IceLocatorDiscovery.Reply.ACM.Timeout", false, 0), IceInternal::Property("IceLocatorDiscovery.Reply.ACM.Heartbeat", false, 0), @@ -428,7 +428,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::IceLocatorDiscoveryProps(IceLocatorDiscoveryPropsData, sizeof(IceLocatorDiscoveryPropsData)/sizeof(IceLocatorDiscoveryPropsData[0])); -const IceInternal::Property IceBoxPropsData[] = +const IceInternal::Property IceBoxPropsData[] = { IceInternal::Property("IceBox.InheritProperties", false, 0), IceInternal::Property("IceBox.InstanceName", true, 0), @@ -453,7 +453,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::IceBoxProps(IceBoxPropsData, sizeof(IceBoxPropsData)/sizeof(IceBoxPropsData[0])); -const IceInternal::Property IceBoxAdminPropsData[] = +const IceInternal::Property IceBoxAdminPropsData[] = { IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.EndpointSelection", false, 0), IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.ConnectionCached", false, 0), @@ -471,7 +471,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::IceBoxAdminProps(IceBoxAdminPropsData, sizeof(IceBoxAdminPropsData)/sizeof(IceBoxAdminPropsData[0])); -const IceInternal::Property IceGridAdminPropsData[] = +const IceInternal::Property IceGridAdminPropsData[] = { IceInternal::Property("IceGridAdmin.AuthenticateUsingSSL", false, 0), IceInternal::Property("IceGridAdmin.MetricsConfig", false, 0), @@ -566,7 +566,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::IceGridAdminProps(IceGridAdminPropsData, sizeof(IceGridAdminPropsData)/sizeof(IceGridAdminPropsData[0])); -const IceInternal::Property IceGridPropsData[] = +const IceInternal::Property IceGridPropsData[] = { IceInternal::Property("IceGrid.AdminRouter.ACM.Timeout", false, 0), IceInternal::Property("IceGrid.AdminRouter.ACM.Heartbeat", false, 0), @@ -972,7 +972,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::IceGridProps(IceGridPropsData, sizeof(IceGridPropsData)/sizeof(IceGridPropsData[0])); -const IceInternal::Property IcePatch2PropsData[] = +const IceInternal::Property IcePatch2PropsData[] = { IceInternal::Property("IcePatch2.ACM.Timeout", false, 0), IceInternal::Property("IcePatch2.ACM.Heartbeat", false, 0), @@ -1019,7 +1019,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::IcePatch2Props(IcePatch2PropsData, sizeof(IcePatch2PropsData)/sizeof(IcePatch2PropsData[0])); -const IceInternal::Property IcePatch2ClientPropsData[] = +const IceInternal::Property IcePatch2ClientPropsData[] = { IceInternal::Property("IcePatch2Client.ChunkSize", false, 0), IceInternal::Property("IcePatch2Client.Directory", false, 0), @@ -1032,7 +1032,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::IcePatch2ClientProps(IcePatch2ClientPropsData, sizeof(IcePatch2ClientPropsData)/sizeof(IcePatch2ClientPropsData[0])); -const IceInternal::Property IceSSLPropsData[] = +const IceInternal::Property IceSSLPropsData[] = { IceInternal::Property("IceSSL.Alias", false, 0), IceInternal::Property("IceSSL.CAs", false, 0), @@ -1083,7 +1083,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::IceSSLProps(IceSSLPropsData, sizeof(IceSSLPropsData)/sizeof(IceSSLPropsData[0])); -const IceInternal::Property IceStormAdminPropsData[] = +const IceInternal::Property IceStormAdminPropsData[] = { IceInternal::Property("IceStormAdmin.TopicManager.*", false, 0), IceInternal::Property("IceStormAdmin.Host", false, 0), @@ -1094,7 +1094,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::IceStormAdminProps(IceStormAdminPropsData, sizeof(IceStormAdminPropsData)/sizeof(IceStormAdminPropsData[0])); -const IceInternal::Property IceBTPropsData[] = +const IceInternal::Property IceBTPropsData[] = { IceInternal::Property("IceBT.RcvSize", false, 0), IceInternal::Property("IceBT.SndSize", false, 0), @@ -1104,7 +1104,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::IceBTProps(IceBTPropsData, sizeof(IceBTPropsData)/sizeof(IceBTPropsData[0])); -const IceInternal::Property Glacier2PropsData[] = +const IceInternal::Property Glacier2PropsData[] = { IceInternal::Property("Glacier2.AddConnectionContext", false, 0), IceInternal::Property("Glacier2.Client.ACM.Timeout", false, 0), @@ -1254,7 +1254,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::Glacier2Props(Glacier2PropsData, sizeof(Glacier2PropsData)/sizeof(Glacier2PropsData[0])); -const IceInternal::Property Glacier2CryptPermissionsVerifierPropsData[] = +const IceInternal::Property Glacier2CryptPermissionsVerifierPropsData[] = { IceInternal::Property("Glacier2CryptPermissionsVerifier.*.PermissionsVerifier", false, 0), IceInternal::Property("Glacier2CryptPermissionsVerifier.*.AdminPermissionsVerifier", false, 0), @@ -1264,7 +1264,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::Glacier2CryptPermissionsVerifierProps(Glacier2CryptPermissionsVerifierPropsData, sizeof(Glacier2CryptPermissionsVerifierPropsData)/sizeof(Glacier2CryptPermissionsVerifierPropsData[0])); -const IceInternal::Property FreezePropsData[] = +const IceInternal::Property FreezePropsData[] = { IceInternal::Property("Freeze.DbEnv.*.CheckpointPeriod", false, 0), IceInternal::Property("Freeze.DbEnv.*.DbHome", false, 0), diff --git a/cpp/src/Ice/ProxyFactory.h b/cpp/src/Ice/ProxyFactory.h index b356961f045..fc3f3ab7831 100644 --- a/cpp/src/Ice/ProxyFactory.h +++ b/cpp/src/Ice/ProxyFactory.h @@ -34,7 +34,7 @@ namespace IceInternal class ProxyFactory : public IceUtil::Shared { public: - + Ice::ObjectPrxPtr stringToProxy(const std::string&) const; std::string proxyToString(const Ice::ObjectPrxPtr&) const; diff --git a/cpp/src/Ice/ReferenceFactory.h b/cpp/src/Ice/ReferenceFactory.h index 93edc75b61b..fa9f868bc05 100644 --- a/cpp/src/Ice/ReferenceFactory.h +++ b/cpp/src/Ice/ReferenceFactory.h @@ -31,14 +31,14 @@ public: // // Create a direct reference. // - ReferencePtr create(const ::Ice::Identity&, const ::std::string&, const ReferencePtr&, + ReferencePtr create(const ::Ice::Identity&, const ::std::string&, const ReferencePtr&, const ::std::vector<EndpointIPtr>&); - + // // Create an indirect reference. // ReferencePtr create(const ::Ice::Identity&, const ::std::string&, const ReferencePtr&, const std::string&); - + // // Create a fixed reference. // @@ -66,7 +66,7 @@ private: friend class Instance; void checkForUnknownProperties(const std::string&); - RoutableReferencePtr create(const ::Ice::Identity&, const ::std::string&, Reference::Mode, bool, + RoutableReferencePtr create(const ::Ice::Identity&, const ::std::string&, Reference::Mode, bool, const Ice::ProtocolVersion&, const Ice::EncodingVersion&, const std::vector<EndpointIPtr>&, const std::string&, const std::string&); diff --git a/cpp/src/Ice/SHA1.cpp b/cpp/src/Ice/SHA1.cpp index c4569508f58..6682499eb9a 100644 --- a/cpp/src/Ice/SHA1.cpp +++ b/cpp/src/Ice/SHA1.cpp @@ -31,21 +31,21 @@ namespace IceInternal class SHA1::Hasher { public: - + Hasher(); # ifdef _WIN32 ~Hasher(); #endif - + void update(const unsigned char*, std::size_t); void finalize(std::vector<unsigned char>&); - + private: // noncopyable Hasher(const Hasher&); Hasher operator=(const Hasher&); - + # if defined (_WIN32) HCRYPTPROV _ctx; HCRYPTHASH _hash; diff --git a/cpp/src/Ice/SharedContext.h b/cpp/src/Ice/SharedContext.h index d64c7c900d8..a5922bac419 100644 --- a/cpp/src/Ice/SharedContext.h +++ b/cpp/src/Ice/SharedContext.h @@ -30,7 +30,7 @@ public: SharedContext() { } - + SharedContext(const Ice::Context& val) : _val(val) { diff --git a/cpp/src/Ice/SliceChecksums.cpp b/cpp/src/Ice/SliceChecksums.cpp index 3bc4e461f3e..a9dc824882a 100644 --- a/cpp/src/Ice/SliceChecksums.cpp +++ b/cpp/src/Ice/SliceChecksums.cpp @@ -42,7 +42,7 @@ Init init; class SliceChecksumDictDestroyer { public: - + ~SliceChecksumDictDestroyer() { delete _sliceChecksums; diff --git a/cpp/src/Ice/StringUtil.h b/cpp/src/Ice/StringUtil.h index 4f70df255f2..a00b4871a11 100644 --- a/cpp/src/Ice/StringUtil.h +++ b/cpp/src/Ice/StringUtil.h @@ -19,7 +19,7 @@ namespace IceInternal // // Adapter for ToStringMode // -inline std::string +inline std::string escapeString(const std::string& s, const std::string& special, Ice::ToStringMode mode) { return IceUtilInternal::escapeString(s, special, static_cast<IceUtilInternal::ToStringMode>(mode)); diff --git a/cpp/src/Ice/Thread.cpp b/cpp/src/Ice/Thread.cpp index 93622da09f3..1c6cc22dd50 100644 --- a/cpp/src/Ice/Thread.cpp +++ b/cpp/src/Ice/Thread.cpp @@ -7,7 +7,7 @@ // // ********************************************************************** -#ifdef __sun +#ifdef __sun // // Solaris 10 bug: it's supposed to be defined in pthread.h // @@ -85,7 +85,7 @@ IceUtil::ThreadControl::detach() { throw BadThreadControlException(__FILE__, __LINE__); } - + try { _thread->detach(); @@ -177,7 +177,7 @@ WINAPI startHook(void* arg) } thread->_done(); - + return 0; } @@ -218,7 +218,7 @@ IceUtil::Thread::start(size_t, int) _started = true; _running = true; - + return ThreadControl(_thread); } @@ -304,7 +304,7 @@ IceUtil::ThreadControl::join() { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } - + detach(); } @@ -315,7 +315,7 @@ IceUtil::ThreadControl::detach() { throw BadThreadControlException(__FILE__, __LINE__); } - + if(CloseHandle(_handle) == 0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); @@ -412,7 +412,7 @@ WINAPI startHook(void* arg) } thread->_done(); - + return 0; } @@ -449,14 +449,14 @@ IceUtil::Thread::start(size_t stackSize, int priority) // __decRef(). // __incRef(); - + unsigned int id; - _handle = + _handle = reinterpret_cast<HANDLE>( - _beginthreadex(0, - static_cast<unsigned int>(stackSize), - startHook, this, - CREATE_SUSPENDED, + _beginthreadex(0, + static_cast<unsigned int>(stackSize), + startHook, this, + CREATE_SUSPENDED, &id)); _id = id; assert(_handle != (HANDLE)-1L); @@ -477,7 +477,7 @@ IceUtil::Thread::start(size_t stackSize, int priority) _started = true; _running = true; - + return ThreadControl(_handle, _id); } @@ -625,7 +625,7 @@ IceUtil::Thread::~Thread() { } -extern "C" +extern "C" { static void* startHook(void* arg) @@ -658,7 +658,7 @@ startHook(void* arg) } thread->_done(); - + return 0; } } diff --git a/cpp/src/Ice/Timer.cpp b/cpp/src/Ice/Timer.cpp index 1b0fbeb5d04..fe15a6efdeb 100644 --- a/cpp/src/Ice/Timer.cpp +++ b/cpp/src/Ice/Timer.cpp @@ -103,7 +103,7 @@ Timer::scheduleRepeated(const TimerTaskPtr& task, const IceUtil::Time& delay) IceUtil::Time now = IceUtil::Time::now(IceUtil::Time::Monotonic); const Token token(now + delay, delay, task); - if(delay > IceUtil::Time() && token.scheduledTime < now) + if(delay > IceUtil::Time() && token.scheduledTime < now) { throw IllegalArgumentException(__FILE__, __LINE__, "invalid delay"); } @@ -113,8 +113,8 @@ Timer::scheduleRepeated(const TimerTaskPtr& task, const IceUtil::Time& delay) { throw IllegalArgumentException(__FILE__, __LINE__, "task is already schedulded"); } - _tokens.insert(token); - + _tokens.insert(token); + if(_wakeUpTime == IceUtil::Time() || token.scheduledTime < _wakeUpTime) { _monitor.notify(); @@ -175,12 +175,12 @@ Timer::run() _monitor.wait(); } } - + if(_destroyed) { break; } - + while(!_tokens.empty() && !_destroyed) { const IceUtil::Time now = IceUtil::Time::now(IceUtil::Time::Monotonic); @@ -195,22 +195,22 @@ Timer::run() } break; } - + _wakeUpTime = first.scheduledTime; - try + try { _monitor.timedWait(first.scheduledTime - now); - } + } catch(const IceUtil::InvalidTimeoutException&) { IceUtil::Time timeout = (first.scheduledTime - now) / 2; while(timeout > IceUtil::Time()) { - try + try { _monitor.timedWait(timeout); break; - } + } catch(const IceUtil::InvalidTimeoutException&) { timeout = timeout / 2; @@ -223,7 +223,7 @@ Timer::run() { break; } - } + } if(token.task) { @@ -238,11 +238,11 @@ Timer::run() consoleErr << "\n" << e.ice_stackTrace(); #endif consoleErr << endl; - } + } catch(const std::exception& e) { consoleErr << "IceUtil::Timer::run(): uncaught exception:\n" << e.what() << endl; - } + } catch(...) { consoleErr << "IceUtil::Timer::run(): uncaught exception" << endl; diff --git a/cpp/src/Ice/UdpTransceiver.cpp b/cpp/src/Ice/UdpTransceiver.cpp index ed21c0712b1..98bd764814d 100755 --- a/cpp/src/Ice/UdpTransceiver.cpp +++ b/cpp/src/Ice/UdpTransceiver.cpp @@ -384,7 +384,7 @@ IceInternal::UdpTransceiver::startWrite(Buffer& buf) [this] (IAsyncAction^ info, Windows::Foundation::AsyncStatus status) { // - // COMPILERFIX with VC141 using operator!= and operator== inside + // COMPILERFIX with VC141 using operator!= and operator== inside // a lambda callback triggers a compiler bug, we move the code to // a seperate private method to workaround the issue. // @@ -406,7 +406,7 @@ IceInternal::UdpTransceiver::startWrite(Buffer& buf) [=](IAsyncOperation<IOutputStream^>^ info, Windows::Foundation::AsyncStatus status) { // - // COMPILERFIX with VC141 using operator!= and operator== inside + // COMPILERFIX with VC141 using operator!= and operator== inside // a lambda callback triggers a compiler bug, we move the code to // a seperate private method to workaround the issue. // @@ -439,7 +439,7 @@ IceInternal::UdpTransceiver::startWrite(Buffer& buf) [=, &buf](concurrency::task<IOutputStream^> task) { // - // COMPILERFIX with VC141 using operator!= and operator== inside + // COMPILERFIX with VC141 using operator!= and operator== inside // a lambda callback triggers a compiler bug, we move the code to // a seperate private method to workaround the issue. // diff --git a/cpp/src/Ice/VirtualShared.h b/cpp/src/Ice/VirtualShared.h index de16e0d5091..57154179a85 100644 --- a/cpp/src/Ice/VirtualShared.h +++ b/cpp/src/Ice/VirtualShared.h @@ -18,11 +18,11 @@ namespace IceInternal class VirtualEnableSharedFromThisBase : public std::enable_shared_from_this<VirtualEnableSharedFromThisBase> { public: - + virtual ~VirtualEnableSharedFromThisBase() = default; }; -template<typename T> +template<typename T> class EnableSharedFromThis : public virtual VirtualEnableSharedFromThisBase { public: diff --git a/cpp/src/IceBT/Engine.cpp b/cpp/src/IceBT/Engine.cpp index 37ce16143f7..ea86f381a47 100644 --- a/cpp/src/IceBT/Engine.cpp +++ b/cpp/src/IceBT/Engine.cpp @@ -351,7 +351,7 @@ public: if(intf == "org.freedesktop.DBus.ObjectManager" && member == "InterfacesAdded") { // - // The InterfacesAdded signal contains two values: + // The InterfacesAdded signal contains two values: // // OBJPATH obj_path // DICT<STRING,DICT<STRING,VARIANT>> interfaces_and_properties @@ -388,7 +388,7 @@ public: else if(intf == "org.freedesktop.DBus.ObjectManager" && member == "InterfacesRemoved") { // - // The InterfacesRemoved signal contains two values: + // The InterfacesRemoved signal contains two values: // // OBJPATH obj_path // ARRAY<STRING> interfaces @@ -424,7 +424,7 @@ public: else if(intf == "org.freedesktop.DBus.Properties" && member == "PropertiesChanged") { // - // The PropertiesChanged signal contains three values: + // The PropertiesChanged signal contains three values: // // STRING interface_name // DICT<STRING,VARIANT> changed_properties diff --git a/cpp/src/IceBox/ServiceManagerI.h b/cpp/src/IceBox/ServiceManagerI.h index dd56621ac3f..87ddd472267 100644 --- a/cpp/src/IceBox/ServiceManagerI.h +++ b/cpp/src/IceBox/ServiceManagerI.h @@ -19,7 +19,7 @@ namespace IceBox { -class ServiceManagerI : public ServiceManager, +class ServiceManagerI : public ServiceManager, public IceUtil::Monitor<IceUtil::Mutex> #ifdef ICE_CPP11_MAPPING , public std::enable_shared_from_this<ServiceManagerI> @@ -86,7 +86,7 @@ private: Ice::PropertiesPtr createServiceProperties(const std::string&); void destroyServiceCommunicator(const std::string&, const Ice::CommunicatorPtr&); - + bool configureAdmin(const Ice::PropertiesPtr&, const std::string&); void removeAdminFacets(const std::string&); diff --git a/cpp/src/IceGrid/Activator.h b/cpp/src/IceGrid/Activator.h index 018eb44d794..d16c1bb0b85 100644 --- a/cpp/src/IceGrid/Activator.h +++ b/cpp/src/IceGrid/Activator.h @@ -52,22 +52,22 @@ public: virtual int activate(const std::string&, const std::string&, const std::string&, #ifndef _WIN32 - uid_t, gid_t, + uid_t, gid_t, #endif const Ice::StringSeq&, const Ice::StringSeq&, const ServerIPtr&); virtual void deactivate(const std::string&, const Ice::ProcessPrx&); virtual void kill(const std::string&); virtual void sendSignal(const std::string&, const std::string&); - + virtual Ice::Int getServerPid(const std::string&); - + virtual void start(); virtual void waitForShutdown(); virtual void shutdown(); virtual void destroy(); - + bool isActive(); - + void sendSignal(const std::string&, int); void runTerminationListener(); @@ -80,7 +80,7 @@ private: void terminationListener(); void clearInterrupt(); void setInterrupt(); - + #ifndef _WIN32 int waitPid(pid_t); #endif diff --git a/cpp/src/IceGrid/AdapterCache.cpp b/cpp/src/IceGrid/AdapterCache.cpp index e543c59e3e5..7333738aab4 100644 --- a/cpp/src/IceGrid/AdapterCache.cpp +++ b/cpp/src/IceGrid/AdapterCache.cpp @@ -41,7 +41,7 @@ struct ReplicaPriorityComp : binary_function<ServerAdapterEntryPtr&, ServerAdapt } }; -struct TransformToReplicaLoad : +struct TransformToReplicaLoad : public unary_function<const ServerAdapterEntryPtr&, pair<float, ServerAdapterEntryPtr> > { public: @@ -70,16 +70,16 @@ class ReplicaGroupSyncCallback : public SynchronizationCallback, public IceUtil: { public: - ReplicaGroupSyncCallback(const SynchronizationCallbackPtr& callback, int count, int nReplicas) : - _callback(callback), - _responseCalled(false), + ReplicaGroupSyncCallback(const SynchronizationCallbackPtr& callback, int count, int nReplicas) : + _callback(callback), + _responseCalled(false), _synchronizeCount(count), - _synchronizedCount(0), + _synchronizedCount(0), _nReplicas(nReplicas > count ? count : nReplicas) { } - bool + bool response() { Lock sync(*this); @@ -101,7 +101,7 @@ public: return true; } - void + void synchronized() { SynchronizationCallbackPtr callback; @@ -140,7 +140,7 @@ public: { _exception.reset(ex.ice_clone()); } - + --_synchronizeCount; if(!_responseCalled) { @@ -263,7 +263,7 @@ AdapterCache::removeServerAdapter(const string& id) return; } removeImpl(id); - + string replicaGroupId = entry->getReplicaGroupId(); if(!replicaGroupId.empty()) { @@ -306,8 +306,8 @@ AdapterCache::addImpl(const string& id, const AdapterEntryPtr& entry) if(_traceLevels && _traceLevels->adapter > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->adapterCat); - out << "added adapter `" << id << "'"; - } + out << "added adapter `" << id << "'"; + } return Cache<string, AdapterEntry>::addImpl(id, entry); } @@ -317,8 +317,8 @@ AdapterCache::removeImpl(const string& id) if(_traceLevels && _traceLevels->adapter > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->adapterCat); - out << "removed adapter `" << id << "'"; - } + out << "removed adapter `" << id << "'"; + } Cache<string, AdapterEntry>::removeImpl(id); } @@ -350,9 +350,9 @@ AdapterEntry::getApplication() const ServerAdapterEntry::ServerAdapterEntry(AdapterCache& cache, const string& id, const string& application, - const string& replicaGroupId, + const string& replicaGroupId, int priority, - const ServerEntryPtr& server) : + const ServerEntryPtr& server) : AdapterEntry(cache, id, application), _replicaGroupId(replicaGroupId), _priority(priority), @@ -374,7 +374,7 @@ ServerAdapterEntry::addSyncCallback(const SynchronizationCallbackPtr& callback, } void -ServerAdapterEntry::getLocatorAdapterInfo(LocatorAdapterInfoSeq& adapters, int& nReplicas, bool& replicaGroup, +ServerAdapterEntry::getLocatorAdapterInfo(LocatorAdapterInfoSeq& adapters, int& nReplicas, bool& replicaGroup, bool& roundRobin, string& filter, const set<string>&) { nReplicas = 1; @@ -484,8 +484,8 @@ ServerAdapterEntry::getNodeName() const ReplicaGroupEntry::ReplicaGroupEntry(AdapterCache& cache, const string& id, const string& application, - const LoadBalancingPolicyPtr& policy, - const string& filter) : + const LoadBalancingPolicyPtr& policy, + const string& filter) : AdapterEntry(cache, id, application), _lastReplica(0), _requestInProgress(false) @@ -524,8 +524,8 @@ ReplicaGroupEntry::addSyncCallback(const SynchronizationCallbackPtr& callback, c } } - ReplicaGroupSyncCallbackPtr cb = new ReplicaGroupSyncCallback(callback, - static_cast<int>(replicas.size()), + ReplicaGroupSyncCallbackPtr cb = new ReplicaGroupSyncCallback(callback, + static_cast<int>(replicas.size()), nReplicas); set<string> emptyExcludes; for(vector<ServerAdapterEntryPtr>::const_iterator p = replicas.begin(); p != replicas.end(); ++p) @@ -560,7 +560,7 @@ ReplicaGroupEntry::removeReplica(const string& replicaId) { if(replicaId == (*p)->getId()) { - _replicas.erase(p); + _replicas.erase(p); // Make sure _lastReplica is still within the bounds. _lastReplica = _replicas.empty() ? 0 : _lastReplica % static_cast<int>(_replicas.size()); break; @@ -793,7 +793,7 @@ ReplicaGroupEntry::getAdapterInfo() const return infos; } -bool +bool ReplicaGroupEntry::hasAdaptersFromOtherApplications() const { vector<ServerAdapterEntryPtr> replicas; diff --git a/cpp/src/IceGrid/AdapterCache.h b/cpp/src/IceGrid/AdapterCache.h index b81ed473d0c..65b4cded2fe 100644 --- a/cpp/src/IceGrid/AdapterCache.h +++ b/cpp/src/IceGrid/AdapterCache.h @@ -45,12 +45,12 @@ typedef std::vector<LocatorAdapterInfo> LocatorAdapterInfoSeq; class AdapterEntry : public virtual IceUtil::Shared { public: - + AdapterEntry(AdapterCache&, const std::string&, const std::string&); virtual bool addSyncCallback(const SynchronizationCallbackPtr&, const std::set<std::string>&) = 0; - virtual void getLocatorAdapterInfo(LocatorAdapterInfoSeq&, int&, bool&, bool&, std::string&, + virtual void getLocatorAdapterInfo(LocatorAdapterInfoSeq&, int&, bool&, bool&, std::string&, const std::set<std::string>&) = 0; virtual float getLeastLoadedNodeLoad(LoadSample) const = 0; virtual AdapterInfoSeq getAdapterInfo() const = 0; @@ -60,7 +60,7 @@ public: std::string getId() const; std::string getApplication() const; - + protected: AdapterCache& _cache; @@ -73,7 +73,7 @@ class ServerAdapterEntry : public AdapterEntry { public: - ServerAdapterEntry(AdapterCache&, const std::string&, const std::string&, const std::string&, int, + ServerAdapterEntry(AdapterCache&, const std::string&, const std::string&, const std::string&, int, const ServerEntryPtr&); virtual bool addSyncCallback(const SynchronizationCallbackPtr&, const std::set<std::string>&); @@ -104,7 +104,7 @@ class ReplicaGroupEntry : public AdapterEntry, public IceUtil::Monitor<IceUtil:: { public: - ReplicaGroupEntry(AdapterCache&, const std::string&, const std::string&, const LoadBalancingPolicyPtr&, + ReplicaGroupEntry(AdapterCache&, const std::string&, const std::string&, const LoadBalancingPolicyPtr&, const std::string&); virtual bool addSyncCallback(const SynchronizationCallbackPtr&, const std::set<std::string>&); @@ -145,12 +145,12 @@ public: void addReplicaGroup(const ReplicaGroupDescriptor&, const std::string&); AdapterEntryPtr get(const std::string&) const; - + void removeServerAdapter(const std::string&); void removeReplicaGroup(const std::string&); protected: - + virtual AdapterEntryPtr addImpl(const std::string&, const AdapterEntryPtr&); virtual void removeImpl(const std::string&); diff --git a/cpp/src/IceGrid/AdminCallbackRouter.cpp b/cpp/src/IceGrid/AdminCallbackRouter.cpp index 33e5bae02e8..4af6d299dbc 100644 --- a/cpp/src/IceGrid/AdminCallbackRouter.cpp +++ b/cpp/src/IceGrid/AdminCallbackRouter.cpp @@ -13,7 +13,7 @@ using namespace Ice; using namespace std; void -IceGrid::AdminCallbackRouter::invokeResponse(bool ok, +IceGrid::AdminCallbackRouter::invokeResponse(bool ok, const std::pair<const Byte*, const Byte*>& outParams, const AMD_Object_ice_invokePtr& amdCB) { @@ -56,7 +56,7 @@ IceGrid::AdminCallbackRouter::removeMapping(const string& category) void -IceGrid::AdminCallbackRouter::ice_invoke_async(const AMD_Object_ice_invokePtr& cb, +IceGrid::AdminCallbackRouter::ice_invoke_async(const AMD_Object_ice_invokePtr& cb, const pair<const Byte*, const Byte*>& inParams, const Current& current) { @@ -72,16 +72,16 @@ IceGrid::AdminCallbackRouter::ice_invoke_async(const AMD_Object_ice_invokePtr& c con = p->second; } - + ObjectPrx target = con->createProxy(current.id)->ice_facet(current.facet); - - + + // // Call with AMI // - target->begin_ice_invoke(current.operation, current.mode, inParams, current.ctx, - newCallback_Object_ice_invoke(this, - &AdminCallbackRouter::invokeResponse, + target->begin_ice_invoke(current.operation, current.mode, inParams, current.ctx, + newCallback_Object_ice_invoke(this, + &AdminCallbackRouter::invokeResponse, &AdminCallbackRouter::invokeException), cb); } diff --git a/cpp/src/IceGrid/AdminCallbackRouter.h b/cpp/src/IceGrid/AdminCallbackRouter.h index c8619352974..d903c81779f 100644 --- a/cpp/src/IceGrid/AdminCallbackRouter.h +++ b/cpp/src/IceGrid/AdminCallbackRouter.h @@ -28,19 +28,19 @@ public: void addMapping(const std::string&, const Ice::ConnectionPtr&); void removeMapping(const std::string&); - - virtual void invokeResponse(bool, - const std::pair<const ::Ice::Byte*, const ::Ice::Byte*>&, + + virtual void invokeResponse(bool, + const std::pair<const ::Ice::Byte*, const ::Ice::Byte*>&, const Ice::AMD_Object_ice_invokePtr&); - + virtual void invokeException(const Ice::Exception&, const Ice::AMD_Object_ice_invokePtr&); virtual void ice_invoke_async(const Ice::AMD_Object_ice_invokePtr&, const std::pair<const Ice::Byte*, const Ice::Byte*>&, const Ice::Current&); - + private: - + IceUtil::Mutex _mutex; std::map<std::string, Ice::ConnectionPtr> _categoryToConnection; }; diff --git a/cpp/src/IceGrid/AdminI.h b/cpp/src/IceGrid/AdminI.h index 45fe6cf6d17..b7cc537ad85 100644 --- a/cpp/src/IceGrid/AdminI.h +++ b/cpp/src/IceGrid/AdminI.h @@ -40,9 +40,9 @@ public: virtual void syncApplicationWithoutRestart(const ApplicationDescriptor&, const Ice::Current&); virtual void updateApplicationWithoutRestart(const ApplicationUpdateDescriptor&, const Ice::Current&); virtual void removeApplication(const std::string&, const Ice::Current&); - virtual void instantiateServer(const std::string&, const std::string&, const ServerInstanceDescriptor&, + virtual void instantiateServer(const std::string&, const std::string&, const ServerInstanceDescriptor&, const Ice::Current&); - virtual void patchApplication_async(const AMD_Admin_patchApplicationPtr&, const std::string&, bool, + virtual void patchApplication_async(const AMD_Admin_patchApplicationPtr&, const std::string&, bool, const Ice::Current&); virtual ApplicationInfo getApplicationInfo(const ::std::string&, const Ice::Current&) const; virtual ApplicationDescriptor getDefaultApplicationDescriptor(const Ice::Current&) const; @@ -95,7 +95,7 @@ public: private: void checkIsReadOnly() const; - + const DatabasePtr _database; const RegistryIPtr _registry; const TraceLevelsPtr _traceLevels; diff --git a/cpp/src/IceGrid/AdminSessionI.h b/cpp/src/IceGrid/AdminSessionI.h index 5d7866b1f90..08d90644351 100644 --- a/cpp/src/IceGrid/AdminSessionI.h +++ b/cpp/src/IceGrid/AdminSessionI.h @@ -86,7 +86,7 @@ class AdminSessionFactory : public virtual IceUtil::Shared public: AdminSessionFactory(const SessionServantManagerPtr&, const DatabasePtr&, const ReapThreadPtr&, const RegistryIPtr&); - + Glacier2::SessionPrx createGlacier2Session(const std::string&, const Glacier2::SessionControlPrx&); AdminSessionIPtr createSessionServant(const std::string&); @@ -108,11 +108,11 @@ class AdminSessionManagerI : public virtual Glacier2::SessionManager public: AdminSessionManagerI(const AdminSessionFactoryPtr&); - + virtual Glacier2::SessionPrx create(const std::string&, const Glacier2::SessionControlPrx&, const Ice::Current&); private: - + const AdminSessionFactoryPtr _factory; }; @@ -121,11 +121,11 @@ class AdminSSLSessionManagerI : public virtual Glacier2::SSLSessionManager public: AdminSSLSessionManagerI(const AdminSessionFactoryPtr&); - virtual Glacier2::SessionPrx create(const Glacier2::SSLInfo&, const Glacier2::SessionControlPrx&, + virtual Glacier2::SessionPrx create(const Glacier2::SSLInfo&, const Glacier2::SessionControlPrx&, const Ice::Current&); private: - + const AdminSessionFactoryPtr _factory; }; diff --git a/cpp/src/IceGrid/Cache.h b/cpp/src/IceGrid/Cache.h index 661242c5c54..27a4054f452 100644 --- a/cpp/src/IceGrid/Cache.h +++ b/cpp/src/IceGrid/Cache.h @@ -40,12 +40,12 @@ public: { } - virtual + virtual ~Cache() { } - bool + bool has(const Key& key) const { Lock sync(*this); @@ -59,9 +59,9 @@ public: removeImpl(key); } - void + void setTraceLevels(const TraceLevelsPtr& traceLevels) - { + { _traceLevels = traceLevels; } @@ -69,7 +69,7 @@ public: protected: - virtual ValuePtr + virtual ValuePtr getImpl(const Key& key) const { typename ValueMap::iterator p = const_cast<ValueMap&>(_entries).end(); @@ -80,12 +80,12 @@ protected: p = _entriesHint; } } - + if(p == const_cast<ValueMap&>(_entries).end()) { p = const_cast<ValueMap&>(_entries).find(key); } - + if(p != const_cast<ValueMap&>(_entries).end()) { const_cast<typename ValueMap::iterator&>(_entriesHint) = p; @@ -116,12 +116,12 @@ protected: p = _entriesHint; } } - + if(p == _entries.end()) { p = _entries.find(key); } - + assert(p != _entries.end()); if(p->second->canRemove()) { @@ -136,7 +136,7 @@ protected: TraceLevelsPtr _traceLevels; ValueMap _entries; - typename ValueMap::iterator _entriesHint; + typename ValueMap::iterator _entriesHint; }; template<typename T> diff --git a/cpp/src/IceGrid/DescriptorBuilder.cpp b/cpp/src/IceGrid/DescriptorBuilder.cpp index e1d72475394..62cf0eb7f8f 100644 --- a/cpp/src/IceGrid/DescriptorBuilder.cpp +++ b/cpp/src/IceGrid/DescriptorBuilder.cpp @@ -17,7 +17,7 @@ using namespace std; using namespace IceGrid; -XmlAttributesHelper::XmlAttributesHelper(const IceXML::Attributes& attrs, +XmlAttributesHelper::XmlAttributesHelper(const IceXML::Attributes& attrs, const Ice::LoggerPtr& logger, const string& filename, int line) : @@ -55,7 +55,7 @@ XmlAttributesHelper::contains(const string& name) const return _attributes.find(name) != _attributes.end(); } -string +string XmlAttributesHelper::operator()(const string& name) const { _used.insert(name); @@ -110,7 +110,7 @@ XmlAttributesHelper::asBool(const string& name) const else if(p->second == "true") { return true; - } + } else if(p->second == "false") { return false; @@ -134,7 +134,7 @@ XmlAttributesHelper::asBool(const string& name, bool def) const else if(p->second == "true") { return true; - } + } else if(p->second == "false") { return false; @@ -152,7 +152,7 @@ DescriptorBuilder::addVariable(const XmlAttributesHelper&) throw "the <variable> element can't be a child of this element"; } -PropertySetDescriptorBuilder::PropertySetDescriptorBuilder() : +PropertySetDescriptorBuilder::PropertySetDescriptorBuilder() : _inPropertySetRef(false) { } @@ -224,7 +224,7 @@ PropertySetDescriptorBuilder::finish() } ApplicationDescriptorBuilder::ApplicationDescriptorBuilder(const Ice::CommunicatorPtr& communicator, - const XmlAttributesHelper& attrs, + const XmlAttributesHelper& attrs, const map<string, string>& overrides) : _communicator(communicator), _overrides(overrides) @@ -235,7 +235,7 @@ ApplicationDescriptorBuilder::ApplicationDescriptorBuilder(const Ice::Communicat ApplicationDescriptorBuilder::ApplicationDescriptorBuilder(const Ice::CommunicatorPtr& communicator, const ApplicationDescriptor& app, - const XmlAttributesHelper& attrs, + const XmlAttributesHelper& attrs, const map<string, string>& overrides) : _communicator(communicator), _descriptor(app), @@ -323,7 +323,7 @@ ApplicationDescriptorBuilder::addObject(const XmlAttributesHelper& attrs) object.proxyOptions = attrs("proxy-options", ""); if(attrs.contains("property")) { - throw "property attribute is not allowed in object descriptors from a replica group"; + throw "property attribute is not allowed in object descriptors from a replica group"; } _descriptor.replicaGroups.back().objects.push_back(object); } @@ -410,7 +410,7 @@ ApplicationDescriptorBuilder::addPropertySet(const string& id, const PropertySet } } -void +void ApplicationDescriptorBuilder::addDistribution(const XmlAttributesHelper& attrs) { _descriptor.distrib.icepatch = attrs("icepatch", "${application}.IcePatch2/server"); @@ -460,7 +460,7 @@ ServerInstanceDescriptorBuilder::addPropertySet(const string& service, const Pro p.properties.insert(p.properties.end(), desc.properties.begin(), desc.properties.end()); } -NodeDescriptorBuilder::NodeDescriptorBuilder(ApplicationDescriptorBuilder& app, +NodeDescriptorBuilder::NodeDescriptorBuilder(ApplicationDescriptorBuilder& app, const NodeDescriptor& desc, const XmlAttributesHelper& attrs) : _application(app), @@ -538,8 +538,8 @@ NodeDescriptorBuilder::setDescription(const string& description) _descriptor.description = description; } -TemplateDescriptorBuilder::TemplateDescriptorBuilder(ApplicationDescriptorBuilder& application, - const XmlAttributesHelper& attrs, +TemplateDescriptorBuilder::TemplateDescriptorBuilder(ApplicationDescriptorBuilder& application, + const XmlAttributesHelper& attrs, bool serviceTemplate) : _application(application), _serviceTemplate(serviceTemplate), @@ -553,7 +553,7 @@ TemplateDescriptorBuilder::addParameter(const XmlAttributesHelper& attrs) if(find(_descriptor.parameters.begin(), _descriptor.parameters.end(), attrs("name")) != _descriptor.parameters.end()) { - throw "duplicate parameter `" + attrs("name") + "'"; + throw "duplicate parameter `" + attrs("name") + "'"; } _descriptor.parameters.push_back(attrs("name")); @@ -735,7 +735,7 @@ CommunicatorDescriptorBuilder::addDbEnv(const XmlAttributesHelper& attrs) // We are re-opening the dbenv element to define more properties. // if(p->name == desc.name) - { + { break; } } @@ -743,18 +743,18 @@ CommunicatorDescriptorBuilder::addDbEnv(const XmlAttributesHelper& attrs) if(p != _descriptor->dbEnvs.end()) { // - // Remove the previously defined dbenv, we'll add it back again when + // Remove the previously defined dbenv, we'll add it back again when // the dbenv element end tag is reached. // desc = *p; _descriptor->dbEnvs.erase(p); - } + } if(desc.dbHome.empty()) { desc.dbHome = attrs("home", ""); } - + _descriptor->dbEnvs.push_back(desc); } diff --git a/cpp/src/IceGrid/DescriptorBuilder.h b/cpp/src/IceGrid/DescriptorBuilder.h index 157eb9bcf72..af42b3ac705 100644 --- a/cpp/src/IceGrid/DescriptorBuilder.h +++ b/cpp/src/IceGrid/DescriptorBuilder.h @@ -42,7 +42,7 @@ public: std::string operator()(const std::string&, const std::string&) const; private: - + const IceXML::Attributes& _attributes; const Ice::LoggerPtr _logger; const std::string _filename; @@ -65,16 +65,16 @@ public: class PropertySetDescriptorBuilder : DescriptorBuilder { public: - + PropertySetDescriptorBuilder(); - + void setId(const std::string&); void setService(const std::string&); const std::string& getId() const; const std::string& getService() const; const PropertySetDescriptor& getDescriptor() const; - + void addProperty(const XmlAttributesHelper&); void addPropertySet(const XmlAttributesHelper&); bool finish(); @@ -119,7 +119,7 @@ public: void addServerTemplate(const std::string&, const TemplateDescriptor&); void addServiceTemplate(const std::string&, const TemplateDescriptor&); void addPropertySet(const std::string&, const PropertySetDescriptor&); - + void addDistribution(const XmlAttributesHelper&); void addDistributionDirectory(const std::string&); @@ -146,7 +146,7 @@ public: virtual PropertySetDescriptorBuilder* createPropertySet(const XmlAttributesHelper& attrs) const; virtual void addPropertySet(const std::string&, const PropertySetDescriptor&); - + private: ServerInstanceDescriptor _descriptor; @@ -174,7 +174,7 @@ public: const NodeDescriptor& getDescriptor() const { return _descriptor; } private: - + ApplicationDescriptorBuilder& _application; std::string _name; NodeDescriptor _descriptor; @@ -189,8 +189,8 @@ public: TemplateDescriptorBuilder(ApplicationDescriptorBuilder&, const XmlAttributesHelper&, bool); virtual ServerDescriptorBuilder* createServer(const XmlAttributesHelper&); - virtual ServerDescriptorBuilder* createIceBox(const XmlAttributesHelper&); - virtual ServiceDescriptorBuilder* createService(const XmlAttributesHelper&); + virtual ServerDescriptorBuilder* createIceBox(const XmlAttributesHelper&); + virtual ServiceDescriptorBuilder* createService(const XmlAttributesHelper&); void addParameter(const XmlAttributesHelper&); void setDescriptor(const CommunicatorDescriptorPtr&); @@ -247,7 +247,7 @@ public: ServiceInstanceDescriptorBuilder(const XmlAttributesHelper&); const ServiceInstanceDescriptor& getDescriptor() const { return _descriptor; } - + virtual PropertySetDescriptorBuilder* createPropertySet() const; virtual void addPropertySet(const PropertySetDescriptor&); @@ -259,7 +259,7 @@ private: class ServerDescriptorBuilder : public CommunicatorDescriptorBuilder { public: - + ServerDescriptorBuilder(const Ice::CommunicatorPtr&, const XmlAttributesHelper&); ServerDescriptorBuilder(const Ice::CommunicatorPtr&); @@ -275,7 +275,7 @@ public: virtual void addDistribution(const XmlAttributesHelper&); virtual void addDistributionDirectory(const std::string&); - const ServerDescriptorPtr& getDescriptor() const { return _descriptor; } + const ServerDescriptorPtr& getDescriptor() const { return _descriptor; } private: @@ -299,7 +299,7 @@ public: virtual void addService(const ServiceDescriptorPtr&); private: - + IceBoxDescriptorPtr _descriptor; }; @@ -311,7 +311,7 @@ public: void init(const ServiceDescriptorPtr&, const XmlAttributesHelper&); const ServiceDescriptorPtr& getDescriptor() const { return _descriptor; } - + private: ServiceDescriptorPtr _descriptor; diff --git a/cpp/src/IceGrid/DescriptorParser.cpp b/cpp/src/IceGrid/DescriptorParser.cpp index 41f3de5254e..1a877a16b67 100644 --- a/cpp/src/IceGrid/DescriptorParser.cpp +++ b/cpp/src/IceGrid/DescriptorParser.cpp @@ -28,7 +28,7 @@ namespace IceGrid class DescriptorHandler : public IceXML::Handler { public: - + DescriptorHandler(const string&, const Ice::CommunicatorPtr&); void setAdmin(const IceGrid::AdminPrx&); @@ -38,11 +38,11 @@ public: virtual void endElement(const string&, int, int); virtual void characters(const string&, int, int); virtual void error(const string&, int, int); - + const ApplicationDescriptor& getApplicationDescriptor() const; private: - + bool isCurrentTargetDeployable() const; string elementValue(); vector<string> getTargets(const string&) const; @@ -52,7 +52,7 @@ private: const Ice::CommunicatorPtr _communicator; IceGrid::AdminPrx _admin; string _filename; - map<string, string> _overrides; + map<string, string> _overrides; vector<string> _targets; string _data; string _previousElementName; @@ -80,7 +80,7 @@ private: } -DescriptorHandler::DescriptorHandler(const string& filename, const Ice::CommunicatorPtr& communicator) : +DescriptorHandler::DescriptorHandler(const string& filename, const Ice::CommunicatorPtr& communicator) : _communicator(communicator), _filename(filename), _isCurrentTargetDeployable(true), @@ -105,7 +105,7 @@ DescriptorHandler::setVariables(const map<string, string>& variables, const vect _targets = targets; } -void +void DescriptorHandler::startElement(const string& name, const IceXML::Attributes& attrs, int line, int column) { _line = line; @@ -142,7 +142,7 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at else if(!isCurrentTargetDeployable()) { // - // We don't bother to parse the elements if the elements are enclosed in a target element + // We don't bother to parse the elements if the elements are enclosed in a target element // which won't be deployed. // attributes.asMap(); @@ -160,15 +160,15 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at file = _filename.substr(0, end) + "/" + file; } } - + string oldFileName = _filename; vector<string> oldTargets = _targets; _isTopLevel = true; _filename = file; _targets = getTargets(targets); - + IceXML::Parser::parse(file, *this); - + _filename = oldFileName; _targets = oldTargets; } @@ -178,18 +178,18 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at { error("only one <application> element is allowed"); } - + bool importTemplates = attributes.asBool("import-default-templates", false); // - // TODO: is ignoring importTemplates the desired behavior when _admin == 0? + // TODO: is ignoring importTemplates the desired behavior when _admin == 0? // if(importTemplates && _admin != 0) { try { ApplicationDescriptor application = _admin->getDefaultApplicationDescriptor(); - _currentApplication.reset(new ApplicationDescriptorBuilder(_communicator, application, + _currentApplication.reset(new ApplicationDescriptorBuilder(_communicator, application, attributes, _overrides)); } catch(const DeploymentException& ex) @@ -489,12 +489,12 @@ DescriptorHandler::startElement(const string& name, const IceXML::Attributes& at _previousElementName = name; } -void +void DescriptorHandler::endElement(const string& name, int line, int column) { _line = line; _column = column; - + try { if(name == "target") @@ -509,7 +509,7 @@ DescriptorHandler::endElement(const string& name, int line, int column) else if(!isCurrentTargetDeployable()) { // - // We don't bother to parse the elements if the elements are enclosed in a target element + // We don't bother to parse the elements if the elements are enclosed in a target element // which won't be deployed. // return; @@ -585,7 +585,7 @@ DescriptorHandler::endElement(const string& name, int line, int column) } else if(_currentServerInstance.get()) { - _currentServerInstance->addPropertySet(_currentPropertySet->getService(), + _currentServerInstance->addPropertySet(_currentPropertySet->getService(), _currentPropertySet->getDescriptor()); } else if(_currentCommunicator) @@ -594,7 +594,7 @@ DescriptorHandler::endElement(const string& name, int line, int column) } else if(_currentNode.get()) { - _currentNode->addPropertySet(_currentPropertySet->getId(), + _currentNode->addPropertySet(_currentPropertySet->getId(), _currentPropertySet->getDescriptor()); } else if(_currentApplication.get()) @@ -675,12 +675,12 @@ DescriptorHandler::endElement(const string& name, int line, int column) else if(name == "adapter") { _inAdapter = false; - } + } else if(name == "replica-group") { _currentApplication->finishReplicaGroup(); _inReplicaGroup = false; - } + } else if(name == "dbenv") { _inDbEnv = false; @@ -710,7 +710,7 @@ DescriptorHandler::endElement(const string& name, int line, int column) } } -void +void DescriptorHandler::characters(const string& chars, int, int) { if(isCurrentTargetDeployable()) @@ -719,7 +719,7 @@ DescriptorHandler::characters(const string& chars, int, int) } } -void +void DescriptorHandler::error(const string& msg, int line, int column) { ostringstream os; @@ -838,7 +838,7 @@ DescriptorHandler::isTargetDeployable(const string& target) const while(end != string::npos) { // - // Add the first communicator name from the communicator fully qualified name to the + // Add the first communicator name from the communicator fully qualified name to the // target and see if matches. // end = fqn.find('.', end); @@ -864,8 +864,8 @@ DescriptorHandler::isTargetDeployable(const string& target) const } ApplicationDescriptor -DescriptorParser::parseDescriptor(const string& descriptor, - const Ice::StringSeq& targets, +DescriptorParser::parseDescriptor(const string& descriptor, + const Ice::StringSeq& targets, const map<string, string>& variables, const Ice::CommunicatorPtr& communicator, const IceGrid::AdminPrx& admin) diff --git a/cpp/src/IceGrid/DescriptorParser.h b/cpp/src/IceGrid/DescriptorParser.h index 648ec1363b5..4a2f8d37923 100644 --- a/cpp/src/IceGrid/DescriptorParser.h +++ b/cpp/src/IceGrid/DescriptorParser.h @@ -17,14 +17,14 @@ class DescriptorParser { public: - static ApplicationDescriptor parseDescriptor(const std::string&, - const Ice::StringSeq&, - const std::map<std::string, std::string>&, + static ApplicationDescriptor parseDescriptor(const std::string&, + const Ice::StringSeq&, + const std::map<std::string, std::string>&, const Ice::CommunicatorPtr&, const IceGrid::AdminPrx&); static ApplicationDescriptor parseDescriptor(const std::string&, const Ice::CommunicatorPtr&); - + }; } diff --git a/cpp/src/IceGrid/FileCache.cpp b/cpp/src/IceGrid/FileCache.cpp index 1dea55994f1..395a54d051c 100644 --- a/cpp/src/IceGrid/FileCache.cpp +++ b/cpp/src/IceGrid/FileCache.cpp @@ -21,7 +21,7 @@ using namespace std; using namespace IceGrid; -FileCache::FileCache(const Ice::CommunicatorPtr& com) : +FileCache::FileCache(const Ice::CommunicatorPtr& com) : _messageSizeMax(com->getProperties()->getPropertyAsIntWithDefault("Ice.MessageSizeMax", 1024) * 1024 - 256) { } @@ -70,7 +70,7 @@ FileCache::getOffsetFromEnd(const string& file, int originalCount) { is.seekg(0, ios::beg); // We've reach the begining of the file. } - + // // Read the block and count the number of lines in the block // If we found the "first last N lines", we start throwing out @@ -102,7 +102,7 @@ FileCache::getOffsetFromEnd(const string& file, int originalCount) else if(totalCount < originalCount) { // - // Otherwise, it we still didn't find the required number of lines, + // Otherwise, it we still didn't find the required number of lines, // read another block of text before this block. // lastBlockOffset -= blockSize; // Position of the block we just read. @@ -115,7 +115,7 @@ FileCache::getOffsetFromEnd(const string& file, int originalCount) { throw FileNotAvailableException("unrecoverable error occured while reading file `" + file + "'"); } - + if(lines.empty()) { return 0; @@ -162,7 +162,7 @@ FileCache::read(const string& file, Ice::Long offset, int size, Ice::Long& newOf // // Read lines from the file until we read enough or reached EOF. - // + // newOffset = offset; lines = Ice::StringSeq(); is.seekg(static_cast<streamoff>(offset), ios::beg); diff --git a/cpp/src/IceGrid/FileUserAccountMapperI.cpp b/cpp/src/IceGrid/FileUserAccountMapperI.cpp index cbd6b84a10e..bc27c667fda 100644 --- a/cpp/src/IceGrid/FileUserAccountMapperI.cpp +++ b/cpp/src/IceGrid/FileUserAccountMapperI.cpp @@ -22,7 +22,7 @@ FileUserAccountMapperI::FileUserAccountMapperI(const string& filename) { throw "cannot open `" + filename + "' for reading: " + strerror(errno); } - + const string delim = " \t\r\n"; while(true) { @@ -38,13 +38,13 @@ FileUserAccountMapperI::FileUserAccountMapperI(const string& filename) { line.erase(idx); } - + idx = line.find_last_not_of(delim); if(idx != string::npos && idx + 1 < line.length()) { line.erase(idx + 1); } - + string::size_type beg = line.find_first_not_of(delim); if(beg == string::npos) { @@ -55,16 +55,16 @@ FileUserAccountMapperI::FileUserAccountMapperI(const string& filename) if(end == string::npos || end <= beg) { continue; - } + } string account = line.substr(beg, end - beg); beg = line.find_first_not_of(delim, end); if(beg == string::npos) { continue; - } + } string user = line.substr(beg); - + assert(!user.empty()); assert(!account.empty()); diff --git a/cpp/src/IceGrid/FileUserAccountMapperI.h b/cpp/src/IceGrid/FileUserAccountMapperI.h index a342560c0c1..1abc1792029 100644 --- a/cpp/src/IceGrid/FileUserAccountMapperI.h +++ b/cpp/src/IceGrid/FileUserAccountMapperI.h @@ -22,7 +22,7 @@ public: FileUserAccountMapperI(const std::string&); virtual std::string getUserAccount(const std::string&, const Ice::Current&); - + private: std::map<std::string, std::string> _accounts; diff --git a/cpp/src/IceGrid/InternalRegistryI.cpp b/cpp/src/IceGrid/InternalRegistryI.cpp index 5ee57d359a5..d5a62e7c512 100644 --- a/cpp/src/IceGrid/InternalRegistryI.cpp +++ b/cpp/src/IceGrid/InternalRegistryI.cpp @@ -27,10 +27,10 @@ using namespace std; using namespace IceGrid; InternalRegistryI::InternalRegistryI(const RegistryIPtr& registry, - const DatabasePtr& database, + const DatabasePtr& database, const ReapThreadPtr& reaper, const WellKnownObjectsManagerPtr& wellKnownObjects, - ReplicaSessionManager& session) : + ReplicaSessionManager& session) : _registry(registry), _database(database), _reaper(reaper), @@ -50,9 +50,9 @@ InternalRegistryI::~InternalRegistryI() } NodeSessionPrx -InternalRegistryI::registerNode(const InternalNodeInfoPtr& info, - const NodePrx& node, - const LoadInfo& load, +InternalRegistryI::registerNode(const InternalNodeInfoPtr& info, + const NodePrx& node, + const LoadInfo& load, const Ice::Current& current) { const TraceLevelsPtr traceLevels = _database->getTraceLevels(); @@ -104,7 +104,7 @@ InternalRegistryI::registerNode(const InternalNodeInfoPtr& info, throw PermissionDeniedException("unable to verify certificate for node `" + info->name + "'"); } } - + try { NodeSessionIPtr session = new NodeSessionI(_database, node, info, _nodeSessionTimeout, load); @@ -171,7 +171,7 @@ InternalRegistryI::registerReplica(const InternalReplicaInfoPtr& info, throw PermissionDeniedException("unable to verify certificate for replica `" + info->name + "'"); } } - + try { ReplicaSessionIPtr s = new ReplicaSessionI(_database, _wellKnownObjects, info, prx, _replicaSessionTimeout); @@ -214,19 +214,19 @@ InternalRegistryI::getReplicas(const Ice::Current&) const return replicas; } -ApplicationInfoSeq +ApplicationInfoSeq InternalRegistryI::getApplications(Ice::Long& serial, const Ice::Current&) const { return _database->getApplications(serial); } -AdapterInfoSeq +AdapterInfoSeq InternalRegistryI::getAdapters(Ice::Long& serial, const Ice::Current&) const { return _database->getAdapters(serial); } -ObjectInfoSeq +ObjectInfoSeq InternalRegistryI::getObjects(Ice::Long& serial, const Ice::Current&) const { return _database->getObjects(serial); @@ -245,7 +245,7 @@ InternalRegistryI::getOffsetFromEnd(const string& filename, int count, const Ice } bool -InternalRegistryI::read(const string& filename, Ice::Long pos, int size, Ice::Long& newPos, Ice::StringSeq& lines, +InternalRegistryI::read(const string& filename, Ice::Long pos, int size, Ice::Long& newPos, Ice::StringSeq& lines, const Ice::Current&) const { return _fileCache->read(getFilePath(filename), pos, size, newPos, lines); diff --git a/cpp/src/IceGrid/InternalRegistryI.h b/cpp/src/IceGrid/InternalRegistryI.h index 139dbb3aba2..dddd38a63fc 100644 --- a/cpp/src/IceGrid/InternalRegistryI.h +++ b/cpp/src/IceGrid/InternalRegistryI.h @@ -26,7 +26,7 @@ class WellKnownObjectsManager; typedef IceUtil::Handle<WellKnownObjectsManager> WellKnownObjectsManagerPtr; class ReapThread; -typedef IceUtil::Handle<ReapThread> ReapThreadPtr; +typedef IceUtil::Handle<ReapThread> ReapThreadPtr; class RegistryI; typedef IceUtil::Handle<RegistryI> RegistryIPtr; @@ -37,13 +37,13 @@ class InternalRegistryI : public InternalRegistry { public: - InternalRegistryI(const RegistryIPtr&, const DatabasePtr&, const ReapThreadPtr&, + InternalRegistryI(const RegistryIPtr&, const DatabasePtr&, const ReapThreadPtr&, const WellKnownObjectsManagerPtr&, ReplicaSessionManager&); virtual ~InternalRegistryI(); - virtual NodeSessionPrx registerNode(const InternalNodeInfoPtr&, const NodePrx&, const LoadInfo&, + virtual NodeSessionPrx registerNode(const InternalNodeInfoPtr&, const NodePrx&, const LoadInfo&, const Ice::Current&); - virtual ReplicaSessionPrx registerReplica(const InternalReplicaInfoPtr&, const InternalRegistryPrx&, + virtual ReplicaSessionPrx registerReplica(const InternalReplicaInfoPtr&, const InternalRegistryPrx&, const Ice::Current&); virtual void registerWithReplica(const InternalRegistryPrx&, const Ice::Current&); @@ -60,7 +60,7 @@ public: virtual Ice::Long getOffsetFromEnd(const std::string&, int, const Ice::Current&) const; virtual bool read(const std::string&, Ice::Long, int, Ice::Long&, Ice::StringSeq&, const Ice::Current&) const; -private: +private: std::string getFilePath(const std::string&) const; @@ -75,7 +75,7 @@ private: bool _requireNodeCertCN; bool _requireReplicaCertCN; }; - + }; #endif diff --git a/cpp/src/IceGrid/LocatorI.h b/cpp/src/IceGrid/LocatorI.h index d4d0eb59d74..224ab3d1f27 100644 --- a/cpp/src/IceGrid/LocatorI.h +++ b/cpp/src/IceGrid/LocatorI.h @@ -23,7 +23,7 @@ typedef IceUtil::Handle<Database> DatabasePtr; class WellKnownObjectsManager; typedef IceUtil::Handle<WellKnownObjectsManager> WellKnownObjectsManagerPtr; - + class LocatorI; typedef IceUtil::Handle<LocatorI> LocatorIPtr; @@ -44,23 +44,23 @@ public: virtual void execute() = 0; virtual void activating(const std::string&) = 0; virtual void response(const std::string&, const Ice::ObjectPrx&) = 0; - virtual void exception(const std::string&, const Ice::Exception&) = 0; + virtual void exception(const std::string&, const Ice::Exception&) = 0; }; typedef IceUtil::Handle<Request> RequestPtr; LocatorI(const Ice::CommunicatorPtr&, const DatabasePtr&, const WellKnownObjectsManagerPtr&, const RegistryPrx&, const QueryPrx&); - virtual void findObjectById_async(const Ice::AMD_Locator_findObjectByIdPtr&, const Ice::Identity&, + virtual void findObjectById_async(const Ice::AMD_Locator_findObjectByIdPtr&, const Ice::Identity&, const Ice::Current&) const; - virtual void findAdapterById_async(const Ice::AMD_Locator_findAdapterByIdPtr&, const ::std::string&, + virtual void findAdapterById_async(const Ice::AMD_Locator_findAdapterByIdPtr&, const ::std::string&, const Ice::Current&) const; virtual Ice::LocatorRegistryPrx getRegistry(const Ice::Current&) const; virtual RegistryPrx getLocalRegistry(const Ice::Current&) const; virtual QueryPrx getLocalQuery(const Ice::Current&) const; - + const Ice::CommunicatorPtr& getCommunicator() const; const TraceLevelsPtr& getTraceLevels() const; diff --git a/cpp/src/IceGrid/LocatorRegistryI.cpp b/cpp/src/IceGrid/LocatorRegistryI.cpp index 11f4d077d6d..8564d44942e 100644 --- a/cpp/src/IceGrid/LocatorRegistryI.cpp +++ b/cpp/src/IceGrid/LocatorRegistryI.cpp @@ -24,11 +24,11 @@ class SetDirectProxyCB : public LocatorRegistryI::AdapterSetDirectProxyCB { public: - SetDirectProxyCB(const AmdCB& cb, - const TraceLevelsPtr& traceLevels, - const string& id, - const Ice::ObjectPrx& proxy) : - _cb(cb), _traceLevels(traceLevels), _id(id), _proxy(proxy) + SetDirectProxyCB(const AmdCB& cb, + const TraceLevelsPtr& traceLevels, + const string& id, + const Ice::ObjectPrx& proxy) : + _cb(cb), _traceLevels(traceLevels), _id(id), _proxy(proxy) { } @@ -50,7 +50,7 @@ public: Ice::Trace out(_traceLevels->logger, _traceLevels->locatorCat); out << "failed to register adapter `" << _id << "' endpoints:\n" << ex; } - + try { ex.ice_throw(); @@ -95,7 +95,7 @@ public: ServerSetProcessCB(const Ice::AMD_LocatorRegistry_setServerProcessProxyPtr& cb, const TraceLevelsPtr& traceLevels, const string& id, - const Ice::ObjectPrx& proxy) : + const Ice::ObjectPrx& proxy) : _cb(cb), _traceLevels(traceLevels), _id(id), _proxy(proxy) { } @@ -126,7 +126,7 @@ public: catch(const Ice::ObjectNotExistException&) { // Expected if the server was destroyed. - _cb->ice_exception(Ice::ServerNotFoundException()); + _cb->ice_exception(Ice::ServerNotFoundException()); return; } catch(const Ice::LocalException&) @@ -151,11 +151,11 @@ class SetAdapterDirectProxyCallback : public SynchronizationCallback { public: - SetAdapterDirectProxyCallback(const LocatorRegistryIPtr& registry, + SetAdapterDirectProxyCallback(const LocatorRegistryIPtr& registry, const LocatorRegistryI::AdapterSetDirectProxyCBPtr& amiCB, - const string& adapterId, + const string& adapterId, const string& replicaGroupId, - const Ice::ObjectPrx& proxy) : + const Ice::ObjectPrx& proxy) : _registry(registry), _amiCB(amiCB), _adapterId(adapterId), _replicaGroupId(replicaGroupId), _proxy(proxy) { } @@ -173,7 +173,7 @@ public: } } - virtual void + virtual void synchronized(const Ice::Exception& ex) { try @@ -206,7 +206,7 @@ public: _registry(registry), _cb(cb), _id(id), _proxy(proxy) { } - + virtual void synchronized() { @@ -220,7 +220,7 @@ public: } } - virtual void + virtual void synchronized(const Ice::Exception& ex) { try @@ -254,7 +254,7 @@ private: }; LocatorRegistryI::LocatorRegistryI(const DatabasePtr& database, - bool dynamicRegistration, + bool dynamicRegistration, bool master, ReplicaSessionManager& session) : _database(database), @@ -264,28 +264,28 @@ LocatorRegistryI::LocatorRegistryI(const DatabasePtr& database, { } -void +void LocatorRegistryI::setAdapterDirectProxy_async(const Ice::AMD_LocatorRegistry_setAdapterDirectProxyPtr& cb, - const string& adapterId, + const string& adapterId, const Ice::ObjectPrx& proxy, const Ice::Current&) { setAdapterDirectProxy(newSetDirectProxyCB(cb, _database->getTraceLevels(), adapterId, proxy), - adapterId, + adapterId, "", proxy); } -void +void LocatorRegistryI::setReplicatedAdapterDirectProxy_async( const Ice::AMD_LocatorRegistry_setReplicatedAdapterDirectProxyPtr& cb, - const string& adapterId, + const string& adapterId, const string& replicaGroupId, const Ice::ObjectPrx& proxy, const Ice::Current&) { setAdapterDirectProxy(newSetDirectProxyCB(cb, _database->getTraceLevels(), adapterId, proxy), - adapterId, + adapterId, replicaGroupId, proxy); } @@ -293,7 +293,7 @@ LocatorRegistryI::setReplicatedAdapterDirectProxy_async( void LocatorRegistryI::setServerProcessProxy_async(const Ice::AMD_LocatorRegistry_setServerProcessProxyPtr& cb, const string& id, - const Ice::ProcessPrx& proxy, + const Ice::ProcessPrx& proxy, const Ice::Current&) { try @@ -324,8 +324,8 @@ LocatorRegistryI::setServerProcessProxy_async(const Ice::AMD_LocatorRegistry_set } server->begin_setProcess(proxy, IceGrid::newCallback_Server_setProcess( - new ServerSetProcessCB(cb, _database->getTraceLevels(), id, proxy), - &ServerSetProcessCB::ice_response, + new ServerSetProcessCB(cb, _database->getTraceLevels(), id, proxy), + &ServerSetProcessCB::ice_response, &ServerSetProcessCB::ice_exception)); } catch(const ServerNotExistException&) @@ -346,7 +346,7 @@ LocatorRegistryI::setServerProcessProxy_async(const Ice::AMD_LocatorRegistry_set void LocatorRegistryI::setAdapterDirectProxy(const LocatorRegistryI::AdapterSetDirectProxyCBPtr& amiCB, - const string& adapterId, + const string& adapterId, const string& replicaGroupId, const Ice::ObjectPrx& proxy) { @@ -389,8 +389,8 @@ LocatorRegistryI::setAdapterDirectProxy(const LocatorRegistryI::AdapterSetDirect } } - adapter->begin_setDirectProxy(proxy, IceGrid::newCallback_Adapter_setDirectProxy(amiCB, - &LocatorRegistryI::AdapterSetDirectProxyCB::response, + adapter->begin_setDirectProxy(proxy, IceGrid::newCallback_Adapter_setDirectProxy(amiCB, + &LocatorRegistryI::AdapterSetDirectProxyCB::response, &LocatorRegistryI::AdapterSetDirectProxyCB::exception)); return; } @@ -408,10 +408,10 @@ LocatorRegistryI::setAdapterDirectProxy(const LocatorRegistryI::AdapterSetDirect { Ice::Trace out(traceLevels->logger, traceLevels->locatorCat); out << "couldn't register adapter `" << adapterId << "' endpoints:\n" << toString(ex); - } + } throw Ice::AdapterNotFoundException(); } - + assert(_dynamicRegistration); if(_master) { diff --git a/cpp/src/IceGrid/LocatorRegistryI.h b/cpp/src/IceGrid/LocatorRegistryI.h index f4f12f9d72d..b0a9483593c 100644 --- a/cpp/src/IceGrid/LocatorRegistryI.h +++ b/cpp/src/IceGrid/LocatorRegistryI.h @@ -28,23 +28,23 @@ class ReplicaSessionManager; class LocatorRegistryI : public Ice::LocatorRegistry { public: - + class AdapterSetDirectProxyCB : public virtual IceUtil::Shared { public: - + virtual void response() = 0; virtual void exception(const ::Ice::Exception&) = 0; }; typedef IceUtil::Handle<AdapterSetDirectProxyCB> AdapterSetDirectProxyCBPtr; LocatorRegistryI(const DatabasePtr&, bool, bool, ReplicaSessionManager&); - + virtual void setAdapterDirectProxy_async(const Ice::AMD_LocatorRegistry_setAdapterDirectProxyPtr&, const std::string&, const Ice::ObjectPrx&, const Ice::Current&); virtual void setReplicatedAdapterDirectProxy_async( - const Ice::AMD_LocatorRegistry_setReplicatedAdapterDirectProxyPtr&, const std::string&, const std::string&, + const Ice::AMD_LocatorRegistry_setReplicatedAdapterDirectProxyPtr&, const std::string&, const std::string&, const Ice::ObjectPrx&, const Ice::Current&); virtual void setServerProcessProxy_async(const Ice::AMD_LocatorRegistry_setServerProcessProxyPtr&, @@ -56,7 +56,7 @@ public: const TraceLevelsPtr& getTraceLevels() const; private: - + const DatabasePtr _database; const bool _dynamicRegistration; const bool _master; diff --git a/cpp/src/IceGrid/NodeCache.h b/cpp/src/IceGrid/NodeCache.h index 6e1c675cc77..92414e13098 100644 --- a/cpp/src/IceGrid/NodeCache.h +++ b/cpp/src/IceGrid/NodeCache.h @@ -35,10 +35,10 @@ class ReplicaCache; class NodeEntry : private IceUtil::Monitor<IceUtil::RecMutex> { public: - + NodeEntry(NodeCache&, const std::string&); virtual ~NodeEntry(); - + void addDescriptor(const std::string&, const NodeDescriptor&); void removeDescriptor(const std::string&); @@ -55,13 +55,13 @@ public: Ice::ObjectPrx getAdminProxy() const; bool canRemove(); - + void loadServer(const ServerEntryPtr&, const ServerInfo&, const SessionIPtr&, int, bool); void destroyServer(const ServerEntryPtr&, const ServerInfo&, int, bool); ServerInfo getServerInfo(const ServerInfo&, const SessionIPtr&); InternalServerDescriptorPtr getInternalServerDescriptor(const ServerInfo&, const SessionIPtr&); - + void __incRef(); void __decRef(); @@ -71,7 +71,7 @@ public: void finishedRegistration(const Ice::Exception&); private: - + ServerDescriptorPtr getServerDescriptor(const ServerInfo&, const SessionIPtr&); InternalServerDescriptorPtr getInternalServerDescriptor(const ServerInfo&) const; @@ -101,7 +101,7 @@ public: ReplicaCache& getReplicaCache() const { return _replicaCache; } private: - + const Ice::CommunicatorPtr _communicator; const std::string _replicaName; ReplicaCache& _replicaCache; diff --git a/cpp/src/IceGrid/NodeI.h b/cpp/src/IceGrid/NodeI.h index e9d46449433..ef8b5ba4b0a 100644 --- a/cpp/src/IceGrid/NodeI.h +++ b/cpp/src/IceGrid/NodeI.h @@ -45,14 +45,14 @@ public: class Update : public virtual IceUtil::Shared { public: - + Update(const NodeIPtr&, const NodeObserverPrx&); virtual ~Update(); virtual bool send() = 0; void finished(bool); - + void completed(const Ice::AsyncResultPtr&); protected: @@ -62,35 +62,35 @@ public: }; typedef IceUtil::Handle<Update> UpdatePtr; - NodeI(const Ice::ObjectAdapterPtr&, NodeSessionManager&, const ActivatorPtr&, const IceUtil::TimerPtr&, + NodeI(const Ice::ObjectAdapterPtr&, NodeSessionManager&, const ActivatorPtr&, const IceUtil::TimerPtr&, const TraceLevelsPtr&, const NodePrx&, const std::string&, const UserAccountMapperPrx&, const std::string&); virtual ~NodeI(); - virtual void loadServer_async(const AMD_Node_loadServerPtr&, - const InternalServerDescriptorPtr&, + virtual void loadServer_async(const AMD_Node_loadServerPtr&, + const InternalServerDescriptorPtr&, const std::string&, const Ice::Current&); - virtual void loadServerWithoutRestart_async(const AMD_Node_loadServerWithoutRestartPtr&, - const InternalServerDescriptorPtr&, + virtual void loadServerWithoutRestart_async(const AMD_Node_loadServerWithoutRestartPtr&, + const InternalServerDescriptorPtr&, const std::string&, const Ice::Current&); - virtual void destroyServer_async(const AMD_Node_destroyServerPtr&, - const std::string&, + virtual void destroyServer_async(const AMD_Node_destroyServerPtr&, const std::string&, - int, + const std::string&, + int, const std::string&, const Ice::Current&); - virtual void destroyServerWithoutRestart_async(const AMD_Node_destroyServerWithoutRestartPtr&, - const std::string&, + virtual void destroyServerWithoutRestart_async(const AMD_Node_destroyServerWithoutRestartPtr&, + const std::string&, const std::string&, - int, + int, const std::string&, const Ice::Current&); - - virtual void patch_async(const AMD_Node_patchPtr&, const PatcherFeedbackPrx&, const std::string&, + + virtual void patch_async(const AMD_Node_patchPtr&, const PatcherFeedbackPrx&, const std::string&, const std::string&, const InternalDistributionDescriptorPtr&, bool, const Ice::Current&); virtual void registerWithReplica(const InternalRegistryPrx&, const Ice::Current&); @@ -109,7 +109,7 @@ public: virtual bool read(const std::string&, Ice::Long, int, Ice::Long&, Ice::StringSeq&, const Ice::Current&) const; void shutdown(); - + IceUtil::TimerPtr getTimer() const; Ice::CommunicatorPtr getCommunicator() const; Ice::ObjectAdapterPtr getAdapter() const; @@ -125,7 +125,7 @@ public: std::string getOutputDir() const; bool getRedirectErrToOut() const; bool allowEndpointsOverride() const; - + NodeSessionPrx registerWithRegistry(const InternalRegistryPrx&); void checkConsistency(const NodeSessionPrx&); NodeSessionPrx getMasterNodeSession() const; @@ -149,14 +149,14 @@ private: std::vector<ServerCommandPtr> checkConsistencyNoSync(const Ice::StringSeq&); void patch(const IcePatch2::FileServerPrx&, const std::string&, const std::vector<std::string>&); - + std::set<ServerIPtr> getApplicationServers(const std::string&) const; std::string getFilePath(const std::string&) const; void loadServer(const AMD_Node_loadServerPtr&, const InternalServerDescriptorPtr&, const std::string&, bool, const Ice::Current&); - void destroyServer(const AMD_Node_destroyServerPtr&, const std::string&, const std::string&, int, + void destroyServer(const AMD_Node_destroyServerPtr&, const std::string&, const std::string&, int, const std::string&, bool, const Ice::Current&); const Ice::CommunicatorPtr _communicator; diff --git a/cpp/src/IceGrid/NodeSessionI.cpp b/cpp/src/IceGrid/NodeSessionI.cpp index b23cffb4aac..645c3bb51c9 100644 --- a/cpp/src/IceGrid/NodeSessionI.cpp +++ b/cpp/src/IceGrid/NodeSessionI.cpp @@ -23,8 +23,8 @@ class PatcherFeedbackI : public PatcherFeedback { public: - PatcherFeedbackI(const string& node, - const NodeSessionIPtr& session, + PatcherFeedbackI(const string& node, + const NodeSessionIPtr& session, const Ice::Identity id, const PatcherFeedbackAggregatorPtr& aggregator) : _node(node), @@ -60,7 +60,7 @@ PatcherFeedbackAggregator::PatcherFeedbackAggregator(Ice::Identity id, const TraceLevelsPtr& traceLevels, const string& type, const string& name, - int nodeCount) : + int nodeCount) : _id(id), _traceLevels(traceLevels), _type(type), @@ -81,13 +81,13 @@ PatcherFeedbackAggregator::finished(const string& node) { return; } - + if(_traceLevels->patch > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); out << "finished patching of " << _type << " `" << _name << "' on node `" << node << "'"; } - + _successes.insert(node); checkIfDone(); } @@ -100,13 +100,13 @@ PatcherFeedbackAggregator::failed(const string& node, const string& failure) { return; } - + if(_traceLevels->patch > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->patchCat); out << "patching of " << _type << " `" << _name << "' on node `" << node <<"' failed:\n" << failure; } - + _failures.insert(node); _reasons.push_back("patch on node `" + node + "' failed:\n" + failure); checkIfDone(); @@ -131,8 +131,8 @@ PatcherFeedbackAggregator::checkIfDone() } } -NodeSessionI::NodeSessionI(const DatabasePtr& database, - const NodePrx& node, +NodeSessionI::NodeSessionI(const DatabasePtr& database, + const NodePrx& node, const InternalNodeInfoPtr& info, int timeout, const LoadInfo& load) : @@ -265,9 +265,9 @@ NodeSessionI::getServers(const Ice::Current&) const } void -NodeSessionI::waitForApplicationUpdate_async(const AMD_NodeSession_waitForApplicationUpdatePtr& cb, - const std::string& application, - int revision, +NodeSessionI::waitForApplicationUpdate_async(const AMD_NodeSession_waitForApplicationUpdatePtr& cb, + const std::string& application, + int revision, const Ice::Current&) const { _database->waitForApplicationUpdate(cb, application, revision); @@ -297,10 +297,10 @@ NodeSessionI::shutdown() } void -NodeSessionI::patch(const PatcherFeedbackAggregatorPtr& aggregator, +NodeSessionI::patch(const PatcherFeedbackAggregatorPtr& aggregator, const string& application, const string& server, - const InternalDistributionDescriptorPtr& dist, + const InternalDistributionDescriptorPtr& dist, bool shutdown) { Ice::Identity id; @@ -368,7 +368,7 @@ NodeSessionI::destroyImpl(bool shutdown) if(_destroy) { throw Ice::ObjectNotExistException(__FILE__, __LINE__); - } + } _destroy = true; } @@ -378,7 +378,7 @@ NodeSessionI::destroyImpl(bool shutdown) // // If the registry isn't being shutdown we remove the node // internal proxy from the database. - // + // if(!shutdown) { _database->removeInternalObject(_node->ice_getIdentity()); diff --git a/cpp/src/IceGrid/NodeSessionI.h b/cpp/src/IceGrid/NodeSessionI.h index d3f2a4e59c0..1683d067084 100644 --- a/cpp/src/IceGrid/NodeSessionI.h +++ b/cpp/src/IceGrid/NodeSessionI.h @@ -67,10 +67,10 @@ public: virtual void waitForApplicationUpdate_async(const AMD_NodeSession_waitForApplicationUpdatePtr&, const std::string&, int, const Ice::Current&) const; virtual void destroy(const Ice::Current&); - + virtual IceUtil::Time timestamp() const; virtual void shutdown(); - void patch(const PatcherFeedbackAggregatorPtr&, const std::string&, const std::string&, + void patch(const PatcherFeedbackAggregatorPtr&, const std::string&, const std::string&, const InternalDistributionDescriptorPtr&, bool); const NodePrx& getNode() const; @@ -84,7 +84,7 @@ public: private: void destroyImpl(bool); - + const DatabasePtr _database; const TraceLevelsPtr _traceLevels; const std::string _name; diff --git a/cpp/src/IceGrid/NodeSessionManager.cpp b/cpp/src/IceGrid/NodeSessionManager.cpp index abdb1ef0807..c1231f5d6de 100644 --- a/cpp/src/IceGrid/NodeSessionManager.cpp +++ b/cpp/src/IceGrid/NodeSessionManager.cpp @@ -15,9 +15,9 @@ using namespace std; using namespace IceGrid; -NodeSessionKeepAliveThread::NodeSessionKeepAliveThread(const InternalRegistryPrx& registry, +NodeSessionKeepAliveThread::NodeSessionKeepAliveThread(const InternalRegistryPrx& registry, const NodeIPtr& node, - NodeSessionManager& manager) : + NodeSessionManager& manager) : SessionKeepAliveThread<NodeSessionPrx>(registry, node->getTraceLevels()->logger), _node(node), _manager(manager) { assert(registry && node); @@ -68,7 +68,7 @@ NodeSessionKeepAliveThread::createSession(InternalRegistryPrx& registry, IceUtil { results.push_back((*q)->begin_findObjectById(registry->ice_getIdentity())); } - + for(vector<Ice::AsyncResultPtr>::const_iterator p = results.begin(); p != results.end(); ++p) { QueryPrx query = QueryPrx::uncheckedCast((*p)->getProxy()); @@ -111,7 +111,7 @@ NodeSessionKeepAliveThread::createSession(InternalRegistryPrx& registry, IceUtil catch(const PermissionDeniedException& ex) { if(traceLevels) - { + { traceLevels->logger->error("connection to the registry `" + _name + "' was denied:\n" + ex.reason); } exception.reset(ex.ice_clone()); @@ -127,7 +127,7 @@ NodeSessionKeepAliveThread::createSession(InternalRegistryPrx& registry, IceUtil { Ice::Trace out(traceLevels->logger, traceLevels->replicaCat); out << "established session with replica `" << _name << "'"; - } + } } else { @@ -145,7 +145,7 @@ NodeSessionKeepAliveThread::createSession(InternalRegistryPrx& registry, IceUtil } } } - + return session; } @@ -171,7 +171,7 @@ NodeSessionKeepAliveThread::createSessionImpl(const InternalRegistryPrx& registr } } -void +void NodeSessionKeepAliveThread::destroySession(const NodeSessionPrx& session) { _node->removeObserver(session); @@ -181,7 +181,7 @@ NodeSessionKeepAliveThread::destroySession(const NodeSessionPrx& session) try { session->destroy(); - + if(_node->getTraceLevels() && _node->getTraceLevels()->replica > 0) { Ice::Trace out(_node->getTraceLevels()->logger, _node->getTraceLevels()->replicaCat); @@ -199,7 +199,7 @@ NodeSessionKeepAliveThread::destroySession(const NodeSessionPrx& session) } } -bool +bool NodeSessionKeepAliveThread::keepAlive(const NodeSessionPrx& session) { if(_node->getTraceLevels() && _node->getTraceLevels()->replica > 2) @@ -225,7 +225,7 @@ NodeSessionKeepAliveThread::keepAlive(const NodeSessionPrx& session) } } -NodeSessionManager::NodeSessionManager(const Ice::CommunicatorPtr& communicator, const string& instanceName) : +NodeSessionManager::NodeSessionManager(const Ice::CommunicatorPtr& communicator, const string& instanceName) : SessionManager(communicator, instanceName), _destroyed(false), _activated(false) @@ -246,7 +246,7 @@ NodeSessionManager::create(const NodeIPtr& node) // // Try to create the session. It's important that we wait for the // creation of the session as this will also try to create sessions - // with replicas (see createdSession below) and this must be done + // with replicas (see createdSession below) and this must be done // before the node is activated. // _thread->tryCreateSession(); @@ -286,7 +286,7 @@ NodeSessionManager::activate() // // Get the master session, if it's not created, try to create it - // again and make sure that the servers are synchronized and the + // again and make sure that the servers are synchronized and the // replica observer is set on the session. // NodeSessionPrx session = _thread->getSession(); @@ -362,7 +362,7 @@ NodeSessionManager::replicaInit(const InternalRegistryPrxSeq& replicas) { return; } - + // // Initialize the set of replicas known by the master. // @@ -434,7 +434,7 @@ NodeSessionManager::reapReplicas() { return; } - + NodeSessionMap::iterator q = _sessions.begin(); while(q != _sessions.end()) { @@ -490,7 +490,7 @@ NodeSessionManager::createdSession(const NodeSessionPrx& session) // node adapter has been activated (otherwise, the servers will be // synced after the node adapter activation, see activate()). // - // We also set the replica observer to receive notifications of + // We also set the replica observer to receive notifications of // replica addition/removal. // if(session && activated) @@ -546,7 +546,7 @@ NodeSessionManager::createdSession(const NodeSessionPrx& session) // proxies have fixed endpoints (no random port) so they are // more reliable. // - + for(vector<QueryPrx>::const_iterator q = queryObjects.begin(); q != queryObjects.end(); ++q) { results1.push_back((*q)->begin_findAllObjectsByType(InternalRegistry::ice_staticId())); @@ -599,7 +599,7 @@ NodeSessionManager::createdSession(const NodeSessionPrx& session) continue; // Ignore the master registry proxy. } id.name = "InternalRegistry-" + id.name.substr(prefix.size()); - + Ice::ObjectPrx prx = (*q)->ice_identity(id)->ice_endpoints(Ice::EndpointSeq()); id.name = "Locator"; prx = prx->ice_locator(Ice::LocatorPrx::uncheckedCast((*q)->ice_identity(id))); diff --git a/cpp/src/IceGrid/NodeSessionManager.h b/cpp/src/IceGrid/NodeSessionManager.h index 267f3377645..a003cc1617c 100644 --- a/cpp/src/IceGrid/NodeSessionManager.h +++ b/cpp/src/IceGrid/NodeSessionManager.h @@ -54,7 +54,7 @@ class NodeSessionManager : public SessionManager public: NodeSessionManager(const Ice::CommunicatorPtr&, const std::string&); - + void create(const NodeIPtr&); void create(const InternalRegistryPrx&); void activate(); @@ -77,12 +77,12 @@ private: void syncServers(const NodeSessionPrx&); - bool isDestroyed() + bool isDestroyed() { Lock sync(*this); return _destroyed; } - + class Thread : public NodeSessionKeepAliveThread { public: @@ -91,7 +91,7 @@ private: { } - virtual NodeSessionPrx + virtual NodeSessionPrx createSession(InternalRegistryPrx& master, IceUtil::Time& timeout) { NodeSessionPrx session = NodeSessionKeepAliveThread::createSession(master, timeout); @@ -100,14 +100,14 @@ private: return session; } - virtual void + virtual void destroySession(const NodeSessionPrx& session) { NodeSessionKeepAliveThread::destroySession(session); _manager.reapReplicas(); } - virtual bool + virtual bool keepAlive(const NodeSessionPrx& session) { bool alive = NodeSessionKeepAliveThread::keepAlive(session); diff --git a/cpp/src/IceGrid/Parser.h b/cpp/src/IceGrid/Parser.h index 45e7fe15df8..9ca105639b5 100644 --- a/cpp/src/IceGrid/Parser.h +++ b/cpp/src/IceGrid/Parser.h @@ -109,7 +109,7 @@ public: void propertiesService(const std::list<std::string>&, bool); void describeService(const std::list<std::string>&); void listServices(const std::list<std::string>&); - + void endpointsAdapter(const std::list<std::string>&); void removeAdapter(const std::list<std::string>&); void listAllAdapters(const std::list<std::string>&); @@ -121,16 +121,16 @@ public: void listObject(const std::list<std::string>&); void show(const std::string&, const std::list<std::string>&); - + void showBanner(); void showCopying(); void showWarranty(); // - // With older flex version <= 2.5.35 YY_INPUT second + // With older flex version <= 2.5.35 YY_INPUT second // paramenter is of type int&, in newer versions it // changes to size_t& - // + // void getInput(char*, int&, size_t); void getInput(char*, size_t&, size_t); void continueLine(); @@ -159,7 +159,7 @@ private: void showFile(const std::string&, const std::string&, const std::string&, bool, bool, bool, int); void showLog(const std::string&, const std::string&, bool, bool, int); - + std::string _commands; Ice::CommunicatorPtr _communicator; diff --git a/cpp/src/IceGrid/PlatformInfo.cpp b/cpp/src/IceGrid/PlatformInfo.cpp index f5d425ab8af..ba303edf6de 100644 --- a/cpp/src/IceGrid/PlatformInfo.cpp +++ b/cpp/src/IceGrid/PlatformInfo.cpp @@ -80,10 +80,10 @@ class UpdateUtilizationAverageThread : public IceUtil::Thread { public: - UpdateUtilizationAverageThread(PlatformInfo& platform) : + UpdateUtilizationAverageThread(PlatformInfo& platform) : IceUtil::Thread("IceGrid update utilization average thread"), _platform(platform) - { + { } virtual void @@ -93,7 +93,7 @@ public: } private: - + PlatformInfo& _platform; }; @@ -104,7 +104,7 @@ getSocketCount(const Ice::LoggerPtr& logger) { LPFN_GLPI glpi; glpi = (LPFN_GLPI) GetProcAddress(GetModuleHandle(TEXT("kernel32")), "GetLogicalProcessorInformation"); - if(!glpi) + if(!glpi) { Ice::Warning out(logger); out << "Unable to figure out the number of process sockets:\n"; @@ -117,15 +117,15 @@ getSocketCount(const Ice::LoggerPtr& logger) while(true) { DWORD rc = glpi(&buffer[0], &returnLength); - if(!rc) + if(!rc) { if(GetLastError() == ERROR_INSUFFICIENT_BUFFER) { buffer.resize(returnLength / sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION) + 1); continue; - } + } else - { + { Ice::Warning out(logger); out << "Unable to figure out the number of process sockets:\n"; out << IceUtilInternal::lastErrorToString(); @@ -179,9 +179,9 @@ toNodeInfo(const InternalNodeInfoPtr& node) } -PlatformInfo::PlatformInfo(const string& prefix, - const Ice::CommunicatorPtr& communicator, - const TraceLevelsPtr& traceLevels) : +PlatformInfo::PlatformInfo(const string& prefix, + const Ice::CommunicatorPtr& communicator, + const TraceLevelsPtr& traceLevels) : _traceLevels(traceLevels) { // @@ -252,7 +252,7 @@ PlatformInfo::PlatformInfo(const string& prefix, // // GetVersionEx will return the Windows 8 OS version value (6.2) for applications -// not manifested for Windows 8.1 or Windows 10. We read the OS version info from +// not manifested for Windows 8.1 or Windows 10. We read the OS version info from // a system file resource and if that fail we just return whatever GetVersionEx // returns. // @@ -344,7 +344,7 @@ PlatformInfo::PlatformInfo(const string& prefix, #elif defined(__linux) ifstream is("/proc/cpuinfo"); set<string> ids; - + int nprocessor = 0; while(is) { @@ -397,7 +397,7 @@ PlatformInfo::PlatformInfo(const string& prefix, } _cwd = string(cwd); - _dataDir = properties->getProperty(prefix + ".Data"); + _dataDir = properties->getProperty(prefix + ".Data"); if(!IceUtilInternal::isAbsolutePath(_dataDir)) { _dataDir = _cwd + '/' + _dataDir; @@ -592,7 +592,7 @@ PlatformInfo::runUpdateLoadInfo() // // If either lookup fails, close the query system, and we're done. // - + string processor; string percentProcessorTime; try @@ -643,11 +643,11 @@ PlatformInfo::runUpdateLoadInfo() Ice::Warning out(_traceLevels->logger); out << "Could not collect performance counter data:\n" << pdhErrorToString(err); } - + _last1Total += usage - _usages1.back(); _last5Total += usage - _usages5.back(); _last15Total += usage - _usages15.back(); - + _usages1.pop_back(); _usages5.pop_back(); _usages15.pop_back(); diff --git a/cpp/src/IceGrid/PluginFacadeI.cpp b/cpp/src/IceGrid/PluginFacadeI.cpp index 9c43edb7c28..cf00a1df60f 100644 --- a/cpp/src/IceGrid/PluginFacadeI.cpp +++ b/cpp/src/IceGrid/PluginFacadeI.cpp @@ -42,7 +42,7 @@ public: Init init; -bool +bool hasAdapter(const CommunicatorDescriptorPtr& descriptor, const string& adapterId) { for(AdapterDescriptorSeq::const_iterator p = descriptor->adapters.begin(); p != descriptor->adapters.end(); ++p) @@ -281,7 +281,7 @@ RegistryPluginFacadeI::getReplicaGroupFilters(const string& id) const } bool -RegistryPluginFacadeI::hasReplicaGroupFilters() const +RegistryPluginFacadeI::hasReplicaGroupFilters() const { return !_replicaGroupFilters.empty(); } @@ -299,7 +299,7 @@ RegistryPluginFacadeI::getTypeFilters(const string& id) const } bool -RegistryPluginFacadeI::hasTypeFilters() const +RegistryPluginFacadeI::hasTypeFilters() const { return !_typeFilters.empty(); } diff --git a/cpp/src/IceGrid/RegistryI.h b/cpp/src/IceGrid/RegistryI.h index 6707a6c4839..a88b0d85d91 100644 --- a/cpp/src/IceGrid/RegistryI.h +++ b/cpp/src/IceGrid/RegistryI.h @@ -33,16 +33,16 @@ class TraceLevels; typedef IceUtil::Handle<TraceLevels> TraceLevelsPtr; class ReapThread; -typedef IceUtil::Handle<ReapThread> ReapThreadPtr; +typedef IceUtil::Handle<ReapThread> ReapThreadPtr; class SessionServantManager; -typedef IceUtil::Handle<SessionServantManager> SessionServantManagerPtr; +typedef IceUtil::Handle<SessionServantManager> SessionServantManagerPtr; class ClientSessionFactory; -typedef IceUtil::Handle<ClientSessionFactory> ClientSessionFactoryPtr; +typedef IceUtil::Handle<ClientSessionFactory> ClientSessionFactoryPtr; class AdminSessionFactory; -typedef IceUtil::Handle<AdminSessionFactory> AdminSessionFactoryPtr; +typedef IceUtil::Handle<AdminSessionFactory> AdminSessionFactoryPtr; std::string getInstanceName(const Ice::CommunicatorPtr&); @@ -65,13 +65,13 @@ public: virtual int getSessionTimeout(const Ice::Current&) const; virtual int getACMTimeout(const Ice::Current&) const; - + std::string getName() const; RegistryInfo getInfo() const; void waitForShutdown(); virtual void shutdown(); - + std::string getServerAdminCategory() const { return _instanceName + "-RegistryServerAdminRouter"; } std::string getNodeAdminCategory() const { return _instanceName + "-RegistryNodeAdminRouter"; } std::string getReplicaAdminCategory() const { return _instanceName + "-RegistryReplicaAdminRouter"; } @@ -84,14 +84,14 @@ public: private: - void setupLocatorRegistry(); - LocatorPrx setupLocator(const RegistryPrx&, const QueryPrx&); + void setupLocatorRegistry(); + LocatorPrx setupLocator(const RegistryPrx&, const QueryPrx&); QueryPrx setupQuery(); RegistryPrx setupRegistry(); InternalRegistryPrx setupInternalRegistry(); bool setupUserAccountMapper(); Ice::ObjectAdapterPtr setupClientSessionFactory(const LocatorPrx&); - Ice::ObjectAdapterPtr setupAdminSessionFactory(const Ice::ObjectPtr&, const Ice::ObjectPtr&, + Ice::ObjectAdapterPtr setupAdminSessionFactory(const Ice::ObjectPtr&, const Ice::ObjectPtr&, const Ice::ObjectPtr&, const LocatorPrx&); Glacier2::PermissionsVerifierPrx getPermissionsVerifier(const LocatorPrx&, const std::string&); @@ -100,7 +100,7 @@ private: NodePrxSeq registerReplicas(const InternalRegistryPrx&, const NodePrxSeq&); void registerNodes(const InternalRegistryPrx&, const NodePrxSeq&); - + const Ice::CommunicatorPtr _communicator; const TraceLevelsPtr _traceLevels; const bool _nowarn; @@ -122,7 +122,7 @@ private: int _sessionTimeout; IceInternal::UniquePtr<ReplicaSessionManager> _session; mutable PlatformInfo _platform; - + ClientSessionFactoryPtr _clientSessionFactory; Glacier2::PermissionsVerifierPrx _clientVerifier; Glacier2::SSLPermissionsVerifierPrx _sslClientVerifier; diff --git a/cpp/src/IceGrid/ReplicaCache.h b/cpp/src/IceGrid/ReplicaCache.h index 8cbc31c0918..ad386146760 100644 --- a/cpp/src/IceGrid/ReplicaCache.h +++ b/cpp/src/IceGrid/ReplicaCache.h @@ -27,7 +27,7 @@ typedef IceUtil::Handle<ReplicaSessionI> ReplicaSessionIPtr; class ReplicaEntry : public IceUtil::Shared { public: - + ReplicaEntry(const std::string&, const ReplicaSessionIPtr&); virtual ~ReplicaEntry(); @@ -37,9 +37,9 @@ public: InternalRegistryPrx getProxy() const; Ice::ObjectPrx getAdminProxy() const; - + private: - + const std::string _name; const ReplicaSessionIPtr _session; }; @@ -51,7 +51,7 @@ public: #ifdef __SUNPRO_CC using CacheByString<ReplicaEntry>::remove; -#endif +#endif ReplicaCache(const Ice::CommunicatorPtr&, const IceStorm::TopicManagerPrx&); diff --git a/cpp/src/IceGrid/ReplicaSessionI.h b/cpp/src/IceGrid/ReplicaSessionI.h index 1ef0877d6c4..0091b81d261 100644 --- a/cpp/src/IceGrid/ReplicaSessionI.h +++ b/cpp/src/IceGrid/ReplicaSessionI.h @@ -34,15 +34,15 @@ public: virtual void keepAlive(const Ice::Current&); virtual int getTimeout(const Ice::Current&) const; - virtual void setDatabaseObserver(const DatabaseObserverPrx&, const IceUtil::Optional<StringLongDict>&, + virtual void setDatabaseObserver(const DatabaseObserverPrx&, const IceUtil::Optional<StringLongDict>&, const Ice::Current&); virtual void setEndpoints(const StringObjectProxyDict&, const Ice::Current&); virtual void registerWellKnownObjects(const ObjectInfoSeq&, const Ice::Current&); - virtual void setAdapterDirectProxy(const std::string&, const std::string&, const Ice::ObjectPrx&, + virtual void setAdapterDirectProxy(const std::string&, const std::string&, const Ice::ObjectPrx&, const Ice::Current&); virtual void receivedUpdate(TopicName, int, const std::string&, const Ice::Current&); virtual void destroy(const Ice::Current&); - + virtual IceUtil::Time timestamp() const; virtual void shutdown(); @@ -56,7 +56,7 @@ public: private: void destroyImpl(bool); - + const DatabasePtr _database; const WellKnownObjectsManagerPtr _wellKnownObjects; const TraceLevelsPtr _traceLevels; diff --git a/cpp/src/IceGrid/ReplicaSessionManager.cpp b/cpp/src/IceGrid/ReplicaSessionManager.cpp index d42a0bbbed7..8ed21322979 100644 --- a/cpp/src/IceGrid/ReplicaSessionManager.cpp +++ b/cpp/src/IceGrid/ReplicaSessionManager.cpp @@ -24,15 +24,15 @@ class MasterDatabaseObserverI : public DatabaseObserver, public IceUtil::Mutex public: MasterDatabaseObserverI(const ReplicaSessionManager::ThreadPtr& thread, - const DatabasePtr& database, - const ReplicaSessionPrx& session) : + const DatabasePtr& database, + const ReplicaSessionPrx& session) : _thread(thread), _database(database), _session(session) { } - virtual void + virtual void applicationInit(int, const ApplicationInfoSeq& applications, const Ice::Current& current) { int serial; @@ -40,7 +40,7 @@ public: receivedUpdate(ApplicationObserverTopicName, serial); } - virtual void + virtual void applicationAdded(int, const ApplicationInfo& application, const Ice::Current& current) { int serial; @@ -58,7 +58,7 @@ public: receivedUpdate(ApplicationObserverTopicName, serial, failure); } - virtual void + virtual void applicationRemoved(int, const std::string& name, const Ice::Current& current) { int serial; @@ -76,7 +76,7 @@ public: receivedUpdate(ApplicationObserverTopicName, serial, failure); } - virtual void + virtual void applicationUpdated(int, const ApplicationUpdateInfo& update, const Ice::Current& current) { int serial; @@ -108,7 +108,7 @@ public: receivedUpdate(AdapterObserverTopicName, serial); } - virtual void + virtual void adapterAdded(const AdapterInfo& info, const Ice::Current& current) { int serial; @@ -124,7 +124,7 @@ public: receivedUpdate(AdapterObserverTopicName, serial, failure); } - virtual void + virtual void adapterUpdated(const AdapterInfo& info, const Ice::Current& current) { int serial; @@ -140,7 +140,7 @@ public: receivedUpdate(AdapterObserverTopicName, serial, failure); } - virtual void + virtual void adapterRemoved(const std::string& id, const Ice::Current& current) { int serial; @@ -164,7 +164,7 @@ public: receivedUpdate(ObjectObserverTopicName, serial); } - virtual void + virtual void objectAdded(const ObjectInfo& info, const Ice::Current& current) { int serial; @@ -183,7 +183,7 @@ public: receivedUpdate(ObjectObserverTopicName, serial, failure); } - virtual void + virtual void objectUpdated(const ObjectInfo& info, const Ice::Current& current) { int serial; @@ -208,7 +208,7 @@ public: receivedUpdate(ObjectObserverTopicName, serial, failure); } - virtual void + virtual void objectRemoved(const Ice::Identity& id, const Ice::Current& current) { int serial; @@ -240,7 +240,7 @@ private: istringstream is(p->second); is >> serial; } - else + else { serial = -1; } @@ -258,8 +258,8 @@ private: return -1; } } - - void + + void receivedUpdate(TopicName name, int serial, const string& failure = string()) { try @@ -283,12 +283,12 @@ private: }; ReplicaSessionManager::ReplicaSessionManager(const Ice::CommunicatorPtr& communicator, const string& instanceName) : - SessionManager(communicator, instanceName) + SessionManager(communicator, instanceName) { } void -ReplicaSessionManager::create(const string& name, +ReplicaSessionManager::create(const string& name, const InternalReplicaInfoPtr& info, const DatabasePtr& database, const WellKnownObjectsManagerPtr& wellKnownObjects, @@ -307,7 +307,7 @@ ReplicaSessionManager::create(const string& name, _thread = new Thread(*this, _master, _traceLevels->logger); _thread->start(); notifyAll(); - } + } _thread->tryCreateSession(); _thread->waitTryCreateSession(); @@ -350,7 +350,7 @@ ReplicaSessionManager::getNodes(const NodePrxSeq& nodes) const return nodes; } } - else + else { return nodes; } @@ -420,7 +420,7 @@ ReplicaSessionManager::findInternalRegistryForReplica(const Ice::Identity& id) { results.push_back((*q)->begin_findObjectById(id)); } - + for(vector<Ice::AsyncResultPtr>::const_iterator p = results.begin(); p != results.end(); ++p) { QueryPrx query = QueryPrx::uncheckedCast((*p)->getProxy()); @@ -432,7 +432,7 @@ ReplicaSessionManager::findInternalRegistryForReplica(const Ice::Identity& id) { } } - + return 0; } @@ -473,7 +473,7 @@ ReplicaSessionManager::createSession(InternalRegistryPrx& registry, IceUtil::Tim Ice::Trace out(_traceLevels->logger, _traceLevels->replicaCat); out << "trying to establish session with master replica"; } - + set<InternalRegistryPrx> used; if(!registry->ice_getEndpoints().empty()) { @@ -497,7 +497,7 @@ ReplicaSessionManager::createSession(InternalRegistryPrx& registry, IceUtil::Tim { results.push_back((*q)->begin_findObjectById(registry->ice_getIdentity())); } - + for(vector<Ice::AsyncResultPtr>::const_iterator p = results.begin(); p != results.end(); ++p) { QueryPrx query = QueryPrx::uncheckedCast((*p)->getProxy()); @@ -598,7 +598,7 @@ ReplicaSessionManager::createSession(InternalRegistryPrx& registry, IceUtil::Tim ReplicaSessionPrx ReplicaSessionManager::createSessionImpl(const InternalRegistryPrx& registry, IceUtil::Time& timeout) -{ +{ ReplicaSessionPrx session; try { @@ -608,7 +608,7 @@ ReplicaSessionManager::createSessionImpl(const InternalRegistryPrx& registry, Ic { timeout = IceUtil::Time::seconds(t / 2); } - + // // Create a new database observer servant and give its proxy // to the session so that it can subscribe it. This call only @@ -640,7 +640,7 @@ ReplicaSessionManager::destroySession(const ReplicaSessionPrx& session) try { session->destroy(); - + if(_traceLevels && _traceLevels->replica > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->replicaCat); diff --git a/cpp/src/IceGrid/ReplicaSessionManager.h b/cpp/src/IceGrid/ReplicaSessionManager.h index 78d88f70b6a..4143c82b113 100644 --- a/cpp/src/IceGrid/ReplicaSessionManager.h +++ b/cpp/src/IceGrid/ReplicaSessionManager.h @@ -37,25 +37,25 @@ public: { public: - Thread(ReplicaSessionManager& manager, const InternalRegistryPrx& master, const Ice::LoggerPtr& logger) : + Thread(ReplicaSessionManager& manager, const InternalRegistryPrx& master, const Ice::LoggerPtr& logger) : SessionKeepAliveThread<ReplicaSessionPrx>(master, logger), _manager(manager) { } - virtual ReplicaSessionPrx + virtual ReplicaSessionPrx createSession(InternalRegistryPrx& master, IceUtil::Time& timeout) { return _manager.createSession(master, timeout); } - virtual void + virtual void destroySession(const ReplicaSessionPrx& session) { _manager.destroySession(session); } - virtual bool + virtual bool keepAlive(const ReplicaSessionPrx& session) { return _manager.keepAlive(session); @@ -64,13 +64,13 @@ public: void registerAllWellKnownObjects(); private: - + ReplicaSessionManager& _manager; }; typedef IceUtil::Handle<Thread> ThreadPtr; ReplicaSessionManager(const Ice::CommunicatorPtr&, const std::string&); - void create(const std::string&, const InternalReplicaInfoPtr&, const DatabasePtr&, + void create(const std::string&, const InternalReplicaInfoPtr&, const DatabasePtr&, const WellKnownObjectsManagerPtr&, const InternalRegistryPrx&); void create(const InternalRegistryPrx&); NodePrxSeq getNodes(const NodePrxSeq&) const; @@ -80,17 +80,17 @@ public: ReplicaSessionPrx getSession() const { return _thread ? _thread->getSession() : ReplicaSessionPrx(); } IceGrid::InternalRegistryPrx findInternalRegistryForReplica(const Ice::Identity&); - + private: friend class Thread; - bool isDestroyed() + bool isDestroyed() { Lock sync(*this); return !_communicator; } - + ReplicaSessionPrx createSession(InternalRegistryPrx&, IceUtil::Time&); ReplicaSessionPrx createSessionImpl(const InternalRegistryPrx&, IceUtil::Time&); void destroySession(const ReplicaSessionPrx&); diff --git a/cpp/src/IceGrid/ServerAdapterI.h b/cpp/src/IceGrid/ServerAdapterI.h index f7c6e6dcb0c..1f978c6ebdb 100644 --- a/cpp/src/IceGrid/ServerAdapterI.h +++ b/cpp/src/IceGrid/ServerAdapterI.h @@ -24,7 +24,7 @@ class ServerI; class ServerAdapterI : public Adapter, public IceUtil::Mutex { public: - + ServerAdapterI(const NodeIPtr&, ServerI*, const std::string&, const AdapterPrx&, const std::string&, bool); virtual ~ServerAdapterI(); diff --git a/cpp/src/IceGrid/SessionI.h b/cpp/src/IceGrid/SessionI.h index 9cd627ffc24..969fe4327aa 100644 --- a/cpp/src/IceGrid/SessionI.h +++ b/cpp/src/IceGrid/SessionI.h @@ -50,7 +50,7 @@ public: const std::string& getId() const { return _id; } virtual void destroyImpl(bool); - + protected: BaseSessionI(const std::string&, const std::string&, const DatabasePtr&); @@ -110,7 +110,7 @@ class ClientSessionFactory : public virtual IceUtil::Shared { public: - ClientSessionFactory(const SessionServantManagerPtr&, const DatabasePtr&, const IceUtil::TimerPtr&, + ClientSessionFactory(const SessionServantManagerPtr&, const DatabasePtr&, const IceUtil::TimerPtr&, const ReapThreadPtr&); Glacier2::SessionPrx createGlacier2Session(const std::string&, const Glacier2::SessionControlPrx&); @@ -133,7 +133,7 @@ class ClientSessionManagerI : public virtual Glacier2::SessionManager public: ClientSessionManagerI(const ClientSessionFactoryPtr&); - + virtual Glacier2::SessionPrx create(const std::string&, const Glacier2::SessionControlPrx&, const Ice::Current&); private: @@ -146,8 +146,8 @@ class ClientSSLSessionManagerI : public virtual Glacier2::SSLSessionManager public: ClientSSLSessionManagerI(const ClientSessionFactoryPtr&); - - virtual Glacier2::SessionPrx create(const Glacier2::SSLInfo&, const Glacier2::SessionControlPrx&, + + virtual Glacier2::SessionPrx create(const Glacier2::SSLInfo&, const Glacier2::SessionControlPrx&, const Ice::Current&); private: diff --git a/cpp/src/IceGrid/SessionManager.cpp b/cpp/src/IceGrid/SessionManager.cpp index f7908fe3ec9..e3a76fb6fcb 100644 --- a/cpp/src/IceGrid/SessionManager.cpp +++ b/cpp/src/IceGrid/SessionManager.cpp @@ -90,7 +90,7 @@ SessionManager::findAllQueryObjects(bool cached) // Ignore. } } - + for(Ice::EndpointSeq::const_iterator p = endpoints.begin(); p != endpoints.end(); ++p) { Ice::EndpointSeq singleEndpoint; @@ -117,7 +117,7 @@ SessionManager::findAllQueryObjects(bool cached) { break; } - + try { Ice::ObjectProxySeq prxs = query->end_findAllObjectsByType(*p); @@ -141,7 +141,7 @@ SessionManager::findAllQueryObjects(bool cached) } } while(proxies.size() != previousSize); - + Lock sync(*this); _queryObjects.swap(queryObjects); return _queryObjects; diff --git a/cpp/src/IceGrid/SessionManager.h b/cpp/src/IceGrid/SessionManager.h index 21f2cd5b524..563a1e7196e 100644 --- a/cpp/src/IceGrid/SessionManager.h +++ b/cpp/src/IceGrid/SessionManager.h @@ -45,7 +45,7 @@ class SessionKeepAliveThread : public IceUtil::Thread, public IceUtil::Monitor<I public: - SessionKeepAliveThread(const InternalRegistryPrx& registry, const Ice::LoggerPtr& logger) : + SessionKeepAliveThread(const InternalRegistryPrx& registry, const Ice::LoggerPtr& logger) : IceUtil::Thread("IceGrid session keepalive thread"), _registry(registry), _logger(logger), @@ -59,7 +59,7 @@ public: { TPrx session; InternalRegistryPrx registry; - IceUtil::Time timeout = IceUtil::Time::seconds(10); + IceUtil::Time timeout = IceUtil::Time::seconds(10); Action action = Connect; try @@ -124,9 +124,9 @@ public: { break; } - + assert(_nextAction != None); - + action = _nextAction; registry = InternalRegistryPrx::uncheckedCast( _registry->ice_timeout(static_cast<int>(timeout.toMilliSeconds()))); @@ -158,7 +158,7 @@ public: assert(false); } } - + // // Destroy the session. // diff --git a/cpp/src/IceGrid/SessionServantManager.h b/cpp/src/IceGrid/SessionServantManager.h index 45004d0b4fe..373a6a613c7 100644 --- a/cpp/src/IceGrid/SessionServantManager.h +++ b/cpp/src/IceGrid/SessionServantManager.h @@ -25,8 +25,8 @@ class SessionServantManager : public Ice::ServantLocator, public IceUtil::Mutex { public: - SessionServantManager(const Ice::ObjectAdapterPtr&, const std::string&, bool, - const std::string&, const Ice::ObjectPtr&, + SessionServantManager(const Ice::ObjectAdapterPtr&, const std::string&, bool, + const std::string&, const Ice::ObjectPtr&, const std::string&, const Ice::ObjectPtr&, const std::string&, const Ice::ObjectPtr&, const AdminCallbackRouterPtr&); @@ -89,7 +89,7 @@ private: std::map<Ice::Identity, ServantInfo> _servants; std::map<Ice::ObjectPtr, SessionInfo> _sessions; std::multiset<Ice::ConnectionPtr> _adminConnections; - + }; typedef IceUtil::Handle<SessionServantManager> SessionServantManagerPtr; diff --git a/cpp/src/IceGrid/WaitQueue.cpp b/cpp/src/IceGrid/WaitQueue.cpp index a0f6812f1be..a714b515965 100644 --- a/cpp/src/IceGrid/WaitQueue.cpp +++ b/cpp/src/IceGrid/WaitQueue.cpp @@ -27,7 +27,7 @@ WaitItem:: getExpirationTime() return _expiration; } -void +void WaitItem::setExpirationTime(const IceUtil::Time& time) { _expiration = time; @@ -51,22 +51,22 @@ WaitQueue::run() { wait(); } - + if(_destroyed) { break; } - + // // Notify expired items. // while(!_waitQueue.empty() && !_destroyed) { - WaitItemPtr item = _waitQueue.front(); + WaitItemPtr item = _waitQueue.front(); if(item->getExpirationTime() <= IceUtil::Time::now(IceUtil::Time::Monotonic)) { expired.push_back(item); - _waitQueue.pop_front(); + _waitQueue.pop_front(); } else if(!expired.empty()) { @@ -75,7 +75,7 @@ WaitQueue::run() else { // - // Wait until the next item expire or a notification. Note: in any case we + // Wait until the next item expire or a notification. Note: in any case we // get out of this loop to get a chance to execute the work queue. // timedWait(item->getExpirationTime() - IceUtil::Time::now(IceUtil::Time::Monotonic)); @@ -144,7 +144,7 @@ WaitQueue::add(const WaitItemPtr& item, const IceUtil::Time& wait) IceUtil::Time expire = IceUtil::Time::now(IceUtil::Time::Monotonic) + wait; item->setExpirationTime(expire); - + list<WaitItemPtr>::iterator p = _waitQueue.begin(); while(p != _waitQueue.end()) { diff --git a/cpp/src/IceGrid/WaitQueue.h b/cpp/src/IceGrid/WaitQueue.h index 000b717318e..2b678ebfda3 100644 --- a/cpp/src/IceGrid/WaitQueue.h +++ b/cpp/src/IceGrid/WaitQueue.h @@ -21,12 +21,12 @@ namespace IceGrid class WaitItem : public virtual IceUtil::Shared { public: - + WaitItem(); virtual ~WaitItem(); virtual void expired(bool) = 0; - + const IceUtil::Time& getExpirationTime(); void setExpirationTime(const IceUtil::Time&); @@ -50,7 +50,7 @@ public: bool remove(const WaitItemPtr&); private: - + std::list<WaitItemPtr> _waitQueue; bool _destroyed; }; diff --git a/cpp/src/IceGrid/WellKnownObjectsManager.h b/cpp/src/IceGrid/WellKnownObjectsManager.h index 38d8006c938..ddf33e75daa 100644 --- a/cpp/src/IceGrid/WellKnownObjectsManager.h +++ b/cpp/src/IceGrid/WellKnownObjectsManager.h @@ -22,7 +22,7 @@ typedef IceUtil::Handle<Database> DatabasePtr; class WellKnownObjectsManager : public IceUtil::Mutex, public IceUtil::Shared { public: - + WellKnownObjectsManager(const DatabasePtr&); void add(const Ice::ObjectPrx&, const std::string&); @@ -34,10 +34,10 @@ public: void updateReplicatedWellKnownObjects(); Ice::ObjectPrx getEndpoints(const std::string&); - + LocatorPrx getLocator(); Ice::LocatorRegistryPrx getLocatorRegistry(); - + private: bool initialized() const; diff --git a/cpp/src/IcePatch2/Calc.cpp b/cpp/src/IcePatch2/Calc.cpp index 073d4f7dc06..167d59d797e 100644 --- a/cpp/src/IcePatch2/Calc.cpp +++ b/cpp/src/IcePatch2/Calc.cpp @@ -62,7 +62,7 @@ struct IFileInfoPathLess: public binary_function<const LargeFileInfo&, const Lar { return true; } - else if(::tolower(static_cast<unsigned char>(lhs.path[i])) > + else if(::tolower(static_cast<unsigned char>(lhs.path[i])) > ::tolower(static_cast<unsigned char>(rhs.path[i]))) { return false; @@ -102,7 +102,7 @@ void usage(const string& appName) { consoleErr << "Usage: " << appName << " [options] DIR [FILES...]\n"; - consoleErr << + consoleErr << "Options:\n" "-h, --help Show this message.\n" "-v, --version Display the Ice version.\n" @@ -141,7 +141,7 @@ main(int argc, char* argv[]) opts.addOpt("Z", "no-compress"); opts.addOpt("V", "verbose"); opts.addOpt("i", "case-insensitive"); - + vector<string> args; try { @@ -199,7 +199,7 @@ main(int argc, char* argv[]) try { string absDataDir = dataDir; - + string cwd; if(IceUtilInternal::getcwd(cwd) != 0) { @@ -210,7 +210,7 @@ main(int argc, char* argv[]) { absDataDir = simplify(cwd + '/' + absDataDir); } - + for(StringSeq::iterator p = fileSeq.begin(); p != fileSeq.end(); ++p) { if(!IceUtilInternal::isAbsolutePath(*p)) @@ -232,12 +232,12 @@ main(int argc, char* argv[]) { throw "`" + *p + "' is not a path in `" + dataDir + "'"; } - + p->erase(0, absDataDirWithSlash.size()); } - + LargeFileInfoSeq infoSeq; - + if(fileSeq.empty()) { CalcCB calcCB; diff --git a/cpp/src/IcePatch2/FileServerI.cpp b/cpp/src/IcePatch2/FileServerI.cpp index 8170c51df1f..85019e2f69b 100644 --- a/cpp/src/IcePatch2/FileServerI.cpp +++ b/cpp/src/IcePatch2/FileServerI.cpp @@ -109,7 +109,7 @@ IcePatch2::FileServerI::getLargeFileCompressed_async(const AMD_FileServer_getLar { cb->ice_response(make_pair<const Byte*, const Byte*>(&buffer[0], &buffer[0] + buffer.size())); } - + } catch(const std::exception& ex) { @@ -118,7 +118,7 @@ IcePatch2::FileServerI::getLargeFileCompressed_async(const AMD_FileServer_getLar } void -IcePatch2::FileServerI::getFileCompressedInternal(const std::string& pa, Ice::Long pos, Ice::Int num, +IcePatch2::FileServerI::getFileCompressedInternal(const std::string& pa, Ice::Long pos, Ice::Int num, vector<Byte>& buffer, bool largeFile) const { if(IceUtilInternal::isAbsolutePath(pa)) @@ -127,26 +127,26 @@ IcePatch2::FileServerI::getFileCompressedInternal(const std::string& pa, Ice::Lo } string path = simplify(pa); - + if(path == ".." || path.find("/../") != string::npos || (path.size() >= 3 && (path.substr(0, 3) == "../" || path.substr(path.size() - 3, 3) == "/.."))) { throw FileAccessException(string("illegal `..' component in path `") + path + "'"); } - + if(num <= 0 || pos < 0) - { + { return; } - + string absolutePath = _dataDir + '/' + path + ".bz2"; int fd = IceUtilInternal::open(absolutePath, O_RDONLY|O_BINARY); if(fd == -1) { throw FileAccessException(string("cannot open `") + path + "' for reading: " + strerror(errno)); } - + if(!largeFile) { IceUtilInternal::structstat buf; @@ -154,7 +154,7 @@ IcePatch2::FileServerI::getFileCompressedInternal(const std::string& pa, Ice::Lo { throw FileAccessException(string("cannot stat `") + path + "':\n" + IceUtilInternal::lastErrorToString()); } - + if(buf.st_size > 0x7FFFFFFF) { ostringstream os; diff --git a/cpp/src/IcePatch2/FileServerI.h b/cpp/src/IcePatch2/FileServerI.h index ac7ec80c51c..acc08d18090 100644 --- a/cpp/src/IcePatch2/FileServerI.h +++ b/cpp/src/IcePatch2/FileServerI.h @@ -23,7 +23,7 @@ public: FileServerI(const std::string&, const LargeFileInfoSeq&); FileInfoSeq getFileInfoSeq(Ice::Int, const Ice::Current&) const; - + LargeFileInfoSeq getLargeFileInfoSeq(Ice::Int, const Ice::Current&) const; @@ -40,15 +40,15 @@ public: void getLargeFileCompressed_async(const AMD_FileServer_getLargeFileCompressedPtr&, const std::string&, Ice::Long, - Ice::Int, + Ice::Int, const Ice::Current&) const; private: - + void getFileCompressedInternal(const std::string&, Ice::Long, - Ice::Int, + Ice::Int, std::vector<Ice::Byte>&, bool) const; diff --git a/cpp/src/IcePatch2Lib/Util.h b/cpp/src/IcePatch2Lib/Util.h index 0c64c8b4164..f8ab9c1a4ce 100644 --- a/cpp/src/IcePatch2Lib/Util.h +++ b/cpp/src/IcePatch2Lib/Util.h @@ -78,7 +78,7 @@ struct FileInfoEqual : public std::binary_function<const IcePatch2::LargeFileInf { return false; } - + return lhs.checksum == rhs.checksum; } }; @@ -128,7 +128,7 @@ struct FileInfoWithoutFlagsLess : public std::binary_function<const IcePatch2::L { return 1; } - + return 0; } }; diff --git a/cpp/src/IceSSL/OpenSSLCertificateI.cpp b/cpp/src/IceSSL/OpenSSLCertificateI.cpp index 9d7c8559685..03c0d304d51 100644 --- a/cpp/src/IceSSL/OpenSSLCertificateI.cpp +++ b/cpp/src/IceSSL/OpenSSLCertificateI.cpp @@ -149,7 +149,7 @@ class DistinguishedNameI : public IceSSL::DistinguishedName { public: - DistinguishedNameI(X509_name_st* name) : + DistinguishedNameI(X509_name_st* name) : IceSSL::DistinguishedName(IceSSL::RFC2253::parseStrict(convertX509NameToString(name))) { unescape(); diff --git a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp index 9072026fcb4..43adc87ddfe 100644 --- a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +++ b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp @@ -190,7 +190,7 @@ OpenSSL::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal:: } } #endif - + SSL_set_verify(_ssl, sslVerifyMode, IceSSL_opensslVerifyCallback); } } @@ -433,7 +433,7 @@ OpenSSL::TransceiverI::write(IceInternal::Buffer& buf) // // It's impossible for packetSize to be more than an Int. // - int packetSize = + int packetSize = #ifdef ICE_USE_IOCP std::min(static_cast<int>(_maxSendPacketSize), static_cast<int>(buf.b.end() - buf.i)); #else diff --git a/cpp/src/IceSSL/OpenSSLTransceiverI.h b/cpp/src/IceSSL/OpenSSLTransceiverI.h index 2e01bd918dd..14de2b92193 100644 --- a/cpp/src/IceSSL/OpenSSLTransceiverI.h +++ b/cpp/src/IceSSL/OpenSSLTransceiverI.h @@ -86,7 +86,7 @@ private: IceInternal::Buffer _readBuffer; int _sentBytes; size_t _maxSendPacketSize; - size_t _maxRecvPacketSize; + size_t _maxRecvPacketSize; #endif }; typedef IceUtil::Handle<TransceiverI> TransceiverIPtr; diff --git a/cpp/src/IceSSL/SChannelEngine.cpp b/cpp/src/IceSSL/SChannelEngine.cpp index a5e0a7c246b..44fdd8eb7af 100644 --- a/cpp/src/IceSSL/SChannelEngine.cpp +++ b/cpp/src/IceSSL/SChannelEngine.cpp @@ -437,115 +437,115 @@ algorithmId(const string& name) if(name == "3DES") { return CALG_3DES; - } + } else if(name == "3DES_112") { return CALG_3DES_112; - } + } else if(name == "AES") { return CALG_AES; - } + } else if(name == "AES_128") { return CALG_AES_128; - } + } else if(name == "AES_192") { return CALG_AES_192; - } + } else if(name == "AES_256") { return CALG_AES_256; - } + } else if(name == "AGREEDKEY_ANY") { return CALG_AGREEDKEY_ANY; - } + } else if(name == "CYLINK_MEK") { return CALG_CYLINK_MEK; - } + } else if(name == "DES") { return CALG_DES; - } + } else if(name == "DESX") { return CALG_DESX; - } + } else if(name == "DH_EPHEM") { return CALG_DH_EPHEM; - } + } else if(name == "DH_SF") { return CALG_DH_SF; - } + } else if(name == "DSS_SIGN") { return CALG_DSS_SIGN; - } + } else if(name == "ECDH") { return CALG_ECDH; - } + } else if(name == "ECDH_EPHEM") { return ICESSL_CALG_ECDH_EPHEM; - } + } else if(name == "ECDSA") { return CALG_ECDSA; - } + } else if(name == "HASH_REPLACE_OWF") { return CALG_HASH_REPLACE_OWF; - } + } else if(name == "HUGHES_MD5") { return CALG_HUGHES_MD5; - } + } else if(name == "HMAC") { return CALG_HMAC; - } + } else if(name == "MAC") { return CALG_MAC; - } + } else if(name == "MD2") { return CALG_MD2; - } + } else if(name == "MD4") { return CALG_MD4; - } + } else if(name == "MD5") { return CALG_MD5; - } + } else if(name == "NO_SIGN") { return CALG_NO_SIGN; - } + } else if(name == "RC2") { return CALG_RC2; - } + } else if(name == "RC4") { return CALG_RC4; - } + } else if(name == "RC5") { return CALG_RC5; - } + } else if(name == "RSA_KEYX") { return CALG_RSA_KEYX; - } + } else if(name == "RSA_SIGN") { return CALG_RSA_SIGN; @@ -553,19 +553,19 @@ algorithmId(const string& name) else if(name == "SHA1") { return CALG_SHA1; - } + } else if(name == "SHA_256") { return CALG_SHA_256; - } + } else if(name == "SHA_384") { return CALG_SHA_384; - } + } else if(name == "SHA_512") { return CALG_SHA_512; - } + } return 0; } @@ -1033,71 +1033,71 @@ SChannel::SSLEngine::getCipherName(ALG_ID cipher) const { switch(cipher) { - case CALG_3DES: + case CALG_3DES: return "3DES"; - case CALG_3DES_112: + case CALG_3DES_112: return "3DES_112"; - case CALG_AES: + case CALG_AES: return "AES"; - case CALG_AES_128: + case CALG_AES_128: return "AES_128"; - case CALG_AES_192: + case CALG_AES_192: return "AES_192"; - case CALG_AES_256: + case CALG_AES_256: return "AES_256"; - case CALG_AGREEDKEY_ANY: + case CALG_AGREEDKEY_ANY: return "AGREEDKEY_ANY"; - case CALG_CYLINK_MEK: + case CALG_CYLINK_MEK: return "CYLINK_MEK"; - case CALG_DES: + case CALG_DES: return "DES"; - case CALG_DESX: + case CALG_DESX: return "DESX"; - case CALG_DH_EPHEM: + case CALG_DH_EPHEM: return "DH_EPHEM"; - case CALG_DH_SF: + case CALG_DH_SF: return "DH_SF"; - case CALG_DSS_SIGN: + case CALG_DSS_SIGN: return "DSS_SIGN"; - case CALG_ECDH: + case CALG_ECDH: return "ECDH"; - case ICESSL_CALG_ECDH_EPHEM: + case ICESSL_CALG_ECDH_EPHEM: return "ECDH_EPHEM"; - case CALG_ECDSA: + case CALG_ECDSA: return "ECDSA"; - case CALG_HASH_REPLACE_OWF: + case CALG_HASH_REPLACE_OWF: return "HASH_REPLACE_OWF"; - case CALG_HUGHES_MD5: + case CALG_HUGHES_MD5: return "HUGHES_MD5"; - case CALG_HMAC: + case CALG_HMAC: return "HMAC"; - case CALG_MAC: + case CALG_MAC: return "MAC"; - case CALG_MD2: + case CALG_MD2: return "MD2"; - case CALG_MD4: + case CALG_MD4: return "MD4"; - case CALG_MD5: + case CALG_MD5: return "MD5"; - case CALG_NO_SIGN: + case CALG_NO_SIGN: return "NO_SIGN"; - case CALG_RC2: + case CALG_RC2: return "RC2"; - case CALG_RC4: + case CALG_RC4: return "RC4"; - case CALG_RC5: + case CALG_RC5: return "RC5"; - case CALG_RSA_KEYX: + case CALG_RSA_KEYX: return "RSA_KEYX"; - case CALG_RSA_SIGN: + case CALG_RSA_SIGN: return "RSA_SIGN"; - case CALG_SHA1: + case CALG_SHA1: return "SHA1"; - case CALG_SHA_256: + case CALG_SHA_256: return "SHA_256"; - case CALG_SHA_384: + case CALG_SHA_384: return "SHA_384"; - case CALG_SHA_512: + case CALG_SHA_512: return "SHA_512"; default: return "Unknown"; diff --git a/cpp/src/IceSSL/SecureTransportPluginI.cpp b/cpp/src/IceSSL/SecureTransportPluginI.cpp index 6c55b28255c..f0e68cbdbc2 100644 --- a/cpp/src/IceSSL/SecureTransportPluginI.cpp +++ b/cpp/src/IceSSL/SecureTransportPluginI.cpp @@ -43,7 +43,7 @@ PluginI::PluginI(const Ice::CommunicatorPtr& com) : IceSSL::CertificatePtr PluginI::create(SecCertificateRef cert) const { - return IceSSL::SecureTransport::Certificate::create(cert); + return IceSSL::SecureTransport::Certificate::create(cert); } IceSSL::CertificatePtr diff --git a/cpp/src/IceSSL/SecureTransportTransceiverI.cpp b/cpp/src/IceSSL/SecureTransportTransceiverI.cpp index 6126cfcbbed..bf2beb69f2c 100644 --- a/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +++ b/cpp/src/IceSSL/SecureTransportTransceiverI.cpp @@ -98,7 +98,7 @@ socketRead(SSLConnectionRef connection, void* data, size_t* length) } bool -checkTrustResult(SecTrustRef trust, +checkTrustResult(SecTrustRef trust, const IceSSL::SecureTransport::SSLEnginePtr& engine, const IceSSL::InstancePtr& instance, const string& host) @@ -302,7 +302,7 @@ IceSSL::SecureTransport::TransceiverI::initialize(IceInternal::Buffer& readBuffe if(_instance->engine()->securityTraceLevel() >= 1) { - + Trace out(_instance->logger(), _instance->traceCategory()); out << "SSL summary for " << (_incoming ? "incoming" : "outgoing") << " connection\n"; diff --git a/cpp/src/IceSSL/UWPEngine.cpp b/cpp/src/IceSSL/UWPEngine.cpp index 97fcbda9b1f..2186c38c526 100644 --- a/cpp/src/IceSSL/UWPEngine.cpp +++ b/cpp/src/IceSSL/UWPEngine.cpp @@ -60,7 +60,7 @@ findPersonalCertificate(String^ friendlyName) try { auto certificates = IceInternal::runSync(CertificateStores::FindAllAsync(query)); - return certificates->Size > 0 ? certificates->GetAt(0) : nullptr; + return certificates->Size > 0 ? certificates->GetAt(0) : nullptr; } catch(Platform::Exception^ ex) { @@ -97,7 +97,7 @@ importPfxData(String^ friendlyName, String^ data, String^ password) } else { - throw PluginInitializationException(__FILE__, __LINE__, + throw PluginInitializationException(__FILE__, __LINE__, "IceSSL: certificate error:\n" + wstringToString(ex->Message->Data())); } } @@ -296,12 +296,12 @@ UWP::SSLEngine::initialize() if(!certFile.empty()) { _certificate = dynamic_pointer_cast<UWP::Certificate>(UWP::Certificate::create(importPersonalCertificate( - certFile, + certFile, [this]() { return password(false); - }, - getPasswordPrompt() != nullptr, + }, + getPasswordPrompt() != nullptr, passwordRetryMax))); } else if(!findCert.empty()) diff --git a/cpp/src/IceStorm/InstrumentationI.cpp b/cpp/src/IceStorm/InstrumentationI.cpp index 7d69eb2bc85..15dd423e250 100644 --- a/cpp/src/IceStorm/InstrumentationI.cpp +++ b/cpp/src/IceStorm/InstrumentationI.cpp @@ -18,7 +18,7 @@ using namespace IceStorm; using namespace IceStorm::Instrumentation; using namespace IceMX; -namespace +namespace { class TopicHelper : public MetricsHelperT<TopicMetrics> @@ -28,7 +28,7 @@ public: class Attributes : public AttributeResolverT<TopicHelper> { public: - + Attributes() { add("parent", &TopicHelper::getService); @@ -38,7 +38,7 @@ public: } }; static Attributes attributes; - + TopicHelper(const string& service, const string& name) : _service(service), _name(name) { } @@ -57,7 +57,7 @@ public: { return _name; } - + private: const string& _service; @@ -73,7 +73,7 @@ public: class Attributes : public AttributeResolverT<SubscriberHelper> { public: - + Attributes() { add("parent", &SubscriberHelper::getTopic); @@ -93,8 +93,8 @@ public: } }; static Attributes attributes; - - SubscriberHelper(const string& svc, const string& topic, const ::Ice::ObjectPrx& proxy, const IceStorm::QoS& qos, + + SubscriberHelper(const string& svc, const string& topic, const ::Ice::ObjectPrx& proxy, const IceStorm::QoS& qos, const IceStorm::TopicPrx& link, SubscriberState state) : _service(svc), _topic(topic), _proxy(proxy), _qos(qos), _link(link), _state(state) { @@ -140,23 +140,23 @@ public: if(_proxy->ice_isTwoway()) { return "twoway"; - } + } else if(_proxy->ice_isOneway()) { return "oneway"; - } + } else if(_proxy->ice_isBatchOneway()) { return "batch-oneway"; - } + } else if(_proxy->ice_isDatagram()) { return "datagram"; - } + } else if(_proxy->ice_isBatchDatagram()) { return "batch-datagram"; - } + } else { return "unknown"; @@ -318,7 +318,7 @@ SubscriberObserverI::delivered(int count) forEach(DeliveredUpdate(count)); } -TopicManagerObserverI::TopicManagerObserverI(const IceInternal::MetricsAdminIPtr& metrics) : +TopicManagerObserverI::TopicManagerObserverI(const IceInternal::MetricsAdminIPtr& metrics) : _metrics(metrics), _topics(metrics, "Topic"), _subscribers(metrics, "Subscriber") @@ -351,9 +351,9 @@ TopicManagerObserverI::getTopicObserver(const string& service, const string& top } SubscriberObserverPtr -TopicManagerObserverI::getSubscriberObserver(const string& svc, - const string& topic, - const ::Ice::ObjectPrx& proxy, +TopicManagerObserverI::getSubscriberObserver(const string& svc, + const string& topic, + const ::Ice::ObjectPrx& proxy, const IceStorm::QoS& qos, const IceStorm::TopicPrx& link, SubscriberState state, diff --git a/cpp/src/IceStorm/InstrumentationI.h b/cpp/src/IceStorm/InstrumentationI.h index a8857344db4..11264d71ba1 100644 --- a/cpp/src/IceStorm/InstrumentationI.h +++ b/cpp/src/IceStorm/InstrumentationI.h @@ -18,7 +18,7 @@ namespace IceStorm { -class TopicObserverI : public IceStorm::Instrumentation::TopicObserver, +class TopicObserverI : public IceStorm::Instrumentation::TopicObserver, public IceMX::ObserverT<IceMX::TopicMetrics> { public: @@ -27,7 +27,7 @@ public: virtual void forwarded(); }; -class SubscriberObserverI : public IceStorm::Instrumentation::SubscriberObserver, +class SubscriberObserverI : public IceStorm::Instrumentation::SubscriberObserver, public IceMX::ObserverT<IceMX::SubscriberMetrics> { public: @@ -44,10 +44,10 @@ public: TopicManagerObserverI(const IceInternal::MetricsAdminIPtr&); virtual void setObserverUpdater(const IceStorm::Instrumentation::ObserverUpdaterPtr&); - + virtual IceStorm::Instrumentation::TopicObserverPtr getTopicObserver( const std::string&, const std::string&, const IceStorm::Instrumentation::TopicObserverPtr&); - + virtual IceStorm::Instrumentation::SubscriberObserverPtr getSubscriberObserver( const std::string&, const std::string&, diff --git a/cpp/src/IceStorm/NodeI.cpp b/cpp/src/IceStorm/NodeI.cpp index 0994fa6a1e0..fbd27c7f598 100644 --- a/cpp/src/IceStorm/NodeI.cpp +++ b/cpp/src/IceStorm/NodeI.cpp @@ -109,7 +109,7 @@ GroupNodeInfo::operator==(const GroupNodeInfo& rhs) const #if defined(__clang__) && defined(_LIBCPP_VERSION) GroupNodeInfo& GroupNodeInfo::operator=(const GroupNodeInfo& other) - + { const_cast<int&>(this->id) = other.id; const_cast<LogUpdate&>(this->llu) = other.llu; @@ -204,13 +204,13 @@ NodeI::start() // By setting _checkTask first we stop recovery() from setting it // to the regular election interval. // - + // // We use this lock to ensure that recovery is called before CheckTask // is scheduled, even if timeout is 0 // Lock sync(*this); - + _checkTask = new CheckTask(this); _timer->schedule(_checkTask, IceUtil::Time::seconds((_nodes.size() - _id) * 2)); recovery(); @@ -233,7 +233,7 @@ NodeI::check() _timer->schedule(_checkTask, _electionTimeout); return; } - + // Next get the set of nodes that were detected as unreachable // from the replica and remove them from our slave list. vector<int> dead; @@ -253,7 +253,7 @@ NodeI::check() _up.erase(q); } } - + // If we no longer have the majority of the nodes under our // care then we need to stop our replica. if(_up.size() < _nodes.size()/2) @@ -497,7 +497,7 @@ NodeI::merge(const set<int>& coordinatorSet) // Schedule the mergeContinueTask. assert(_mergeContinueTask == 0); _mergeContinueTask = new MergeContinueTask(this); - + // At this point we may have already accepted all of the // invitations, if so then we want to schedule the // mergeContinue immediately. @@ -538,7 +538,7 @@ NodeI::mergeContinue() Ice::Trace out(_traceLevels->logger, _traceLevels->electionCat); out << "node " << _id << ": coordinator for " << (tmpSet.size() +1) << " nodes (including myself)"; } - + // Now we need to decide whether we can start serving content. If // we're on initial startup then we need all nodes to participate // in the election. If we're running a subsequent election then we @@ -1026,7 +1026,7 @@ NodeI::recovery(Ice::Long generation) _generation = -1; _coord = _id; _up.clear(); - + if(_traceLevels->election > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->electionCat); @@ -1107,7 +1107,7 @@ NodeI::startUpdate(Ice::Long& generation, const char* file, int line) bool majority = _observers->check(); Lock sync(*this); - + // If we've actively replicating & lost the majority of our replicas then recover. if(!_coordinatorProxy && !_destroy && _state == NodeStateNormal && !majority) { @@ -1143,7 +1143,7 @@ NodeI::updateMaster(const char* /*file*/, int /*line*/) { return false; } - + // If we've lost the majority of our replicas then recover. if(_state == NodeStateNormal && !majority) { diff --git a/cpp/src/IceStorm/Parser.h b/cpp/src/IceStorm/Parser.h index 225c7df71ad..e3133a3d9f4 100644 --- a/cpp/src/IceStorm/Parser.h +++ b/cpp/src/IceStorm/Parser.h @@ -53,7 +53,7 @@ class Parser : public ::IceUtil::SimpleShared { public: - static ParserPtr createParser(const Ice::CommunicatorPtr&, const TopicManagerPrx&, + static ParserPtr createParser(const Ice::CommunicatorPtr&, const TopicManagerPrx&, const std::map<Ice::Identity, TopicManagerPrx>&); void usage(); @@ -71,10 +71,10 @@ public: void showBanner(); // - // With older flex version <= 2.5.35 YY_INPUT second + // With older flex version <= 2.5.35 YY_INPUT second // paramenter is of type int&, in newer versions it // changes to size_t& - // + // void getInput(char*, int&, size_t); void getInput(char*, size_t&, size_t); @@ -99,7 +99,7 @@ private: TopicPrx findTopic(const std::string&) const; Parser(const Ice::CommunicatorPtr&, const TopicManagerPrx&, const std::map<Ice::Identity, TopicManagerPrx>&); - + void exception(const Ice::Exception&, bool = false); const Ice::CommunicatorPtr _communicator; diff --git a/cpp/src/IceUtil/ConvertUTF.cpp b/cpp/src/IceUtil/ConvertUTF.cpp index aaef9842102..f2e5d37b7e3 100644 --- a/cpp/src/IceUtil/ConvertUTF.cpp +++ b/cpp/src/IceUtil/ConvertUTF.cpp @@ -1,8 +1,8 @@ /* * Copyright 2001-2004 Unicode, Inc. - * + * * Disclaimer - * + * * This source code is provided as is by Unicode, Inc. No claims are * made as to fitness for any particular purpose. No warranties of any * kind are expressed or implied. The recipient agrees to determine @@ -10,9 +10,9 @@ * purchased on magnetic or optical media from Unicode, Inc., the * sole remedy for any claim will be exchange of defective media * within 90 days of receipt. - * + * * Limitations on Rights to Redistribute This Code - * + * * Unicode, Inc. hereby grants the right to freely use the information * supplied in this file in the creation of products supporting the * Unicode Standard, and to make copies of this file in any form @@ -109,7 +109,7 @@ const char trailingBytesForUTF8[256] = { * This table contains as many values as there might be trailing bytes * in a UTF-8 sequence. */ -const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, +const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; /* @@ -134,7 +134,7 @@ const UTF8 firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; /* --------------------------------------------------------------------- */ ConversionResult ConvertUTF16toUTF8 ( - const UTF16** sourceStart, const UTF16* sourceEnd, + const UTF16** sourceStart, const UTF16* sourceEnd, UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags) { ConversionResult result = conversionOK; const UTF16* source = *sourceStart; @@ -143,7 +143,7 @@ ConversionResult ConvertUTF16toUTF8 ( UTF32 ch; unsigned short bytesToWrite = 0; const UTF32 byteMask = 0xBF; - const UTF32 byteMark = 0x80; + const UTF32 byteMark = 0x80; const UTF16* oldSource = source; /* In case we have to back up because of target overflow. */ ch = *source++; /* If we have a surrogate pair, convert to UTF32 first. */ @@ -242,7 +242,7 @@ Boolean isLegalUTF8(const UTF8 *source, int length) { /* --------------------------------------------------------------------- */ ConversionResult ConvertUTF8toUTF16 ( - const UTF8** sourceStart, const UTF8* sourceEnd, + const UTF8** sourceStart, const UTF8* sourceEnd, UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags) { ConversionResult result = conversionOK; const UTF8* source = *sourceStart; @@ -315,7 +315,7 @@ ConversionResult ConvertUTF8toUTF16 ( /* --------------------------------------------------------------------- */ ConversionResult ConvertUTF32toUTF8 ( - const UTF32** sourceStart, const UTF32* sourceEnd, + const UTF32** sourceStart, const UTF32* sourceEnd, UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags) { ConversionResult result = conversionOK; const UTF32* source = *sourceStart; @@ -324,7 +324,7 @@ ConversionResult ConvertUTF32toUTF8 ( UTF32 ch; unsigned short bytesToWrite = 0; const UTF32 byteMask = 0xBF; - const UTF32 byteMark = 0x80; + const UTF32 byteMark = 0x80; ch = *source++; if (flags == strictConversion ) { /* UTF-16 surrogate values are illegal in UTF-32 */ @@ -346,7 +346,7 @@ ConversionResult ConvertUTF32toUTF8 ( ch = UNI_REPLACEMENT_CHAR; result = sourceIllegal; } - + target += bytesToWrite; if (target > targetEnd) { --source; /* Back up source pointer! */ @@ -368,7 +368,7 @@ ConversionResult ConvertUTF32toUTF8 ( /* --------------------------------------------------------------------- */ ConversionResult ConvertUTF8toUTF32 ( - const UTF8** sourceStart, const UTF8* sourceEnd, + const UTF8** sourceStart, const UTF8* sourceEnd, UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags) { ConversionResult result = conversionOK; const UTF8* source = *sourceStart; diff --git a/cpp/src/IceUtil/ConvertUTF.h b/cpp/src/IceUtil/ConvertUTF.h index f1a0e9725ac..aa7928c7a70 100644 --- a/cpp/src/IceUtil/ConvertUTF.h +++ b/cpp/src/IceUtil/ConvertUTF.h @@ -1,8 +1,8 @@ /* * Copyright 2001-2004 Unicode, Inc. - * + * * Disclaimer - * + * * This source code is provided as is by Unicode, Inc. No claims are * made as to fitness for any particular purpose. No warranties of any * kind are expressed or implied. The recipient agrees to determine @@ -10,9 +10,9 @@ * purchased on magnetic or optical media from Unicode, Inc., the * sole remedy for any claim will be exchange of defective media * within 90 days of receipt. - * + * * Limitations on Rights to Redistribute This Code - * + * * Unicode, Inc. hereby grants the right to freely use the information * supplied in this file in the creation of products supporting the * Unicode Standard, and to make copies of this file in any form @@ -45,7 +45,7 @@ Each routine converts the text between *sourceStart and sourceEnd, putting the result into the buffer between *targetStart and - targetEnd. Note: the end pointers are *after* the last item: e.g. + targetEnd. Note: the end pointers are *after* the last item: e.g. *(sourceEnd - 1) is the last item. The return result indicates whether the conversion was successful, @@ -83,7 +83,7 @@ sequence is malformed. When "sourceIllegal" is returned, the source value will point to the illegal value that caused the problem. E.g., in UTF-8 when a sequence is malformed, it points to the start of the - malformed sequence. + malformed sequence. Author: Mark E. Davis, 1994. Rev History: Rick McGowan, fixes & updates May 2001. @@ -132,19 +132,19 @@ typedef bool Boolean; /* 0 or 1 */ ConversionResult ConvertUTF8toUTF16( - const UTF8** sourceStart, const UTF8* sourceEnd, + const UTF8** sourceStart, const UTF8* sourceEnd, UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags); ConversionResult ConvertUTF16toUTF8 ( - const UTF16** sourceStart, const UTF16* sourceEnd, + const UTF16** sourceStart, const UTF16* sourceEnd, UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags); - + ConversionResult ConvertUTF8toUTF32( - const UTF8** sourceStart, const UTF8* sourceEnd, + const UTF8** sourceStart, const UTF8* sourceEnd, UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags); ConversionResult ConvertUTF32toUTF8( - const UTF32** sourceStart, const UTF32* sourceEnd, + const UTF32** sourceStart, const UTF32* sourceEnd, UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags); bool isLegalUTF8Sequence(const UTF8* source, const UTF8* end); diff --git a/cpp/src/IceUtil/Random.cpp b/cpp/src/IceUtil/Random.cpp index e6ea7c66b89..e5485a46193 100644 --- a/cpp/src/IceUtil/Random.cpp +++ b/cpp/src/IceUtil/Random.cpp @@ -38,13 +38,13 @@ namespace // platforms is usually a port from Linux, this problem could be // widespread. Therefore, we serialize access to /dev/urandom using a // static mutex. -// +// Mutex* staticMutex = 0; int fd = -1; // -// Callback to use with pthread_atfork to reset the "/dev/urandom" -// fd state. We don't need to close the fd here as that is done +// Callback to use with pthread_atfork to reset the "/dev/urandom" +// fd state. We don't need to close the fd here as that is done // during static destruction. // extern "C" @@ -69,12 +69,12 @@ public: staticMutex = new IceUtil::Mutex; // - // Register a callback to reset the "/dev/urandom" fd + // Register a callback to reset the "/dev/urandom" fd // state after fork. // pthread_atfork(0, 0, &childAtFork); } - + ~Init() { if(fd != -1) @@ -98,7 +98,7 @@ IceUtilInternal::generateRandom(char* buffer, size_t size) #ifdef _WIN32 int i = 0; const size_t randSize = sizeof(unsigned int); - + while(size - i >= randSize) { unsigned int r = 0; @@ -107,7 +107,7 @@ IceUtilInternal::generateRandom(char* buffer, size_t size) { throw SyscallException(__FILE__, __LINE__, errno); } - memcpy(buffer + i, &r, randSize); + memcpy(buffer + i, &r, randSize); i += randSize; } @@ -120,7 +120,7 @@ IceUtilInternal::generateRandom(char* buffer, size_t size) { throw SyscallException(__FILE__, __LINE__, errno); } - memcpy(buffer + i, &r, size - i); + memcpy(buffer + i, &r, size - i); } #else // @@ -135,17 +135,17 @@ IceUtilInternal::generateRandom(char* buffer, size_t size) throw SyscallException(__FILE__, __LINE__, errno); } } - + // // Limit the number of attempts to 20 reads to avoid // a potential "for ever" loop // int reads = 0; - size_t index = 0; + size_t index = 0; while(reads <= 20 && index != size) { ssize_t bytesRead = read(fd, buffer + index, size - index); - + if(bytesRead == -1 && errno != EINTR) { throw SyscallException(__FILE__, __LINE__, errno); @@ -156,7 +156,7 @@ IceUtilInternal::generateRandom(char* buffer, size_t size) reads++; } } - + if(index != size) { throw SyscallException(__FILE__, __LINE__, 0); diff --git a/cpp/src/IceUtil/RecMutex.cpp b/cpp/src/IceUtil/RecMutex.cpp index 1a223200d11..cf47bd519e7 100644 --- a/cpp/src/IceUtil/RecMutex.cpp +++ b/cpp/src/IceUtil/RecMutex.cpp @@ -202,7 +202,7 @@ IceUtil::RecMutex::tryLock() const { throw ThreadSyscallException(__FILE__, __LINE__, rc); } - } + } else if(++_count > 1) { rc = pthread_mutex_unlock(&_mutex); diff --git a/cpp/src/IceUtil/UUID.cpp b/cpp/src/IceUtil/UUID.cpp index a692981b0e4..3db155164d9 100644 --- a/cpp/src/IceUtil/UUID.cpp +++ b/cpp/src/IceUtil/UUID.cpp @@ -10,8 +10,8 @@ #include <IceUtil/UUID.h> // On Windows, we use Windows's RPC UUID generator. -// On other platforms, we use a high quality random number generator -// (/dev/random) to generate "version 4" UUIDs, as described in +// On other platforms, we use a high quality random number generator +// (/dev/random) to generate "version 4" UUIDs, as described in // http://www.ietf.org/internet-drafts/draft-mealling-uuid-urn-00.txt #include <IceUtil/Random.h> @@ -43,7 +43,7 @@ namespace IceUtilInternal class PidInitializer { public: - + PidInitializer() { #ifndef _WIN32 @@ -75,7 +75,7 @@ inline void halfByteToHex(unsigned char hb, char*& hexBuffer) else { *hexBuffer++ = 'A' + (hb - 10); - } + } } inline void bytesToHex(unsigned char* bytes, size_t len, char*& hexBuffer) @@ -112,7 +112,7 @@ IceUtil::generateUUID() RpcStringFree(&str); return result; - + #else struct UUID { @@ -127,7 +127,7 @@ IceUtil::generateUUID() assert(sizeof(UUID) == 16); - // + // // Get a random sequence of bytes. Instead of using 122 random // bits that could be duplicated (because of a bug with some Linux // kernels and potentially other Unix platforms -- see comment in @@ -146,7 +146,7 @@ IceUtil::generateUUID() uuid.clockSeqHiAndReserved |= 0x80; // - // Replace the end of the node by myPid (15 bits) + // Replace the end of the node by myPid (15 bits) // uuid.node[4] = (uuid.node[4] & 0x80) | myPid[0]; uuid.node[5] = myPid[1]; diff --git a/cpp/src/IceUtil/Unicode.h b/cpp/src/IceUtil/Unicode.h index c53ffbd571d..a6d6d5d2a2b 100644 --- a/cpp/src/IceUtil/Unicode.h +++ b/cpp/src/IceUtil/Unicode.h @@ -27,12 +27,12 @@ namespace IceUtilInternal // Throws IllegalConversionException to report error // bool -convertUTFWstringToUTF8(const wchar_t*& sourceStart, const wchar_t* sourceEnd, +convertUTFWstringToUTF8(const wchar_t*& sourceStart, const wchar_t* sourceEnd, IceUtil::Byte*& targetStart, IceUtil::Byte* targetEnd); void -convertUTF8ToUTFWstring(const IceUtil::Byte*& sourceStart, const IceUtil::Byte* sourceEnd, +convertUTF8ToUTFWstring(const IceUtil::Byte*& sourceStart, const IceUtil::Byte* sourceEnd, std::wstring& target); void diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 0a06db2ef8f..30f184c17d4 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -648,7 +648,7 @@ Slice::typeToString(const TypePtr& type, const StringList& metaData, int typeCtx "::std::shared_ptr<void>", "::std::shared_ptr<::Ice::Value>" }; - + if((typeCtx & TypeContextLocal) != 0) { for(StringList::const_iterator i = metaData.begin(); i != metaData.end(); ++i) @@ -1191,14 +1191,14 @@ lookupKwd(const string& name) // static const string keywordList[] = { - "alignas", "alignof", "and", "and_eq", "asm", "auto", "bit_and", "bit_or", "bool", "break", - "case", "catch", "char", "char16_t", "char32_t", "class", "compl", "const", "const_exptr", "const_cast", "continue", - "decltype", "default", "delete", "do", "double", "dynamic_cast", - "else", "enum", "explicit", "export", "extern", "false", "float", "for", "friend", + "alignas", "alignof", "and", "and_eq", "asm", "auto", "bit_and", "bit_or", "bool", "break", + "case", "catch", "char", "char16_t", "char32_t", "class", "compl", "const", "const_exptr", "const_cast", "continue", + "decltype", "default", "delete", "do", "double", "dynamic_cast", + "else", "enum", "explicit", "export", "extern", "false", "float", "for", "friend", "goto", "if", "inline", "int", "long", "mutable", "namespace", "new", "noexcept", "not", "not_eq", - "operator", "or", "or_eq", "private", "protected", "public", "register", "reinterpret_cast", "return", - "short", "signed", "sizeof", "static", "static_assert", "static_cast", "struct", "switch", - "template", "this", "thread_local", "throw", "true", "try", "typedef", "typeid", "typename", + "operator", "or", "or_eq", "private", "protected", "public", "register", "reinterpret_cast", "return", + "short", "signed", "sizeof", "static", "static_assert", "static_cast", "struct", "switch", + "template", "this", "thread_local", "throw", "true", "try", "typedef", "typeid", "typename", "union", "unsigned", "using", "virtual", "void", "volatile", "wchar_t", "while", "xor", "xor_eq" }; bool found = binary_search(&keywordList[0], diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp index 947cdbe0602..3d0784e3e37 100644 --- a/cpp/src/Slice/JavaUtil.cpp +++ b/cpp/src/Slice/JavaUtil.cpp @@ -1167,7 +1167,7 @@ Slice::JavaCompatGenerator::typeToString(const TypePtr& type, "???", "???" }; - + if(local) { for(StringList::const_iterator i = metaData.begin(); i != metaData.end(); ++i) @@ -3614,7 +3614,7 @@ Slice::JavaGenerator::typeToString(const TypePtr& type, "???", "???" }; - + if(local) { for(StringList::const_iterator i = metaData.begin(); i != metaData.end(); ++i) diff --git a/cpp/src/Slice/MD5I.h b/cpp/src/Slice/MD5I.h index 66588283e83..4d32437a97b 100644 --- a/cpp/src/Slice/MD5I.h +++ b/cpp/src/Slice/MD5I.h @@ -71,7 +71,7 @@ typedef struct md5_state_s { } md5_state_t; #ifdef __cplusplus -extern "C" +extern "C" { #endif diff --git a/cpp/src/Slice/PHPUtil.cpp b/cpp/src/Slice/PHPUtil.cpp index 90c1ccf2d8e..37a67437a09 100644 --- a/cpp/src/Slice/PHPUtil.cpp +++ b/cpp/src/Slice/PHPUtil.cpp @@ -34,7 +34,7 @@ lookupKwd(const string& name) static const string keywordList[] = { "_halt_compiler", "abstract", "and", "array", "as", "break", "callable", "case", "catch", "class", "clone", - "const", "continue", "declare", "default", "die", "do", "echo", "else", "elseif", "empty", "enddeclare", + "const", "continue", "declare", "default", "die", "do", "echo", "else", "elseif", "empty", "enddeclare", "endfor", "endforeach", "endif", "endswitch", "endwhile", "eval", "exit", "extends", "final", "finally", "for", "foreach", "function", "global", "goto", "if", "implements", "include", "include_once", "instanceof", "insteadof", "interface", "isset", "list", "namespace", "new", "or", "print", "private", "protected", "public", diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index d07e7e85f3c..8ecc8c06e43 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -3973,7 +3973,7 @@ Slice::ClassDef::ClassDef(const ContainerPtr& container, const string& name, int if(!local && !intf) { for(ClassList::const_iterator p = _bases.begin(); p != _bases.end(); ++p) - { + { if((*p)->isInterface()) { _unit->warning(Deprecated, "classes implementing interfaces are deprecated"); diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp index b27f91d75bb..28ef26a0987 100644 --- a/cpp/src/Slice/RubyUtil.cpp +++ b/cpp/src/Slice/RubyUtil.cpp @@ -256,7 +256,7 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) // _out << sp << nl << "module " << getAbsolute(p, IdentToUpper) << "_Mixin"; _out << nl << "end"; - + string scoped = p->scoped(); string name = fixIdent(p->name(), IdentToUpper); ClassList bases = p->bases(); @@ -329,7 +329,7 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) _out.dec(); _out << nl << "end"; } - + // // read/write accessors for data members. // @@ -467,10 +467,10 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) const bool preserved = p->hasMetaData("preserve-slice") || p->inheritsMetaData("preserve-slice"); - _out << sp << nl << "T_" << name << ".defineClass(" - << (isInterface ? "::Ice::Value" : name) << ", " + _out << sp << nl << "T_" << name << ".defineClass(" + << (isInterface ? "::Ice::Value" : name) << ", " << p->compactId() << ", " - << (preserved ? "true" : "false") << ", " + << (preserved ? "true" : "false") << ", " << (isInterface ? "true" : "false") << ", "; if(!base) { @@ -528,7 +528,7 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) if(!p->isLocal() && isAbstract) { _out << sp << nl << "T_" << name << "Prx.defineProxy(" << name << "Prx, "; - + if(!base || (!base->isInterface() && base->allOperations().size() == 0)) { _out << "nil"; @@ -685,7 +685,7 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) } } } - + _out.dec(); _out << nl << "end"; // if not defined?() @@ -1220,7 +1220,7 @@ Slice::Ruby::CodeVisitor::writeType(const TypePtr& p) } return; } - + ProxyPtr prx = ProxyPtr::dynamicCast(p); if(prx) { diff --git a/cpp/src/Slice/SliceUtil.cpp b/cpp/src/Slice/SliceUtil.cpp index d6053c39079..2b5528e074d 100644 --- a/cpp/src/Slice/SliceUtil.cpp +++ b/cpp/src/Slice/SliceUtil.cpp @@ -179,11 +179,11 @@ Slice::changeInclude(const string& p, const vector<string>& includePaths) { paths.push_back(canonicalPath); } - + for(vector<string>::const_iterator i = paths.begin(); i != paths.end(); ++i) { for(vector<string>::const_iterator j = includePaths.begin(); j != includePaths.end(); ++j) - { + { if(i->compare(0, j->length(), *j) == 0) { string s = i->substr(j->length() + 1); // + 1 for the '/' @@ -193,7 +193,7 @@ Slice::changeInclude(const string& p, const vector<string>& includePaths) } } } - + // // If the path has been already shortened no need to test // with canonical path. diff --git a/cpp/src/slice2confluence/Gen.h b/cpp/src/slice2confluence/Gen.h index 2ea55a37666..a33e6fe834e 100644 --- a/cpp/src/slice2confluence/Gen.h +++ b/cpp/src/slice2confluence/Gen.h @@ -22,7 +22,7 @@ namespace Slice void generate(const UnitPtr&, const ::std::string&, const ::std::string&, const ::std::string&, const std::string&, const ::std::string&, const ::std::string&, const ::std::string&, const ::std::string&, unsigned, unsigned, const ::std::vector<std::string>& = ::std::vector<std::string>()); - + typedef ::std::set< ::std::string> Files; class GeneratorBase : private ::IceUtil::noncopyable @@ -40,7 +40,7 @@ public: static void setSymbols(const ContainedList&); static void setSortOrder(const std::vector<std::string>&); static bool compareSymbolNames(const std::string&, const std::string&); - + static std::string removeNewlines(std::string); static std::string trim(std::string); static std::string getUpper(const std::string&); @@ -58,14 +58,14 @@ protected: void start(const ::std::string&, const ::std::string& = ::std::string()); void end(); - + std::string getAnchorMarkup(const std::string&, const std::string& = ""); std::string getImageMarkup(const std::string&, const std::string& = ""); std::string getLinkMarkup(const std::string&, const std::string& = "", const std::string& = "", const std::string& = ""); std::string getNavMarkup(const std::string&, const std::string&); - + bool hasEnding(const std::string&, const std::string&); - + void printComment(const ContainedPtr&, const ContainerPtr&, const ::std::string&, bool = false); bool isTagged(const std::string& tag, std::string& comment); bool isUserImplemented(const ContainedPtr& p, const ContainerPtr& container); @@ -95,9 +95,9 @@ protected: static size_t _indexCount; static size_t _warnSummary; - + static std::vector<std::string> _sortOrder; - + static const std::string MODULE_SUFFIX; static const std::string INDEX_NAME; @@ -144,8 +144,8 @@ class StartPageGenerator : private GeneratorBase { public: - - + + StartPageGenerator(const Files&); ~StartPageGenerator(); void generate(const ModulePtr&); @@ -155,7 +155,7 @@ private: using GeneratorBase::printHeaderFooter; void printHeaderFooter(); - + typedef ::std::vector<StringPair> ModuleDescriptions; ModuleDescriptions _modules; Confluence::ConfluenceOutput _out; diff --git a/cpp/src/slice2cs/CsUtil.cpp b/cpp/src/slice2cs/CsUtil.cpp index b2cd8c4efe8..87cda0a1d6c 100644 --- a/cpp/src/slice2cs/CsUtil.cpp +++ b/cpp/src/slice2cs/CsUtil.cpp @@ -2554,7 +2554,7 @@ Slice::CsGenerator::MetaDataVisitor::validate(const ContainedPtr& cont) } else if(DataMemberPtr::dynamicCast(cont)) { - DataMemberPtr dataMember = DataMemberPtr::dynamicCast(cont); + DataMemberPtr dataMember = DataMemberPtr::dynamicCast(cont); StructPtr st = StructPtr::dynamicCast(dataMember->container()); ExceptionPtr ex = ExceptionPtr::dynamicCast(dataMember->container()); ClassDefPtr cl = ClassDefPtr::dynamicCast(dataMember->container()); diff --git a/cpp/src/slice2js/Gen.cpp b/cpp/src/slice2js/Gen.cpp index 7665cb7167f..90c473f405e 100644 --- a/cpp/src/slice2js/Gen.cpp +++ b/cpp/src/slice2js/Gen.cpp @@ -1074,7 +1074,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) { bool preserved = p->hasMetaData("preserve-slice") && !p->inheritsMetaData("preserve-slice"); - _out << nl << "Slice.defineValue(" << localScope << "." << name << ", " + _out << nl << "Slice.defineValue(" << localScope << "." << name << ", " << "iceC_" << getLocalScope(scoped, "_") << "_ids[" << scopedPos << "], " << (preserved ? "true" : "false") ; if(p->compactId() >= 0) @@ -1115,7 +1115,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) ClassDefPtr base = *q; if(base->isInterface()) { - _out << nl << getLocalScope(base->scope()) << "." << + _out << nl << getLocalScope(base->scope()) << "." << (base->isInterface() ? base->name() : base->name() + "Disp"); if(++q != bases.end()) { @@ -1132,7 +1132,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) _out << eb; } _out << eb << ";"; - + // // Generate a proxy class for interfaces or classes with operations. // @@ -1157,7 +1157,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "static get _implements()"; _out << sb; _out << nl << "return ["; - + _out.inc(); for(ClassList::const_iterator q = bases.begin(); q != bases.end();) { diff --git a/cpp/src/slice2js/JsUtil.cpp b/cpp/src/slice2js/JsUtil.cpp index c96900cf4bf..93afe423819 100644 --- a/cpp/src/slice2js/JsUtil.cpp +++ b/cpp/src/slice2js/JsUtil.cpp @@ -35,8 +35,8 @@ lookupKwd(const string& name) // static const string keywordList[] = { - "await", "break", "case", "catch", "class", "const", "continue", "debugger", "default", "delete", "do", - "else", "enum", "export", "extends", "false", "finally", "for", "function", "if", "implements", "import", + "await", "break", "case", "catch", "class", "const", "continue", "debugger", "default", "delete", "do", + "else", "enum", "export", "extends", "false", "finally", "for", "function", "if", "implements", "import", "in", "instanceof", "interface", "let", "new", "null", "package", "private", "protected", "public", "return", "static", "super", "switch", "this", "throw", "true", "try", "typeof", "var", "void", "while", "with", "yield" @@ -578,7 +578,7 @@ Slice::JsGenerator::getHelper(const TypePtr& type) { return typeToString(type); } - + ProxyPtr prx = ProxyPtr::dynamicCast(type); if(prx) { diff --git a/cpp/src/slice2js/JsUtil.h b/cpp/src/slice2js/JsUtil.h index 2ffa4f8ebd6..2c3398bdde1 100644 --- a/cpp/src/slice2js/JsUtil.h +++ b/cpp/src/slice2js/JsUtil.h @@ -39,7 +39,7 @@ protected: void writeOptionalMarshalUnmarshalCode(::IceUtilInternal::Output&, const TypePtr&, const std::string&, int, bool); private: - + std::vector< std::string> _seenProxy; }; diff --git a/cpp/test/Glacier2/dynamicFiltering/SessionI.h b/cpp/test/Glacier2/dynamicFiltering/SessionI.h index 6f9e09dd037..a18e38bef5d 100644 --- a/cpp/test/Glacier2/dynamicFiltering/SessionI.h +++ b/cpp/test/Glacier2/dynamicFiltering/SessionI.h @@ -26,9 +26,9 @@ class SessionManagerI : public Glacier2::SessionManager { public: SessionManagerI(const TestControllerIPtr&); - + virtual Glacier2::SessionPrx create(const std::string&, const Glacier2::SessionControlPrx&, const Ice::Current&); - + private: TestControllerIPtr _controller; }; diff --git a/cpp/test/Glacier2/dynamicFiltering/Test.ice b/cpp/test/Glacier2/dynamicFiltering/Test.ice index 8f1b0155a41..5494b9c8805 100644 --- a/cpp/test/Glacier2/dynamicFiltering/Test.ice +++ b/cpp/test/Glacier2/dynamicFiltering/Test.ice @@ -21,7 +21,7 @@ interface Backend }; enum StateCode { Initial, Running, Finished }; - + struct TestToken { bool expectedResult; diff --git a/cpp/test/Glacier2/override/CallbackI.cpp b/cpp/test/Glacier2/override/CallbackI.cpp index 57317ac4438..b2ee115a0f5 100644 --- a/cpp/test/Glacier2/override/CallbackI.cpp +++ b/cpp/test/Glacier2/override/CallbackI.cpp @@ -132,14 +132,14 @@ CallbackReceiverI::callbackWithPayloadOK(int count) return _callbackWithPayload; } -void +void CallbackReceiverI::hold() { Lock sync(*this); _holding = true; } -void +void CallbackReceiverI::activate() { Lock sync(*this); @@ -174,8 +174,8 @@ CallbackI::initiateCallback_async(const AMD_Callback_initiateCallbackPtr& cb, if(proxy->ice_isTwoway()) { AsyncCBPtr acb = new AsyncCB(); - proxy->begin_callback(token, ctx, - newCallback_CallbackReceiver_callback(acb, &AsyncCB::responseCallback, &AsyncCB::exceptionCallback), + proxy->begin_callback(token, ctx, + newCallback_CallbackReceiver_callback(acb, &AsyncCB::responseCallback, &AsyncCB::exceptionCallback), newCookie(cb)); } else @@ -186,8 +186,8 @@ CallbackI::initiateCallback_async(const AMD_Callback_initiateCallbackPtr& cb, } void -CallbackI::initiateCallbackWithPayload_async(const AMD_Callback_initiateCallbackWithPayloadPtr& cb, - const CallbackReceiverPrx& proxy, +CallbackI::initiateCallbackWithPayload_async(const AMD_Callback_initiateCallbackWithPayloadPtr& cb, + const CallbackReceiverPrx& proxy, const Current& current) { Ice::Context::const_iterator p = current.ctx.find("serverOvrd"); @@ -201,14 +201,14 @@ CallbackI::initiateCallbackWithPayload_async(const AMD_Callback_initiateCallback if(proxy->ice_isTwoway()) { AsyncCBPtr acb = new AsyncCB(); - proxy->begin_callbackWithPayload(seq, ctx, + proxy->begin_callbackWithPayload(seq, ctx, newCallback_CallbackReceiver_callbackWithPayload( - acb, - &AsyncCB::responseCallbackWithPayload, + acb, + &AsyncCB::responseCallbackWithPayload, &AsyncCB::exceptionCallbackWithPayload), newCookie(cb)); - } - else + } + else { proxy->callbackWithPayload(seq, ctx); cb->ice_response(); diff --git a/cpp/test/Glacier2/sessionControl/Session.ice b/cpp/test/Glacier2/sessionControl/Session.ice index b1ce5f922dd..c438c9cf24b 100644 --- a/cpp/test/Glacier2/sessionControl/Session.ice +++ b/cpp/test/Glacier2/sessionControl/Session.ice @@ -17,7 +17,7 @@ module Test interface Session extends Glacier2::Session { ["amd"] void destroyFromClient(); - + void shutdown(); }; diff --git a/cpp/test/Ice/background/Connector.h b/cpp/test/Ice/background/Connector.h index d71087be1e2..98d1d4a1e21 100644 --- a/cpp/test/Ice/background/Connector.h +++ b/cpp/test/Ice/background/Connector.h @@ -16,12 +16,12 @@ class Connector : public IceInternal::Connector { public: - + IceInternal::TransceiverPtr connect(); Ice::Short type() const; std::string toString() const; - + virtual bool operator==(const IceInternal::Connector&) const; virtual bool operator<(const IceInternal::Connector&) const; diff --git a/cpp/test/Ice/background/TestI.cpp b/cpp/test/Ice/background/TestI.cpp index 1239ee68c48..40eb0494fd6 100644 --- a/cpp/test/Ice/background/TestI.cpp +++ b/cpp/test/Ice/background/TestI.cpp @@ -66,13 +66,13 @@ BackgroundControllerI::holdAdapter(const Ice::Current&) { _adapter->hold(); } - + void BackgroundControllerI::resumeAdapter(const Ice::Current&) { _adapter->activate(); } - + void BackgroundControllerI::initializeSocketOperation(int status, const Ice::Current&) { @@ -96,7 +96,7 @@ BackgroundControllerI::readException(bool enable, const Ice::Current&) { _configuration->readException(enable ? new Ice::SocketException(__FILE__, __LINE__) : 0); } - + void BackgroundControllerI::writeReady(bool enable, const Ice::Current&) { @@ -108,14 +108,14 @@ BackgroundControllerI::writeException(bool enable, const Ice::Current&) { _configuration->writeException(enable ? new Ice::SocketException(__FILE__, __LINE__) : 0); } - + void BackgroundControllerI::buffered(bool enable, const Ice::Current&) { _configuration->buffered(enable); } -BackgroundControllerI::BackgroundControllerI(const Ice::ObjectAdapterPtr& adapter, +BackgroundControllerI::BackgroundControllerI(const Ice::ObjectAdapterPtr& adapter, const ConfigurationPtr& configuration) : _adapter(adapter), _configuration(configuration) diff --git a/cpp/test/Ice/background/TestI.h b/cpp/test/Ice/background/TestI.h index 3b367799fcf..ed08cbb5e80 100644 --- a/cpp/test/Ice/background/TestI.h +++ b/cpp/test/Ice/background/TestI.h @@ -30,7 +30,7 @@ public: BackgroundI(const BackgroundControllerIPtr&); private: - + BackgroundControllerIPtr _controller; }; @@ -45,18 +45,18 @@ public: virtual void holdAdapter(const Ice::Current&); virtual void resumeAdapter(const Ice::Current&); - + virtual void initializeSocketOperation(int, const Ice::Current&); virtual void initializeException(bool, const Ice::Current&); virtual void readReady(bool, const Ice::Current&); virtual void readException(bool, const Ice::Current&); - + virtual void writeReady(bool, const Ice::Current&); virtual void writeException(bool, const Ice::Current&); virtual void buffered(bool, const Ice::Current&); - + BackgroundControllerI(const Ice::ObjectAdapterPtr&, const ConfigurationPtr&); private: diff --git a/cpp/test/Ice/binding/Test.ice b/cpp/test/Ice/binding/Test.ice index 75b200b02e6..732aef3be4b 100644 --- a/cpp/test/Ice/binding/Test.ice +++ b/cpp/test/Ice/binding/Test.ice @@ -20,7 +20,7 @@ interface TestIntf interface RemoteObjectAdapter { TestIntf* getTestIntf(); - + void deactivate(); }; diff --git a/cpp/test/Ice/binding/TestI.h b/cpp/test/Ice/binding/TestI.h index a8ae23f9e56..d5b3969c27f 100644 --- a/cpp/test/Ice/binding/TestI.h +++ b/cpp/test/Ice/binding/TestI.h @@ -22,7 +22,7 @@ public: virtual std::shared_ptr<Test::RemoteObjectAdapterPrx> createObjectAdapter(std::string, std::string, const Ice::Current&); virtual void deactivateObjectAdapter(std::shared_ptr<Test::RemoteObjectAdapterPrx>, const Ice::Current&); #else - virtual Test::RemoteObjectAdapterPrx createObjectAdapter(const std::string&, const std::string&, + virtual Test::RemoteObjectAdapterPrx createObjectAdapter(const std::string&, const std::string&, const Ice::Current&); virtual void deactivateObjectAdapter(const Test::RemoteObjectAdapterPrx&, const Ice::Current&); #endif @@ -38,7 +38,7 @@ class RemoteObjectAdapterI : public Test::RemoteObjectAdapter public: RemoteObjectAdapterI(const Ice::ObjectAdapterPtr&); - + virtual Test::TestIntfPrxPtr getTestIntf(const Ice::Current&); virtual void deactivate(const Ice::Current&); diff --git a/cpp/test/Ice/checksum/Test.ice b/cpp/test/Ice/checksum/Test.ice index 444d9ec060a..9c737d019dc 100644 --- a/cpp/test/Ice/checksum/Test.ice +++ b/cpp/test/Ice/checksum/Test.ice @@ -17,7 +17,7 @@ module Test interface Checksum { ["cpp:const"] idempotent Ice::SliceChecksumDict getSliceChecksums(); - + void shutdown(); }; diff --git a/cpp/test/Ice/custom/CustomBuffer.h b/cpp/test/Ice/custom/CustomBuffer.h index 985850ffd59..cec90113db9 100644 --- a/cpp/test/Ice/custom/CustomBuffer.h +++ b/cpp/test/Ice/custom/CustomBuffer.h @@ -102,7 +102,7 @@ operator!=(const CustomBuffer<T>& lhs, const CustomBuffer<T>& rhs) { return true; } - + for(size_t i = 0; i < lhs.count(); ++i) { if(lhs.get()[i] != rhs.get()[i]) @@ -157,13 +157,13 @@ struct StreamableTraits< ::Test::CustomBuffer<T> > template<typename T> struct StreamHelper< ::Test::CustomBuffer<T>, StreamHelperCategorySequence> { - template<class S> static inline void + template<class S> static inline void write(S* stream, const ::Test::CustomBuffer<T>& v) { stream->write(v.get(), v.get() + v.count()); } - template<class S> static inline void + template<class S> static inline void read(S* stream, ::Test::CustomBuffer<T>& v) { #ifdef ICE_CPP11_MAPPING diff --git a/cpp/test/Ice/custom/MyByteSeq.cpp b/cpp/test/Ice/custom/MyByteSeq.cpp index 6c6573e8090..3850904d50c 100644 --- a/cpp/test/Ice/custom/MyByteSeq.cpp +++ b/cpp/test/Ice/custom/MyByteSeq.cpp @@ -50,7 +50,7 @@ MyByteSeq::size() const return _size; } -void +void MyByteSeq::swap(MyByteSeq& seq) { size_t tmpSize = seq._size; diff --git a/cpp/test/Ice/custom/MyByteSeq.h b/cpp/test/Ice/custom/MyByteSeq.h index 76124a8204a..076935f7307 100644 --- a/cpp/test/Ice/custom/MyByteSeq.h +++ b/cpp/test/Ice/custom/MyByteSeq.h @@ -31,7 +31,7 @@ public: const_iterator begin() const; const_iterator end() const; void operator=(const MyByteSeq&); - bool operator==(const MyByteSeq&) const; + bool operator==(const MyByteSeq&) const; private: diff --git a/cpp/test/Ice/custom/StringConverterI.cpp b/cpp/test/Ice/custom/StringConverterI.cpp index 3c0d51206b1..f66699e445f 100644 --- a/cpp/test/Ice/custom/StringConverterI.cpp +++ b/cpp/test/Ice/custom/StringConverterI.cpp @@ -28,7 +28,7 @@ Test::StringConverterI::toUTF8(const char* sourceStart, const char* sourceEnd, U } void -Test::StringConverterI::fromUTF8(const Byte* sourceStart, const Byte* sourceEnd, +Test::StringConverterI::fromUTF8(const Byte* sourceStart, const Byte* sourceEnd, string& target) const { size_t size = static_cast<size_t>(sourceEnd - sourceStart); @@ -58,7 +58,7 @@ Test::WstringConverterI::toUTF8(const wchar_t* sourceStart, const wchar_t* sourc } void -Test::WstringConverterI::fromUTF8(const Byte* sourceStart, const Byte* sourceEnd, +Test::WstringConverterI::fromUTF8(const Byte* sourceStart, const Byte* sourceEnd, wstring& target) const { string s(sourceStart, sourceEnd); diff --git a/cpp/test/Ice/custom/StringConverterI.h b/cpp/test/Ice/custom/StringConverterI.h index bb3284152dd..fdc77560c3b 100644 --- a/cpp/test/Ice/custom/StringConverterI.h +++ b/cpp/test/Ice/custom/StringConverterI.h @@ -36,7 +36,7 @@ public: virtual Ice::Byte* toUTF8(const wchar_t*, const wchar_t*, Ice::UTF8Buffer&) const; virtual void fromUTF8(const Ice::Byte* sourceStart, const Ice::Byte* sourceEnd, std::wstring& target) const; - + }; } diff --git a/cpp/test/Ice/custom/StringView.h b/cpp/test/Ice/custom/StringView.h index f970f642b0d..b78fae1a06e 100644 --- a/cpp/test/Ice/custom/StringView.h +++ b/cpp/test/Ice/custom/StringView.h @@ -28,7 +28,7 @@ public: _data(0), _size(0) {} - + string_view(const string_view& sv) : _data(sv._data), _size(sv._size) @@ -71,7 +71,7 @@ public: { return _size != 0; } - + const char* data() const { return _data; @@ -85,7 +85,7 @@ public: std::string to_string() const { - return std::string(_data, _size); + return std::string(_data, _size); } int compare(string_view str) const @@ -110,19 +110,19 @@ public: return 1; } } - + private: const char* _data; size_t _size; }; -inline bool +inline bool operator==(string_view lhs, string_view rhs) { return lhs.compare(rhs) == 0; } -inline bool +inline bool operator!=(string_view lhs, string_view rhs) { return lhs.compare(rhs) != 0; @@ -163,7 +163,7 @@ struct StreamHelper<Util::string_view, StreamHelperCategoryBuiltin> #endif } - template<class S> static inline void + template<class S> static inline void read(S* stream, Util::string_view& v) { const char* vdata = 0; diff --git a/cpp/test/Ice/enums/AllTests.cpp b/cpp/test/Ice/enums/AllTests.cpp index d2916c92962..457fa7e6ba6 100644 --- a/cpp/test/Ice/enums/AllTests.cpp +++ b/cpp/test/Ice/enums/AllTests.cpp @@ -164,7 +164,7 @@ allTests(const Ice::CommunicatorPtr& communicator) } { - ShortEnum values[] = + ShortEnum values[] = { ICE_ENUM(ShortEnum, senum1), ICE_ENUM(ShortEnum, senum2), diff --git a/cpp/test/Ice/exceptions/TestAMD.ice b/cpp/test/Ice/exceptions/TestAMD.ice index 726a2811d2f..0b6d433233f 100644 --- a/cpp/test/Ice/exceptions/TestAMD.ice +++ b/cpp/test/Ice/exceptions/TestAMD.ice @@ -99,7 +99,7 @@ module Mod void throwAfterResponse(); void throwAfterException() throws A; - + void throwE() throws E; void throwF() throws F; void throwG(); diff --git a/cpp/test/Ice/exceptions/TestAMDI.cpp b/cpp/test/Ice/exceptions/TestAMDI.cpp index bcc6abf49b8..7500ade1d6e 100644 --- a/cpp/test/Ice/exceptions/TestAMDI.cpp +++ b/cpp/test/Ice/exceptions/TestAMDI.cpp @@ -319,7 +319,7 @@ ThrowerI::throwLocalExceptionIdempotentAsync(function<void()>, { exception(current_exception()); } - + } void diff --git a/cpp/test/Ice/exceptions/TestAMDI.h b/cpp/test/Ice/exceptions/TestAMDI.h index 2a54c5926fe..dc7045e5473 100644 --- a/cpp/test/Ice/exceptions/TestAMDI.h +++ b/cpp/test/Ice/exceptions/TestAMDI.h @@ -118,7 +118,7 @@ public: virtual void throwAfterExceptionAsync(std::function<void()>, std::function<void(std::exception_ptr)>, const Ice::Current&); - + virtual void throwEAsync(std::function<void()>, std::function<void(std::exception_ptr)>, const Ice::Current&); @@ -180,7 +180,7 @@ public: virtual void throwAfterResponse_async(const Test::AMD_Thrower_throwAfterResponsePtr&, const Ice::Current&); virtual void throwAfterException_async(const Test::AMD_Thrower_throwAfterExceptionPtr&, const Ice::Current&); - + virtual void throwE_async(const Test::AMD_Thrower_throwEPtr&, const Ice::Current&); virtual void throwF_async(const Test::AMD_Thrower_throwFPtr&, const Ice::Current&); virtual void throwG_async(const Test::AMD_Thrower_throwGPtr&, const Ice::Current&); diff --git a/cpp/test/Ice/exceptions/TestI.h b/cpp/test/Ice/exceptions/TestI.h index 033fa5aa037..22f35171ae7 100644 --- a/cpp/test/Ice/exceptions/TestI.h +++ b/cpp/test/Ice/exceptions/TestI.h @@ -34,7 +34,7 @@ public: virtual void throwCasC(Ice::Int, Ice::Int, Ice::Int, const Ice::Current&); virtual void throwModA(Ice::Int, Ice::Int, const Ice::Current&); - + virtual void throwUndeclaredA(Ice::Int, const Ice::Current&); virtual void throwUndeclaredB(Ice::Int, Ice::Int, const Ice::Current&); virtual void throwUndeclaredC(Ice::Int, Ice::Int, Ice::Int, const Ice::Current&); diff --git a/cpp/test/Ice/facets/AllTests.cpp b/cpp/test/Ice/facets/AllTests.cpp index c58f7afdefe..9d9325dbef8 100644 --- a/cpp/test/Ice/facets/AllTests.cpp +++ b/cpp/test/Ice/facets/AllTests.cpp @@ -38,7 +38,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(facetFilter.size() == 1 && facetFilter[0] == "foo'bar"); communicator->getProperties()->setProperty("Ice.Admin.Facets", "'foo bar' toto 'titi'"); facetFilter = communicator->getProperties()->getPropertyAsList("Ice.Admin.Facets"); - test(facetFilter.size() == 3 && facetFilter[0] == "foo bar" && facetFilter[1] == "toto" && + test(facetFilter.size() == 3 && facetFilter[0] == "foo bar" && facetFilter[1] == "toto" && facetFilter[2] == "titi"); communicator->getProperties()->setProperty("Ice.Admin.Facets", "'foo bar\\' toto' 'titi'"); facetFilter = communicator->getProperties()->getPropertyAsList("Ice.Admin.Facets"); diff --git a/cpp/test/Ice/gc/Test.ice b/cpp/test/Ice/gc/Test.ice index 6d2c0c2c9cf..a26a351437d 100644 --- a/cpp/test/Ice/gc/Test.ice +++ b/cpp/test/Ice/gc/Test.ice @@ -163,7 +163,7 @@ module CCC }; module DDD -{ +{ interface I { void op(); @@ -176,7 +176,7 @@ module DDD class C2; class U - { + { I myI; I* myIstar; C myC; diff --git a/cpp/test/Ice/hold/TestI.cpp b/cpp/test/Ice/hold/TestI.cpp index 42cffabac34..a0c2c2bdbf2 100644 --- a/cpp/test/Ice/hold/TestI.cpp +++ b/cpp/test/Ice/hold/TestI.cpp @@ -52,7 +52,7 @@ HoldI::waitForHold(const Ice::Current& current) { } - void + void runTimerTask() { try @@ -63,7 +63,7 @@ HoldI::waitForHold(const Ice::Current& current) catch(const Ice::ObjectAdapterDeactivatedException&) { // - // This shouldn't occur. The test ensures all the waitForHold timers are + // This shouldn't occur. The test ensures all the waitForHold timers are // finished before shutting down the communicator. // test(false); @@ -71,7 +71,7 @@ HoldI::waitForHold(const Ice::Current& current) } private: - + const Ice::ObjectAdapterPtr _adapter; }; diff --git a/cpp/test/Ice/hold/TestI.h b/cpp/test/Ice/hold/TestI.h index 2d2714c626d..0314904a56a 100644 --- a/cpp/test/Ice/hold/TestI.h +++ b/cpp/test/Ice/hold/TestI.h @@ -18,7 +18,7 @@ class HoldI : public Test::Hold, public IceUtil::Mutex, public IceUtil::TimerTas #endif { public: - + HoldI(const IceUtil::TimerPtr&, const Ice::ObjectAdapterPtr&); virtual void putOnHold(Ice::Int, const Ice::Current&); @@ -28,7 +28,7 @@ public: virtual void shutdown(const Ice::Current&); virtual void runTimerTask(); - + private: int _last; diff --git a/cpp/test/Ice/inheritance/AllTests.cpp b/cpp/test/Ice/inheritance/AllTests.cpp index a1c61b6303d..ffe607f38e8 100644 --- a/cpp/test/Ice/inheritance/AllTests.cpp +++ b/cpp/test/Ice/inheritance/AllTests.cpp @@ -107,7 +107,7 @@ allTests(const Ice::CommunicatorPtr& communicator) #else test(cao == ca); #endif - + cao = cb->caop(cb); #ifdef ICE_CPP11_MAPPING test(Ice::targetEqualTo(cao, cb)); @@ -191,7 +191,7 @@ allTests(const Ice::CommunicatorPtr& communicator) #else test(cao == cc); #endif - + cbo = cc->cbop(cc); #ifdef ICE_CPP11_MAPPING test(Ice::targetEqualTo(cbo, cc)); @@ -205,14 +205,14 @@ allTests(const Ice::CommunicatorPtr& communicator) #else test(cao == cc); #endif - + cbo = cc->ccop(cc); #ifdef ICE_CPP11_MAPPING test(Ice::targetEqualTo(cbo, cc)); #else test(cbo == cc); #endif - + cco = cc->ccop(cc); #ifdef ICE_CPP11_MAPPING test(Ice::targetEqualTo(cco, cc)); @@ -568,56 +568,56 @@ allTests(const Ice::CommunicatorPtr& communicator) #endif cout << "ok" << endl; - + cout << "testing one shot constructor... " << flush; { MC::APtr a = ICE_MAKE_SHARED(MC::A, 1); test(a->aA == 1); - + MC::BPtr b = ICE_MAKE_SHARED(MC::B, 1, 2); test(b->aA == 1); test(b->bB == 2); - + MC::CPtr c = ICE_MAKE_SHARED(MC::C, 1, 2, 3); test(c->aA == 1); test(c->bB == 2); test(c->cC == 3); - + MC::DPtr d = ICE_MAKE_SHARED(MC::D, 1, 2, 3, 4); test(d->aA == 1); test(d->bB == 2); test(d->cC == 3); test(d->dD == 4); } - + { MD::APtr a = ICE_MAKE_SHARED(MD::A, 1); test(a->aA == 1); - + MD::BPtr b = ICE_MAKE_SHARED(MD::B, 1, 2); test(b->aA == 1); test(b->bB == 2); - + MD::CPtr c = ICE_MAKE_SHARED(MD::C, 1, 2, 3); test(c->aA == 1); test(c->bB == 2); test(c->cC == 3); - + MD::DPtr d = ICE_MAKE_SHARED(MD::D, 1, 2, 3, 4); test(d->aA == 1); test(d->bB == 2); test(d->cC == 3); test(d->dD == 4); } - + { ME::APtr a = ICE_MAKE_SHARED(ME::A, 1); test(a->aA == 1); - + ME::BPtr b = ICE_MAKE_SHARED(ME::B, 1, 2); test(b->aA == 1); test(b->bB == 2); - + ME::CPtr c = ICE_MAKE_SHARED(ME::C, 1, 2, 3); test(c->aA == 1); test(c->bB == 2); @@ -629,15 +629,15 @@ allTests(const Ice::CommunicatorPtr& communicator) test(d->cC == 3); test(d->dD == 4); } - + { MF::APtr a = ICE_MAKE_SHARED(MF::A, 1); test(a->aA == 1); - + MF::BPtr b = ICE_MAKE_SHARED(MF::B, 1, 2); test(b->aA == 1); test(b->bB == 2); - + MF::CPtr c = ICE_MAKE_SHARED(MF::C, 1, 2, 3); test(c->aA == 1); test(c->bB == 2); @@ -649,15 +649,15 @@ allTests(const Ice::CommunicatorPtr& communicator) test(d->cC == 3); test(d->dD == 4); } - + { MG::APtr a = ICE_MAKE_SHARED(MG::A, 1); test(a->aA == 1); - + MG::BPtr b = ICE_MAKE_SHARED(MG::B, 1, 2); test(b->aA == 1); test(b->bB == 2); - + MG::CPtr c = ICE_MAKE_SHARED(MG::C, 1, 2, 3); test(c->aA == 1); test(c->bB == 2); @@ -669,15 +669,15 @@ allTests(const Ice::CommunicatorPtr& communicator) test(d->cC == 3); test(d->dD == 4); } - + { MH::APtr a = ICE_MAKE_SHARED(MH::A, 1); test(a->aA == 1); - + MH::BPtr b = ICE_MAKE_SHARED(MH::B, 1, 2); test(b->aA == 1); test(b->bB == 2); - + MH::CPtr c = ICE_MAKE_SHARED(MH::C, 1, 2, 3); test(c->aA == 1); test(c->bB == 2); diff --git a/cpp/test/Ice/inheritance/Test.ice b/cpp/test/Ice/inheritance/Test.ice index 1e318b67132..2fee2738fed 100644 --- a/cpp/test/Ice/inheritance/Test.ice +++ b/cpp/test/Ice/inheritance/Test.ice @@ -110,7 +110,7 @@ class C extends B module MD { - + ["cpp:virtual"] class A { int aA; @@ -135,7 +135,7 @@ module MD module ME { - + class A { int aA; @@ -160,7 +160,7 @@ class B extends A module MF { - + class A { int aA; @@ -185,7 +185,7 @@ class C extends B module MG { - + class A { int aA; @@ -210,7 +210,7 @@ class D extends C module MH { - + class A { int aA; diff --git a/cpp/test/Ice/inheritance/TestI.h b/cpp/test/Ice/inheritance/TestI.h index 3bbd7270746..045466c8f53 100644 --- a/cpp/test/Ice/inheritance/TestI.h +++ b/cpp/test/Ice/inheritance/TestI.h @@ -132,7 +132,7 @@ class IB1I : public virtual Test::MB::IB1, public virtual IAI { public: - virtual Test::MB::IB1Prx ib1op(const Test::MB::IB1Prx&, const Ice::Current&); + virtual Test::MB::IB1Prx ib1op(const Test::MB::IB1Prx&, const Ice::Current&); }; class IB2I : public virtual Test::MB::IB2, public virtual IAI diff --git a/cpp/test/Ice/interceptor/Test.ice b/cpp/test/Ice/interceptor/Test.ice index 40e151551c8..031ef3b4289 100644 --- a/cpp/test/Ice/interceptor/Test.ice +++ b/cpp/test/Ice/interceptor/Test.ice @@ -69,12 +69,12 @@ interface MyObject // Raise user exception // ["amd"] int amdBadAdd(int x, int y) throws InvalidInputException; - + // // Raise ONE // ["amd"] int amdNotExistAdd(int x, int y); - + // // Raise system exception // diff --git a/cpp/test/Ice/interceptor/TestI.cpp b/cpp/test/Ice/interceptor/TestI.cpp index 1857100745e..1dbfe41697e 100644 --- a/cpp/test/Ice/interceptor/TestI.cpp +++ b/cpp/test/Ice/interceptor/TestI.cpp @@ -14,7 +14,7 @@ #include <Test.h> #include <iostream> -using namespace IceUtil; +using namespace IceUtil; using namespace std; void diff --git a/cpp/test/Ice/location/Test.ice b/cpp/test/Ice/location/Test.ice index bd15cd23ef8..d3f656f69d4 100644 --- a/cpp/test/Ice/location/Test.ice +++ b/cpp/test/Ice/location/Test.ice @@ -29,7 +29,7 @@ interface TestLocator extends ::Ice::Locator // ["cpp:const"] idempotent int getRequestCount(); }; - + interface ServerManager { void startServer(); diff --git a/cpp/test/Ice/location/TestI.h b/cpp/test/Ice/location/TestI.h index 8c6b065265c..4e665c11242 100644 --- a/cpp/test/Ice/location/TestI.h +++ b/cpp/test/Ice/location/TestI.h @@ -19,7 +19,7 @@ class ServerManagerI : public Test::ServerManager public: ServerManagerI(const ServerLocatorRegistryPtr&, const Ice::InitializationData&); - + virtual void startServer(const Ice::Current&); virtual void shutdown(const Ice::Current&); diff --git a/cpp/test/Ice/metrics/InstrumentationI.h b/cpp/test/Ice/metrics/InstrumentationI.h index b37e6bae714..bd446e426ae 100644 --- a/cpp/test/Ice/metrics/InstrumentationI.h +++ b/cpp/test/Ice/metrics/InstrumentationI.h @@ -16,7 +16,7 @@ class ObserverI : public virtual Ice::Instrumentation::Observer, public IceUtil: { public: - virtual void + virtual void reset() { total = 0; @@ -24,7 +24,7 @@ public: failedCount = 0; } - virtual void + virtual void attach() { IceUtil::Mutex::Lock sync(*this); @@ -32,14 +32,14 @@ public: ++current; } - virtual void + virtual void detach() { IceUtil::Mutex::Lock sync(*this); --current; } - virtual void + virtual void failed(const std::string&) { IceUtil::Mutex::Lock sync(*this); @@ -77,7 +77,7 @@ class ConnectionObserverI : public Ice::Instrumentation::ConnectionObserver, pub { public: - virtual void + virtual void reset() { IceUtil::Mutex::Lock sync(*this); @@ -86,20 +86,20 @@ public: sent = 0; } - virtual void + virtual void sentBytes(Ice::Int s) { IceUtil::Mutex::Lock sync(*this); sent += s; } - virtual void + virtual void receivedBytes(Ice::Int s) { IceUtil::Mutex::Lock sync(*this); received += s; } - + Ice::Int sent; Ice::Int received; }; @@ -109,7 +109,7 @@ class ThreadObserverI : public Ice::Instrumentation::ThreadObserver, public Obse { public: - virtual void + virtual void reset() { IceUtil::Mutex::Lock sync(*this); @@ -117,7 +117,7 @@ public: states = 0; } - virtual void + virtual void stateChanged(Ice::Instrumentation::ThreadState, Ice::Instrumentation::ThreadState) { IceUtil::Mutex::Lock sync(*this); @@ -140,14 +140,14 @@ public: replySize = 0; } - virtual void + virtual void userException() { IceUtil::Mutex::Lock sync(*this); ++userExceptionCount; } - virtual void + virtual void reply(Ice::Int s) { IceUtil::Mutex::Lock sync(*this); @@ -163,7 +163,7 @@ class ChildInvocationObserverI : public virtual Ice::Instrumentation::ChildInvoc { public: - virtual void + virtual void reset() { IceUtil::Mutex::Lock sync(*this); @@ -212,21 +212,21 @@ public: } } - virtual void + virtual void retried() { IceUtil::Mutex::Lock sync(*this); ++retriedCount; } - virtual void + virtual void userException() { IceUtil::Mutex::Lock sync(*this); ++userExceptionCount; } - virtual Ice::Instrumentation::RemoteObserverPtr + virtual Ice::Instrumentation::RemoteObserverPtr getRemoteObserver(const Ice::ConnectionInfoPtr& c, const Ice::EndpointPtr& e, Ice::Int, Ice::Int) { IceUtil::Mutex::Lock sync(*this); @@ -238,7 +238,7 @@ public: return remoteObserver; } - virtual Ice::Instrumentation::CollocatedObserverPtr + virtual Ice::Instrumentation::CollocatedObserverPtr getCollocatedObserver(const Ice::ObjectAdapterPtr&, Ice::Int, Ice::Int) { IceUtil::Mutex::Lock sync(*this); @@ -262,13 +262,13 @@ class CommunicatorObserverI : public Ice::Instrumentation::CommunicatorObserver, { public: - virtual void + virtual void setObserverUpdater(const Ice::Instrumentation::ObserverUpdaterPtr& u) { updater = u; } - - virtual Ice::Instrumentation::ObserverPtr + + virtual Ice::Instrumentation::ObserverPtr getConnectionEstablishmentObserver(const Ice::EndpointPtr&, const std::string&) { IceUtil::Mutex::Lock sync(*this); @@ -280,8 +280,8 @@ public: return connectionEstablishmentObserver; } - - virtual Ice::Instrumentation::ObserverPtr + + virtual Ice::Instrumentation::ObserverPtr getEndpointLookupObserver(const Ice::EndpointPtr&) { IceUtil::Mutex::Lock sync(*this); @@ -292,11 +292,11 @@ public: } return endpointLookupObserver; } - - virtual Ice::Instrumentation::ConnectionObserverPtr - getConnectionObserver(const Ice::ConnectionInfoPtr&, + + virtual Ice::Instrumentation::ConnectionObserverPtr + getConnectionObserver(const Ice::ConnectionInfoPtr&, const Ice::EndpointPtr&, - Ice::Instrumentation::ConnectionState, + Ice::Instrumentation::ConnectionState, const Ice::Instrumentation::ConnectionObserverPtr& old) { IceUtil::Mutex::Lock sync(*this); @@ -309,7 +309,7 @@ public: return connectionObserver; } - virtual Ice::Instrumentation::ThreadObserverPtr + virtual Ice::Instrumentation::ThreadObserverPtr getThreadObserver(const std::string&, const std::string&, Ice::Instrumentation::ThreadState, const Ice::Instrumentation::ThreadObserverPtr& old) { @@ -320,10 +320,10 @@ public: threadObserver = ICE_MAKE_SHARED(ThreadObserverI); threadObserver->reset(); } - return threadObserver; + return threadObserver; } - virtual Ice::Instrumentation::InvocationObserverPtr + virtual Ice::Instrumentation::InvocationObserverPtr getInvocationObserver(const Ice::ObjectPrxPtr&, const std::string&, const Ice::Context&) { IceUtil::Mutex::Lock sync(*this); @@ -335,7 +335,7 @@ public: return invocationObserver; } - virtual Ice::Instrumentation::DispatchObserverPtr + virtual Ice::Instrumentation::DispatchObserverPtr getDispatchObserver(const Ice::Current&, Ice::Int) { IceUtil::Mutex::Lock sync(*this); @@ -374,7 +374,7 @@ public: dispatchObserver->reset(); } } - + Ice::Instrumentation::ObserverUpdaterPtr updater; ObserverIPtr connectionEstablishmentObserver; diff --git a/cpp/test/Ice/metrics/TestAMD.ice b/cpp/test/Ice/metrics/TestAMD.ice index 3b8f9b95fce..ba885ae60f6 100644 --- a/cpp/test/Ice/metrics/TestAMD.ice +++ b/cpp/test/Ice/metrics/TestAMD.ice @@ -23,7 +23,7 @@ interface Metrics ["amd"] void op(); ["amd"] idempotent void fail(); - + ["amd"] void opWithUserException() throws UserEx; diff --git a/cpp/test/Ice/metrics/TestAMDI.cpp b/cpp/test/Ice/metrics/TestAMDI.cpp index bc1309c3bc2..a5590c769ec 100644 --- a/cpp/test/Ice/metrics/TestAMDI.cpp +++ b/cpp/test/Ice/metrics/TestAMDI.cpp @@ -98,7 +98,7 @@ MetricsI::opWithUserException_async(const Test::AMD_Metrics_opWithUserExceptionP } void -MetricsI::opWithRequestFailedException_async(const Test::AMD_Metrics_opWithRequestFailedExceptionPtr& cb, +MetricsI::opWithRequestFailedException_async(const Test::AMD_Metrics_opWithRequestFailedExceptionPtr& cb, const Ice::Current&) { cb->ice_exception(Ice::ObjectNotExistException(__FILE__, __LINE__)); diff --git a/cpp/test/Ice/metrics/TestAMDI.h b/cpp/test/Ice/metrics/TestAMDI.h index 7ca19b67846..ed432edc0d9 100644 --- a/cpp/test/Ice/metrics/TestAMDI.h +++ b/cpp/test/Ice/metrics/TestAMDI.h @@ -42,7 +42,7 @@ public: virtual void opWithUserException_async(const Test::AMD_Metrics_opWithUserExceptionPtr&, const Ice::Current&); - virtual void opWithRequestFailedException_async(const Test::AMD_Metrics_opWithRequestFailedExceptionPtr&, + virtual void opWithRequestFailedException_async(const Test::AMD_Metrics_opWithRequestFailedExceptionPtr&, const Ice::Current&); virtual void opWithLocalException_async(const Test::AMD_Metrics_opWithLocalExceptionPtr&, const Ice::Current&); @@ -62,7 +62,7 @@ class ControllerI : public Test::Controller public: ControllerI(const Ice::ObjectAdapterPtr&); - + virtual void hold(const Ice::Current&); virtual void resume(const Ice::Current&); diff --git a/cpp/test/Ice/metrics/TestI.h b/cpp/test/Ice/metrics/TestI.h index 3c38c22a75a..f50911ff74a 100644 --- a/cpp/test/Ice/metrics/TestI.h +++ b/cpp/test/Ice/metrics/TestI.h @@ -39,7 +39,7 @@ class ControllerI : public Test::Controller public: ControllerI(const Ice::ObjectAdapterPtr&); - + virtual void hold(const Ice::Current&); virtual void resume(const Ice::Current&); diff --git a/cpp/test/Ice/operations/Oneways.cpp b/cpp/test/Ice/operations/Oneways.cpp index 93cc134e1d2..693cbf68755 100644 --- a/cpp/test/Ice/operations/Oneways.cpp +++ b/cpp/test/Ice/operations/Oneways.cpp @@ -17,7 +17,7 @@ void oneways(const Ice::CommunicatorPtr&, const Test::MyClassPrxPtr& proxy) { Test::MyClassPrxPtr p = ICE_UNCHECKED_CAST(Test::MyClassPrx, proxy->ice_oneway()); - + { p->ice_ping(); } @@ -65,7 +65,7 @@ oneways(const Ice::CommunicatorPtr&, const Test::MyClassPrxPtr& proxy) #endif { } - } + } { p->opVoid(); diff --git a/cpp/test/Ice/operations/OnewaysAMI.cpp b/cpp/test/Ice/operations/OnewaysAMI.cpp index 59864536c58..681f55ac74b 100644 --- a/cpp/test/Ice/operations/OnewaysAMI.cpp +++ b/cpp/test/Ice/operations/OnewaysAMI.cpp @@ -16,7 +16,7 @@ using namespace std; namespace { -class CallbackBase +class CallbackBase #ifndef ICE_CPP11_MAPPING : public Ice::LocalObject #endif diff --git a/cpp/test/Ice/optional/StringView.h b/cpp/test/Ice/optional/StringView.h index f970f642b0d..b78fae1a06e 100644 --- a/cpp/test/Ice/optional/StringView.h +++ b/cpp/test/Ice/optional/StringView.h @@ -28,7 +28,7 @@ public: _data(0), _size(0) {} - + string_view(const string_view& sv) : _data(sv._data), _size(sv._size) @@ -71,7 +71,7 @@ public: { return _size != 0; } - + const char* data() const { return _data; @@ -85,7 +85,7 @@ public: std::string to_string() const { - return std::string(_data, _size); + return std::string(_data, _size); } int compare(string_view str) const @@ -110,19 +110,19 @@ public: return 1; } } - + private: const char* _data; size_t _size; }; -inline bool +inline bool operator==(string_view lhs, string_view rhs) { return lhs.compare(rhs) == 0; } -inline bool +inline bool operator!=(string_view lhs, string_view rhs) { return lhs.compare(rhs) != 0; @@ -163,7 +163,7 @@ struct StreamHelper<Util::string_view, StreamHelperCategoryBuiltin> #endif } - template<class S> static inline void + template<class S> static inline void read(S* stream, Util::string_view& v) { const char* vdata = 0; diff --git a/cpp/test/Ice/properties/config/escapes.cfg b/cpp/test/Ice/properties/config/escapes.cfg index f438d2b59c8..4c3376d550a 100755 --- a/cpp/test/Ice/properties/config/escapes.cfg +++ b/cpp/test/Ice/properties/config/escapes.cfg @@ -10,7 +10,7 @@ Prop1 = 1 # Key is "Prop1" Prop2 = 2 # Key is "Prop2" \ Prop3 \ = 3 # Key is "Prop3" My Prop1 = 1 # Key is "My Prop1" -My\ Prop2 = 2 # Key is "My Prop2" +My\ Prop2 = 2 # Key is "My Prop2" My.Prop1 = a property # Value is "a property" My.Prop2 = a property # Value is "a property" diff --git a/cpp/test/Ice/proxy/TestAMDI.h b/cpp/test/Ice/proxy/TestAMDI.h index e1b7f6d72a1..db2dd2e40e6 100644 --- a/cpp/test/Ice/proxy/TestAMDI.h +++ b/cpp/test/Ice/proxy/TestAMDI.h @@ -17,14 +17,14 @@ class MyDerivedClassI : public Test::MyDerivedClass public: MyDerivedClassI(); - + #ifdef ICE_CPP11_MAPPING virtual void echoAsync( std::shared_ptr<Ice::ObjectPrx>, ::std::function<void(const ::std::shared_ptr<Ice::ObjectPrx>&)>, ::std::function<void(::std::exception_ptr)>, const Ice::Current&); - + virtual void shutdownAsync( ::std::function<void()>, ::std::function<void(::std::exception_ptr)>, @@ -34,7 +34,7 @@ public: ::std::function<void(const Ice::Context&)>, ::std::function<void(::std::exception_ptr)>, const Ice::Current&); - + virtual bool ice_isA(std::string, const Ice::Current&) const; #else virtual void echo_async(const Test::AMD_MyDerivedClass_echoPtr&, const Ice::ObjectPrx&, const Ice::Current&); diff --git a/cpp/test/Ice/retry/SystemFailure.h b/cpp/test/Ice/retry/SystemFailure.h index 2858e0c5aac..21eda247161 100644 --- a/cpp/test/Ice/retry/SystemFailure.h +++ b/cpp/test/Ice/retry/SystemFailure.h @@ -23,7 +23,7 @@ public: SystemFailure(const SystemFailure& ex) : Ice::SystemException(ex.ice_file(), ex.ice_line()) { } - + virtual std::string ice_id() const { return "SystemFailure"; diff --git a/cpp/test/Ice/retry/TestI.h b/cpp/test/Ice/retry/TestI.h index 69be04bb21e..6f437c47c7d 100644 --- a/cpp/test/Ice/retry/TestI.h +++ b/cpp/test/Ice/retry/TestI.h @@ -25,7 +25,7 @@ public: virtual void shutdown(const Ice::Current&); private: - + int _counter; }; diff --git a/cpp/test/Ice/servantLocator/Test.ice b/cpp/test/Ice/servantLocator/Test.ice index 74f594455c9..e76652c3f3d 100644 --- a/cpp/test/Ice/servantLocator/Test.ice +++ b/cpp/test/Ice/servantLocator/Test.ice @@ -35,7 +35,7 @@ interface TestIntf string impossibleException(bool throw) throws TestImpossibleException; string intfUserException(bool throw) throws TestIntfUserException, TestImpossibleException; - + void asyncResponse() throws TestIntfUserException, TestImpossibleException; void asyncException() throws TestIntfUserException, TestImpossibleException; diff --git a/cpp/test/Ice/servantLocator/TestAMDI.h b/cpp/test/Ice/servantLocator/TestAMDI.h index 1055a583992..88de5b67def 100644 --- a/cpp/test/Ice/servantLocator/TestAMDI.h +++ b/cpp/test/Ice/servantLocator/TestAMDI.h @@ -21,7 +21,7 @@ public: std::function<void()>, std::function<void(std::exception_ptr)>, const Ice::Current&); - + virtual void unknownUserExceptionAsync( std::function<void()>, std::function<void(std::exception_ptr)>, @@ -46,7 +46,7 @@ public: std::function<void()>, std::function<void(std::exception_ptr)>, const Ice::Current&); - + virtual void stdExceptionAsync( std::function<void()>, std::function<void(std::exception_ptr)>, diff --git a/cpp/test/Ice/slicing/objects/TestI.h b/cpp/test/Ice/slicing/objects/TestI.h index dafe417c889..8bbdf6645c4 100644 --- a/cpp/test/Ice/slicing/objects/TestI.h +++ b/cpp/test/Ice/slicing/objects/TestI.h @@ -90,7 +90,7 @@ public: virtual void throwPreservedException_async(const ::Test::AMD_TestIntf_throwPreservedExceptionPtr&, const ::Ice::Current&); #endif - + virtual void useForward(::Test::ForwardPtr&, const ::Ice::Current&); virtual void shutdown(const ::Ice::Current&); diff --git a/cpp/test/Ice/stringConverter/Test.ice b/cpp/test/Ice/stringConverter/Test.ice index 1c5f142707d..1edff36c6e9 100644 --- a/cpp/test/Ice/stringConverter/Test.ice +++ b/cpp/test/Ice/stringConverter/Test.ice @@ -18,7 +18,7 @@ interface MyObject { ["cpp:type:wstring"] string widen(string msg) throws BadEncodingException; string narrow(["cpp:type:wstring"] string wmsg); - + void shutdown(); }; diff --git a/cpp/test/IceBox/admin/AllTests.cpp b/cpp/test/IceBox/admin/AllTests.cpp index bb84957ec5d..be0a8083bb6 100644 --- a/cpp/test/IceBox/admin/AllTests.cpp +++ b/cpp/test/IceBox/admin/AllTests.cpp @@ -116,7 +116,7 @@ allTests(const Ice::CommunicatorPtr& communicator) views = ma->getMetricsViewNames(disabledViews); test(views.size() == 3); - + // Make sure that the IceBox communicator metrics admin is a separate instance. #ifdef ICE_CPP11_MAPPING test(Ice::checkedCast<IceMX::MetricsAdminPrx>(admin, "Metrics")->getMetricsViewNames(disabledViews).empty()); diff --git a/cpp/test/IceBox/configuration/Test.ice b/cpp/test/IceBox/configuration/Test.ice index e9a55bde40d..8f11f08148d 100644 --- a/cpp/test/IceBox/configuration/Test.ice +++ b/cpp/test/IceBox/configuration/Test.ice @@ -18,7 +18,7 @@ interface TestIntf { string getProperty(string name); Ice::StringSeq getArgs(); - + }; }; diff --git a/cpp/test/IceBox/configuration/TestI.h b/cpp/test/IceBox/configuration/TestI.h index a23cc33e895..91c9f1dd5b2 100644 --- a/cpp/test/IceBox/configuration/TestI.h +++ b/cpp/test/IceBox/configuration/TestI.h @@ -17,7 +17,7 @@ class TestI : public ::Test::TestIntf public: TestI(const Ice::StringSeq&); - + virtual std::string getProperty(ICE_IN(std::string), const Ice::Current&); virtual Ice::StringSeq getArgs(const Ice::Current&); diff --git a/cpp/test/IceDiscovery/simple/TestI.cpp b/cpp/test/IceDiscovery/simple/TestI.cpp index a2895254b2e..30505bcbb29 100644 --- a/cpp/test/IceDiscovery/simple/TestI.cpp +++ b/cpp/test/IceDiscovery/simple/TestI.cpp @@ -21,8 +21,8 @@ TestIntfI::getAdapterId(const Ice::Current& current) } void -ControllerI::activateObjectAdapter(ICE_IN(string) name, - ICE_IN(string) adapterId, +ControllerI::activateObjectAdapter(ICE_IN(string) name, + ICE_IN(string) adapterId, ICE_IN(string) replicaGroupId, const Ice::Current& current) { diff --git a/cpp/test/IceDiscovery/simple/TestI.h b/cpp/test/IceDiscovery/simple/TestI.h index 836c540bcfd..30dacd6ca7e 100644 --- a/cpp/test/IceDiscovery/simple/TestI.h +++ b/cpp/test/IceDiscovery/simple/TestI.h @@ -31,7 +31,7 @@ public: virtual void removeObject(ICE_IN(std::string), ICE_IN(std::string), const Ice::Current&); virtual void shutdown(const Ice::Current&); - + private: std::map<std::string, Ice::ObjectAdapterPtr> _adapters; diff --git a/cpp/test/IceGrid/allocation/Test.ice b/cpp/test/IceGrid/allocation/Test.ice index 3d58f60d3d1..8a5b7b0ee4e 100644 --- a/cpp/test/IceGrid/allocation/Test.ice +++ b/cpp/test/IceGrid/allocation/Test.ice @@ -15,7 +15,7 @@ module Test interface TestIntf { void shutdown(); - + string getProperty(string name); }; diff --git a/cpp/test/IceGrid/deployer/Server.cpp b/cpp/test/IceGrid/deployer/Server.cpp index 0178b862f6a..d01d3d8e6cc 100644 --- a/cpp/test/IceGrid/deployer/Server.cpp +++ b/cpp/test/IceGrid/deployer/Server.cpp @@ -39,7 +39,7 @@ Server::run(int argc, char* argv[]) adapter = communicator()->createObjectAdapter("ReplicatedAdapter"); adapter->activate(); } - + adapter = communicator()->createObjectAdapter("Server"); Ice::ObjectPtr object = new TestI(properties); adapter->add(object, Ice::stringToIdentity(name)); @@ -101,7 +101,7 @@ main(int argc, char* argv[]) char* value4 = getenv(varname2.c_str()); test(value4 != 0 && string(value4) == "2"); - + char* value5 = getenv("MY_UNIX_COMPOSED_VARIABLE"); test(value5 != 0 && string(value5) == "BAR;12"); #endif diff --git a/cpp/test/IceGrid/deployer/Test.ice b/cpp/test/IceGrid/deployer/Test.ice index 3d58f60d3d1..8a5b7b0ee4e 100644 --- a/cpp/test/IceGrid/deployer/Test.ice +++ b/cpp/test/IceGrid/deployer/Test.ice @@ -15,7 +15,7 @@ module Test interface TestIntf { void shutdown(); - + string getProperty(string name); }; diff --git a/cpp/test/IceGrid/deployer/application_with_templates.xml b/cpp/test/IceGrid/deployer/application_with_templates.xml index 78158a3d36f..dd1ad7e9feb 100644 --- a/cpp/test/IceGrid/deployer/application_with_templates.xml +++ b/cpp/test/IceGrid/deployer/application_with_templates.xml @@ -4,7 +4,7 @@ <!-- Include server templates --> <include descriptor="icebox.xml"/> - <include descriptor="server.xml"/> + <include descriptor="server.xml"/> <node name="localnode"> <server-instance template="IceBoxTemplate" name="IceBox1"/> diff --git a/cpp/test/IceGrid/deployer/icebox.xml b/cpp/test/IceGrid/deployer/icebox.xml index 471a54c3f4c..0cc16cd0e07 100644 --- a/cpp/test/IceGrid/deployer/icebox.xml +++ b/cpp/test/IceGrid/deployer/icebox.xml @@ -8,7 +8,7 @@ <parameter name="name"/> <parameter name="AppVarOverridedByParam"/> - <icebox id="${name}" exe="${icebox.exe}" activation="on-demand" pwd="."> + <icebox id="${name}" exe="${icebox.exe}" activation="on-demand" pwd="."> <service-instance template="ServiceTemplate" name="Service1" NodeVarOverridedByParam="Overrided"/> <service-instance template="SecondServiceTemplate" name="Service2"> <properties> @@ -18,7 +18,7 @@ <target name="moreservices"> <service-instance template="ServiceTemplate" name="Service3" NodeVarOverridedByParam="Overrided"/> </target> - + <service name="Service4" entry="TestService:create"> <adapter name="${service}" endpoints="default"> <object identity="${server}-${service}" type="::Test"/> @@ -28,7 +28,7 @@ <property name="${service}.Identity" value="${server}-${service}"/> </properties> </service> - + <properties> <properties refid="AppProperties"/> <properties refid="NodeProperties"/> diff --git a/cpp/test/IceGrid/deployer/varproperties.xml b/cpp/test/IceGrid/deployer/varproperties.xml index 9eeba2606bd..b59e8032d2b 100644 --- a/cpp/test/IceGrid/deployer/varproperties.xml +++ b/cpp/test/IceGrid/deployer/varproperties.xml @@ -6,7 +6,7 @@ <property name="AppVarDefinedInNodeProp" value="${AppVarDefinedInNode}"/> <property name="EscapedAppVarProp" value="${EscapedAppVar}"/> <property name="RecursiveEscapedAppVarProp" value="${RecursiveEscapedAppVar}"/> - <property name="Recursive2EscapedAppVarProp" value="${Recursive2EscapedAppVar}"/> + <property name="Recursive2EscapedAppVarProp" value="${Recursive2EscapedAppVar}"/> <property name="RecursiveNodeVarProp" value="${RecursiveNodeVar}"/> <property name="TestDirProp" value="${test.dir}"/> </icegrid> diff --git a/cpp/test/IceGrid/noRestartUpdate/Test.ice b/cpp/test/IceGrid/noRestartUpdate/Test.ice index 058760cbce9..f3eb7f88f9d 100644 --- a/cpp/test/IceGrid/noRestartUpdate/Test.ice +++ b/cpp/test/IceGrid/noRestartUpdate/Test.ice @@ -16,7 +16,7 @@ module Test interface TestIntf { void shutdown(); - + string getProperty(string name); }; diff --git a/cpp/test/IceGrid/update/Test.ice b/cpp/test/IceGrid/update/Test.ice index 7d6beb885cc..699db41e97a 100644 --- a/cpp/test/IceGrid/update/Test.ice +++ b/cpp/test/IceGrid/update/Test.ice @@ -15,7 +15,7 @@ module Test interface TestIntf { void shutdown(); - + string getProperty(string name); }; diff --git a/cpp/test/IceSSL/certs/makecerts.py b/cpp/test/IceSSL/certs/makecerts.py index aa60ddb3bdb..c79e8a8c614 100755 --- a/cpp/test/IceSSL/certs/makecerts.py +++ b/cpp/test/IceSSL/certs/makecerts.py @@ -111,7 +111,7 @@ certs = [ (ca1, "s_rsa_ca1_cn6", { "cn": "Server", "ip": "127.0.0.1" }), # IP subjectAltName 127.0.0.1 (ca1, "s_rsa_ca1_cn7", { "cn": "Server", "ip": "127.0.0.2" }), # IP subjectAltName 127.0.0.2 (ca1, "s_rsa_ca1_cn8", { "cn": "127.0.0.1" }), # No subjectAltName, CN=127.0.0.1 - + (ca2, "s_rsa_ca2", { "cn": "Server", "ip": "127.0.0.1", "dns": "server" }), (ca2, "c_rsa_ca2", { "cn": "Client", "ip": "127.0.0.1", "dns": "client" }), (dsaca, "s_dsa_ca1", { "cn": "Server", "ip": "127.0.0.1", "dns": "server" }), # DSA diff --git a/cpp/test/IceUtil/condvar/Match.cpp b/cpp/test/IceUtil/condvar/Match.cpp index 74924910658..5acb4bab3fb 100644 --- a/cpp/test/IceUtil/condvar/Match.cpp +++ b/cpp/test/IceUtil/condvar/Match.cpp @@ -126,7 +126,7 @@ main(int argc, char** argv) game.noise = false; } } - + { Mutex::Lock sync(game.mutex); game.state = StateGameOver; diff --git a/cpp/test/IceUtil/ctrlCHandler/Client.cpp b/cpp/test/IceUtil/ctrlCHandler/Client.cpp index 2eff49a6126..38e8753b66e 100644 --- a/cpp/test/IceUtil/ctrlCHandler/Client.cpp +++ b/cpp/test/IceUtil/ctrlCHandler/Client.cpp @@ -26,10 +26,10 @@ int main() cout << "First ignore CTRL+C and the like for 10 seconds (try it!)" << endl; CtrlCHandler handler; ThreadControl::sleep(Time::seconds(10)); - + cout << "Then handling them for another 30 seconds (try it)" << endl; handler.setCallback(callback); - ThreadControl::sleep(Time::seconds(10)); + ThreadControl::sleep(Time::seconds(10)); } cout << "And another 10 seconds after ~CtrlCHandler" << endl; ThreadControl::sleep(Time::seconds(10)); diff --git a/cpp/test/IceUtil/inputUtil/Client.cpp b/cpp/test/IceUtil/inputUtil/Client.cpp index c5a0227d063..191e7c3a6e9 100644 --- a/cpp/test/IceUtil/inputUtil/Client.cpp +++ b/cpp/test/IceUtil/inputUtil/Client.cpp @@ -116,7 +116,7 @@ main(int, char**) vector<string> args; test(IceUtilInternal::Options::split("").empty()); - + args = IceUtilInternal::Options::split("\"\""); test(args.size() == 1 && args[0] == ""); args = IceUtilInternal::Options::split("''"); diff --git a/cpp/test/IceUtil/priority/PriorityInversion.cpp b/cpp/test/IceUtil/priority/PriorityInversion.cpp index 233610ac457..40cd2924054 100644 --- a/cpp/test/IceUtil/priority/PriorityInversion.cpp +++ b/cpp/test/IceUtil/priority/PriorityInversion.cpp @@ -353,7 +353,7 @@ PriorityInversionTest::run() Monitor<Mutex> monitor; TaskCollectorPtr collector = new TaskCollector(cores, high, medium, low, monitor); vector<ThreadControl> threads; - + SharedResourcePtr shared = new SharedResourceMutex(collector); // diff --git a/cpp/test/IceUtil/priority/PriorityInversion.h b/cpp/test/IceUtil/priority/PriorityInversion.h index 258bade9686..50bb7c03c50 100644 --- a/cpp/test/IceUtil/priority/PriorityInversion.h +++ b/cpp/test/IceUtil/priority/PriorityInversion.h @@ -19,7 +19,7 @@ public: PriorityInversionTest(); private: - + virtual void run(); }; diff --git a/cpp/test/IceUtil/priority/ThreadPriority.cpp b/cpp/test/IceUtil/priority/ThreadPriority.cpp index 8df4819cafc..39420301553 100644 --- a/cpp/test/IceUtil/priority/ThreadPriority.cpp +++ b/cpp/test/IceUtil/priority/ThreadPriority.cpp @@ -18,7 +18,7 @@ using namespace IceUtil; class PriorityTestThread : public Thread { public: - + PriorityTestThread() : _priority(-1024) //Initialize to some strange value, so by default is not a valid priority { diff --git a/cpp/test/IceUtil/priority/ThreadPriority.h b/cpp/test/IceUtil/priority/ThreadPriority.h index 386184a02a7..4f2e9a1a5e6 100644 --- a/cpp/test/IceUtil/priority/ThreadPriority.h +++ b/cpp/test/IceUtil/priority/ThreadPriority.h @@ -19,7 +19,7 @@ public: ThreadPriorityTest(); private: - + virtual void run(); }; diff --git a/cpp/test/IceUtil/priority/TimerPriority.h b/cpp/test/IceUtil/priority/TimerPriority.h index a7f9513559f..71d3e3f64a9 100644 --- a/cpp/test/IceUtil/priority/TimerPriority.h +++ b/cpp/test/IceUtil/priority/TimerPriority.h @@ -19,7 +19,7 @@ public: TimerPriorityTest(); private: - + virtual void run(); }; diff --git a/cpp/test/IceUtil/sha1/Client.cpp b/cpp/test/IceUtil/sha1/Client.cpp index c73542e0e0c..a410b026e5b 100644 --- a/cpp/test/IceUtil/sha1/Client.cpp +++ b/cpp/test/IceUtil/sha1/Client.cpp @@ -39,7 +39,7 @@ SHA1Item items[] = "Nullam elit neque, suscipit ac convallis non, convallis et urna. " "Sed semper elementum erat, ut egestas lacus interdum sit amet. " "Sed ipsum nisi, ultricies congue augue id, euismod posuere sapien. " - "Fusce volutpat nisl in orci laoreet, vitae lacinia urna venenatis.", + "Fusce volutpat nisl in orci laoreet, vitae lacinia urna venenatis.", "84fac2d6a78ab4acbeae1408ab4de49c4bd145bb"}, {"Pellentesque accumsan mauris neque, nec sollicitudin metus ornare eu. " "Sed dignissim nisi neque, sit amet dapibus purus faucibus laoreet. " @@ -87,7 +87,7 @@ int main(int argc, char* argv[]) string digest = toHex(string(reinterpret_cast<const char*>(&buffer[0]), 20)); test(item->digest == digest); } - + for(int i = 0; i < itemsSize; ++i) { const SHA1Item* item = &items[i]; diff --git a/cpp/test/IceUtil/stacktrace/StackTrace.debug.Linux b/cpp/test/IceUtil/stacktrace/StackTrace.debug.Linux index 9a707e54af6..a090eb9e613 100644 --- a/cpp/test/IceUtil/stacktrace/StackTrace.debug.Linux +++ b/cpp/test/IceUtil/stacktrace/StackTrace.debug.Linux @@ -1,5 +1,5 @@ 0 IceUtil::Exception::Exception(char const*, int) in - 1 + 1 2 IceUtil::NullHandleException::NullHandleException(char const*, int) in client client diff --git a/cpp/test/IceUtil/thread/AliveTest.h b/cpp/test/IceUtil/thread/AliveTest.h index bbc0e1483dc..e13adbe43f5 100644 --- a/cpp/test/IceUtil/thread/AliveTest.h +++ b/cpp/test/IceUtil/thread/AliveTest.h @@ -19,7 +19,7 @@ public: AliveTest(); private: - + virtual void run(); }; diff --git a/cpp/test/IceUtil/thread/CountDownLatchTest.cpp b/cpp/test/IceUtil/thread/CountDownLatchTest.cpp index 32af5700bba..1e4c752c6ad 100644 --- a/cpp/test/IceUtil/thread/CountDownLatchTest.cpp +++ b/cpp/test/IceUtil/thread/CountDownLatchTest.cpp @@ -24,7 +24,7 @@ static const int magic = 0xbeef; class CountDownLatchTestThread : public Thread { public: - + CountDownLatchTestThread(CountDownLatch& latch, int& val, bool takeOne) : _latch(latch), _val(val), @@ -33,18 +33,18 @@ public: } virtual void run() - { + { if(_takeOne) { _latch.countDown(); } - + if(_latch.getCount() == 0) { test(_val == magic); } - + _latch.await(); test(_latch.getCount() == 0); test(_val == magic); @@ -53,7 +53,7 @@ public: private: CountDownLatch& _latch; - int& _val; + int& _val; bool _takeOne; }; @@ -81,7 +81,7 @@ CountDownLatchTest::run() t1[i] = new CountDownLatchTestThread(latch, val, false); t1[i]->start(); } - + // // Sleep a little bit, and check count // @@ -97,33 +97,33 @@ CountDownLatchTest::run() t2[i] = new CountDownLatchTestThread(latch, val, true); t2[i]->start(); } - + // // Sleep until count == 1 // do { ThreadControl::sleep(Time::milliSeconds(100)); - + for(i = 0; i < wave1Count; i++) { test(t1[i]->isAlive()); } - + for(i = 0; i < fullCount - 1; i++) { test(t2[i]->isAlive()); } } while(latch.getCount() > 1); - + // // Set val and release last count // val = magic; latch.countDown(); test(latch.getCount() == 0); - + // // Join them all // @@ -136,9 +136,9 @@ CountDownLatchTest::run() { t2[i]->getThreadControl().join(); } - + test(latch.getCount() == 0); - + const int wave2Count = 4; ThreadPtr t3[wave2Count]; for(i = 0; i < wave2Count; i++) @@ -147,7 +147,7 @@ CountDownLatchTest::run() t3[i]->start(); } test(latch.getCount() == 0); - + for(i = 0; i < wave2Count; i++) { t3[i]->getThreadControl().join(); diff --git a/cpp/test/IceUtil/thread/CountDownLatchTest.h b/cpp/test/IceUtil/thread/CountDownLatchTest.h index 6a85ecb1b56..97d40280a42 100644 --- a/cpp/test/IceUtil/thread/CountDownLatchTest.h +++ b/cpp/test/IceUtil/thread/CountDownLatchTest.h @@ -19,7 +19,7 @@ public: CountDownLatchTest(); private: - + virtual void run(); }; diff --git a/cpp/test/IceUtil/thread/CreateTest.h b/cpp/test/IceUtil/thread/CreateTest.h index bebb704e500..e9df38932f7 100644 --- a/cpp/test/IceUtil/thread/CreateTest.h +++ b/cpp/test/IceUtil/thread/CreateTest.h @@ -19,7 +19,7 @@ public: CreateTest(); private: - + virtual void run(); }; diff --git a/cpp/test/IceUtil/thread/MonitorMutexTest.cpp b/cpp/test/IceUtil/thread/MonitorMutexTest.cpp index 0ff96dd405f..d6b1db94864 100644 --- a/cpp/test/IceUtil/thread/MonitorMutexTest.cpp +++ b/cpp/test/IceUtil/thread/MonitorMutexTest.cpp @@ -18,7 +18,7 @@ using namespace IceUtil; class MonitorMutexTestThread : public Thread { public: - + MonitorMutexTestThread(Monitor<Mutex>& m) : _monitor(m), _tryLock(false) @@ -29,7 +29,7 @@ public: { Monitor<Mutex>::TryLock tlock(_monitor); test(!tlock.acquired()); - + { Mutex::Lock lock(_tryLockMutex); _tryLock = true; @@ -65,7 +65,7 @@ typedef Handle<MonitorMutexTestThread> MonitorMutexTestThreadPtr; class MonitorMutexTestThread2 : public Thread { public: - + MonitorMutexTestThread2(Monitor<Mutex>& monitor) : finished(false), _monitor(monitor) @@ -107,7 +107,7 @@ MonitorMutexTest::run() { Monitor<Mutex>::Lock lock(monitor); - + try { Monitor<Mutex>::TryLock tlock(monitor); @@ -124,7 +124,7 @@ MonitorMutexTest::run() // TEST: Start thread, try to acquire the mutex. t = new MonitorMutexTestThread(monitor); control = t->start(); - + // TEST: Wait until the tryLock has been tested. t->waitTryLock(); } @@ -143,7 +143,7 @@ MonitorMutexTest::run() // Give the thread time to start waiting. ThreadControl::sleep(Time::seconds(1)); - + { Monitor<Mutex>::Lock lock(monitor); monitor.notify(); diff --git a/cpp/test/IceUtil/thread/MonitorMutexTest.h b/cpp/test/IceUtil/thread/MonitorMutexTest.h index 597e78adfe5..6742da4d32a 100644 --- a/cpp/test/IceUtil/thread/MonitorMutexTest.h +++ b/cpp/test/IceUtil/thread/MonitorMutexTest.h @@ -19,7 +19,7 @@ public: MonitorMutexTest(); private: - + virtual void run(); }; diff --git a/cpp/test/IceUtil/thread/MonitorRecMutexTest.cpp b/cpp/test/IceUtil/thread/MonitorRecMutexTest.cpp index 37ac32d7995..49dd5946be6 100644 --- a/cpp/test/IceUtil/thread/MonitorRecMutexTest.cpp +++ b/cpp/test/IceUtil/thread/MonitorRecMutexTest.cpp @@ -18,7 +18,7 @@ using namespace IceUtil; class MonitorRecMutexTestThread : public Thread { public: - + MonitorRecMutexTestThread(Monitor<RecMutex>& m) : _monitor(m), _tryLock(false) @@ -27,10 +27,10 @@ public: virtual void run() { - + Monitor<RecMutex>::TryLock tlock(_monitor); test(!tlock.acquired()); - + { Mutex::Lock lock(_tryLockMutex); _tryLock = true; @@ -66,7 +66,7 @@ typedef Handle<MonitorRecMutexTestThread> MonitorRecMutexTestThreadPtr; class MonitorRecMutexTestThread2 : public Thread, public Monitor<RecMutex> { public: - + MonitorRecMutexTestThread2(Monitor<RecMutex>& monitor) : finished(false), _monitor(monitor) @@ -112,16 +112,16 @@ MonitorRecMutexTest::run() Monitor<RecMutex>::TryLock lock2(monitor); test(lock2.acquired()); - + // TEST: TryLock - + Monitor<RecMutex>::TryLock tlock(monitor); test(tlock.acquired()); - + // TEST: Start thread, try to acquire the mutex. t = new MonitorRecMutexTestThread(monitor); control = t->start(); - + // TEST: Wait until the tryLock has been tested. t->waitTryLock(); } diff --git a/cpp/test/IceUtil/thread/MonitorRecMutexTest.h b/cpp/test/IceUtil/thread/MonitorRecMutexTest.h index 41b05008e24..432284b748f 100644 --- a/cpp/test/IceUtil/thread/MonitorRecMutexTest.h +++ b/cpp/test/IceUtil/thread/MonitorRecMutexTest.h @@ -19,7 +19,7 @@ public: MonitorRecMutexTest(); private: - + virtual void run(); }; diff --git a/cpp/test/IceUtil/thread/MutexTest.cpp b/cpp/test/IceUtil/thread/MutexTest.cpp index 0b493e38524..d16d54e667d 100644 --- a/cpp/test/IceUtil/thread/MutexTest.cpp +++ b/cpp/test/IceUtil/thread/MutexTest.cpp @@ -20,7 +20,7 @@ static const string mutexTestName("mutex"); class MutexTestThread : public Thread { public: - + MutexTestThread(Mutex& m) : _mutex(m), _tryLock(false) @@ -28,7 +28,7 @@ public: } virtual void run() - { + { Mutex::TryLock tlock(_mutex); test(!tlock.acquired()); @@ -79,7 +79,7 @@ MutexTest::run() { Mutex::Lock lock(mutex); - // LockT testing: + // LockT testing: // test(lock.acquired()); @@ -117,7 +117,7 @@ MutexTest::run() { // Expected } - + Mutex::TryLock lock2(mutex); try { @@ -128,7 +128,7 @@ MutexTest::run() } lock2.release(); test(lock.tryAcquire() == true); - test(lock.acquired()); + test(lock.acquired()); // Deadlock testing // @@ -140,7 +140,7 @@ MutexTest::run() test(false); } catch(const ThreadLockedException&) - { + { // Expected } #endif @@ -148,7 +148,7 @@ MutexTest::run() // TEST: Start thread, try to acquire the mutex. t = new MutexTestThread(mutex); control = t->start(); - + // TEST: Wait until the tryLock has been tested. t->waitTryLock(); } diff --git a/cpp/test/IceUtil/thread/MutexTest.h b/cpp/test/IceUtil/thread/MutexTest.h index 8e08433d51c..aae25eadef2 100644 --- a/cpp/test/IceUtil/thread/MutexTest.h +++ b/cpp/test/IceUtil/thread/MutexTest.h @@ -19,7 +19,7 @@ public: MutexTest(); private: - + virtual void run(); }; diff --git a/cpp/test/IceUtil/thread/RecMutexTest.cpp b/cpp/test/IceUtil/thread/RecMutexTest.cpp index d28a60074fd..bf0cb09014a 100644 --- a/cpp/test/IceUtil/thread/RecMutexTest.cpp +++ b/cpp/test/IceUtil/thread/RecMutexTest.cpp @@ -20,7 +20,7 @@ static const string recMutexTestName("recursive mutex"); class RecMutexTestThread : public Thread { public: - + RecMutexTestThread(RecMutex& m) : _mutex(m), _tryLock(false) @@ -29,10 +29,10 @@ public: virtual void run() { - + RecMutex::TryLock tlock(_mutex); test(!tlock.acquired()); - + { Mutex::Lock lock(_tryLockMutex); _tryLock = true; @@ -79,21 +79,21 @@ RecMutexTest::run() { RecMutex::Lock lock(mutex); - + // TEST: lock twice RecMutex::Lock lock2(mutex); // TEST: TryLock RecMutex::TryLock lock3(mutex); test(lock3.acquired()); - + // TEST: Start thread, try to acquire the mutex. t = new RecMutexTestThread(mutex); control = t->start(); - + // TEST: Wait until the tryLock has been tested. t->waitTryLock(); - + } // @@ -102,5 +102,5 @@ RecMutexTest::run() // control.join(); - + } diff --git a/cpp/test/IceUtil/thread/RecMutexTest.h b/cpp/test/IceUtil/thread/RecMutexTest.h index ef348e07693..50c35e908e8 100644 --- a/cpp/test/IceUtil/thread/RecMutexTest.h +++ b/cpp/test/IceUtil/thread/RecMutexTest.h @@ -19,7 +19,7 @@ public: RecMutexTest(); private: - + virtual void run(); }; diff --git a/cpp/test/IceUtil/thread/SleepTest.h b/cpp/test/IceUtil/thread/SleepTest.h index 0ac7867366d..2d2274fedac 100644 --- a/cpp/test/IceUtil/thread/SleepTest.h +++ b/cpp/test/IceUtil/thread/SleepTest.h @@ -19,7 +19,7 @@ public: SleepTest(); private: - + virtual void run(); }; diff --git a/cpp/test/IceUtil/thread/StartTest.cpp b/cpp/test/IceUtil/thread/StartTest.cpp index 47d72cf6753..6f4f8d86941 100644 --- a/cpp/test/IceUtil/thread/StartTest.cpp +++ b/cpp/test/IceUtil/thread/StartTest.cpp @@ -22,7 +22,7 @@ static const string createTestName("thread start"); class StartTestThread : public Thread { public: - + StartTestThread() { } diff --git a/cpp/test/IceUtil/thread/StartTest.h b/cpp/test/IceUtil/thread/StartTest.h index ae7298cd09b..f8f97b3c58d 100644 --- a/cpp/test/IceUtil/thread/StartTest.h +++ b/cpp/test/IceUtil/thread/StartTest.h @@ -19,7 +19,7 @@ public: StartTest(); private: - + virtual void run(); }; diff --git a/cpp/test/IceUtil/unicode/coeur.utf8 b/cpp/test/IceUtil/unicode/coeur.utf8 index edb62666d39..d449e7d50fc 100755 --- a/cpp/test/IceUtil/unicode/coeur.utf8 +++ b/cpp/test/IceUtil/unicode/coeur.utf8 @@ -30,7 +30,7 @@ Le système valvulaire est composé des quatre [[valve cardiaque|valves cardiaqu === Vascularisation === Le cœur est vascularisé par les [[artère coronaire|artères coronaires]]. Il existe une [[artère coronaire gauche]] et une [[artère coronaire droite]]. Elles naissent précocement dans l'[[aorte]] ascendante, au niveau des valvules aortiques droite et gauche, dans les [[Sinus de Valsalva|sinus aortiques de Valsalva]]. L'artère coronaire droite longe le sillon coronaire droit jusqu'à atteindre le sillon interventriculaire postérieur. -L'artère coronaire gauche se divise en deux branches : circonflexe (qui se dirige postérieurement), et [[artère interventriculaire antérieure|interventriculaire antérieure]] (le long du sillon interventriculaire antérieur jusqu'à l'apex). +L'artère coronaire gauche se divise en deux branches : circonflexe (qui se dirige postérieurement), et [[artère interventriculaire antérieure|interventriculaire antérieure]] (le long du sillon interventriculaire antérieur jusqu'à l'apex). <br>Les artères coronaires cheminent dans le tissu adipeux sous-épicardique et leur circulation est dite diastolique. Ces sont des artères terminales, ce qui signifie qu'une obstruction aura une répercussion immédiate sur le fonctionnement de l'organe, du fait d'une absence d'[[anastomose (anatomie)|anastomoses]]. Le retour veineux s'effectue principalement par la grande et la moyenne veine du cœur, s'abouchant dans le [[sinus coronaire (cœur)|sinus coronaire]] qui rejoint directement l'[[oreillette (anatomie)|atrium droit]] via la [[valvule de Thebesius]]. @@ -85,7 +85,7 @@ Le tissu conducteur constitue l'élément de contrôle du fonctionnement du cœu == Embryologie == {{Article détaillé|Embryologie cardiaque}} === Généralités === -Le cœur est le {{1er}} organe à se développer. Il est nécessaire à l'embryon dès la {{3e}} semaine de gestation pour perfuser les tissus, il commencera donc à battre avant même d'avoir acquis sa forme définitive. +Le cœur est le {{1er}} organe à se développer. Il est nécessaire à l'embryon dès la {{3e}} semaine de gestation pour perfuser les tissus, il commencera donc à battre avant même d'avoir acquis sa forme définitive. Le cœur dérive des angioblastes. À la {{3e}} semaine, des cellules épiblastiques vont traverser le nœud de Hensen et se rassembler au niveau de la zone cardiogénique. Cette zone cardiogénique est très antérieure, elle se situe à l'apex de l'embryon. C'est avec le développement du système nerveux qui va pousser l'embryon à se recroqueviller, que la zone cardiogénique sera rejetée en dedans et trouvera sa place au niveau de la future gorge de l'embryon. Le cœur devra donc migrer ensuite de la gorge vers sa position définitive dans le médiastin. === Tube endocardique === @@ -179,7 +179,7 @@ Il existe actuellement des substances chimiques capables de stimuler ou d'inhibe * l'[[œdème aigu pulmonaire]] et le [[choc cardiogénique]] sont les deux manifestations liées à un dysfonctionnement aigu du cœur. ==== Arrêt cardio-circulatoire ==== -L'[[Arrêt cardio-circulatoire|arrêt cardiaque]] est une [[Urgences|urgence médicale]] absolue. Il se manifeste par un état dit de « mort apparente » : +L'[[Arrêt cardio-circulatoire|arrêt cardiaque]] est une [[Urgences|urgence médicale]] absolue. Il se manifeste par un état dit de « mort apparente » : # inconscience : c'est-à-dire l'absence de réaction à la douleur ou à un ordre verbal simple, # l'arrêt de la [[ventilation pulmonaire|respiration]], que l'on peut constater en observant l'absence de mouvement de la poitrine et l'absence de tout bruit respiratoire, # et abolition des pouls, en particulier, carotidien (ce point ne constitue pas un élément fiable : avec le ''[[stress]]'', la personne cherchant à prendre le pouls sent parfois son propre pouls au bout des doigts). @@ -255,7 +255,7 @@ Mathématiquement un cœur peut être représenté par l'équation <math>(x^2+y^ == Liens externes == {{Autres projets |wiktionary=cœur -|wikiquote=Cœur +|wikiquote=Cœur |commons=Category:Hearts }} diff --git a/cpp/test/IceUtil/uuid/Client.cpp b/cpp/test/IceUtil/uuid/Client.cpp index 411fc88e181..0a5ceae5537 100644 --- a/cpp/test/IceUtil/uuid/Client.cpp +++ b/cpp/test/IceUtil/uuid/Client.cpp @@ -53,9 +53,9 @@ inline void usage(const char* myName) template<typename T, typename GenerateFunc> class InsertThread : public Thread { public: - + typedef set<T> ItemSet; - + InsertThread(int threadId, ItemSet& itemSet, GenerateFunc func, long howMany, bool verbose) : _threadId(threadId), _itemSet(itemSet), _func(func), _howMany(howMany), _verbose(verbose) { @@ -79,7 +79,7 @@ public: if(_verbose && i > 0 && (i % 100000 == 0)) { - cout << "Thread " << _threadId << ": generated " << i << " UUIDs." << endl; + cout << "Thread " << _threadId << ": generated " << i << " UUIDs." << endl; } } } @@ -142,7 +142,7 @@ runTest(int threadCount, GenerateFunc func, long howMany, bool verbose, string n cout << "s"; } cout << "... "; - + if(verbose) { cout << endl; @@ -153,13 +153,13 @@ runTest(int threadCount, GenerateFunc func, long howMany, bool verbose, string n } set<T> itemSet; - + vector<ThreadControl> threads; Time start = Time::now(); for(int i = 0; i < threadCount; i++) { - ThreadPtr t = new InsertThread<T, GenerateFunc>(i, itemSet, func, howMany / threadCount, verbose); + ThreadPtr t = new InsertThread<T, GenerateFunc>(i, itemSet, func, howMany / threadCount, verbose); threads.push_back(t->start()); } for(vector<ThreadControl>::iterator p = threads.begin(); p != threads.end(); ++p) @@ -172,9 +172,9 @@ runTest(int threadCount, GenerateFunc func, long howMany, bool verbose, string n if(verbose) { - cout << "Each " << name << " took an average of " - << (double) ((finish - start).toMicroSeconds()) / howMany - << " micro seconds to generate and insert into a set." + cout << "Each " << name << " took an average of " + << (double) ((finish - start).toMicroSeconds()) / howMany + << " micro seconds to generate and insert into a set." << endl; } } diff --git a/cpp/test/Slice/errorDetection/CaseInsensitive.ice b/cpp/test/Slice/errorDetection/CaseInsensitive.ice index e8a68d19c3b..2da44702f2e 100644 --- a/cpp/test/Slice/errorDetection/CaseInsensitive.ice +++ b/cpp/test/Slice/errorDetection/CaseInsensitive.ice @@ -279,35 +279,35 @@ module DI void aa(int AA); void xx(int base); }; - + class base1 { int base1; void aa(int BASE1); - + void bb(int base1, string BASE1); }; - + struct Foo { int foo; }; - + struct Foo1 { int Foo1; }; - + exception Bar { string bar; }; - + exception Bar1 { string Bar1; }; - + class base2 { int X; @@ -317,7 +317,7 @@ module DI { string x; }; - + }; }; diff --git a/cpp/test/Slice/errorDetection/IllegalMI.ice b/cpp/test/Slice/errorDetection/IllegalMI.ice index 4607da96a3d..bec2be86286 100644 --- a/cpp/test/Slice/errorDetection/IllegalMI.ice +++ b/cpp/test/Slice/errorDetection/IllegalMI.ice @@ -853,7 +853,7 @@ module M26 interface D0 { // \ / // void id0(); // A4 // }; - + interface A1 extends A0, B0 { void ia1(); @@ -873,27 +873,27 @@ module M26 { void ia2(); }; - + interface B2 extends A1 { void ib2(); }; - + interface C2 extends B1 { void ic2(); }; - + interface D2 extends B1, C1 { void id2(); }; - + interface A3 extends A2, B2 { void ia3(); }; - + interface B3 extends C2, D2 { void ib3(); @@ -927,7 +927,7 @@ module M27 interface D0 { // \ / // void id0(); // A4 // }; - + interface A1 extends A0, B0 { void ia1(); @@ -947,27 +947,27 @@ module M27 { void ia2(); void op(); }; - + interface B2 extends A1 { void ib2(); }; - + interface C2 extends B1 { void ic2(); }; - + interface D2 extends B1, C1 { void id2(); }; - + interface A3 extends A2, B2 { void ia3(); }; - + interface B3 extends C2, D2 { void ib3(); @@ -1001,7 +1001,7 @@ module M28 interface D0 { // \ / // void id0(); // A4 // }; - + interface A1 extends A0, B0 { void ia1(); @@ -1021,27 +1021,27 @@ module M28 { void ia2(); }; - + interface B2 extends A1 { void ib2(); }; - + interface C2 extends B1 { void ic2(); }; - + interface D2 extends B1, C1 { void id2(); }; - + interface A3 extends A2, B2 { void ia3(); }; - + interface B3 extends C2, D2 { void ib3(); @@ -1075,7 +1075,7 @@ module M29 interface D0 { // \ / // void id0(); void op(); // A4 // }; - + interface A1 extends A0, B0 { void ia1(); @@ -1095,27 +1095,27 @@ module M29 { void ia2(); }; - + interface B2 extends A1 { void ib2(); }; - + interface C2 extends B1 { void ic2(); }; - + interface D2 extends B1, C1 { void id2(); }; - + interface A3 extends A2, B2 { void ia3(); }; - + interface B3 extends C2, D2 { void ib3(); @@ -1147,7 +1147,7 @@ module M30 interface D0 { // \ / // void id0(); // A4 // }; - + interface A1 extends A0, B0 { void ia1(); @@ -1167,27 +1167,27 @@ module M30 { void ia2(); }; - + interface B2 extends A1 { void ib2(); }; - + interface C2 extends B1 { void ic2(); }; - + interface D2 extends B1, C1 { void id2(); }; - + interface A3 extends A2, B2 { void ia3(); }; - + interface B3 extends C2, D2 { void ib3(); @@ -1219,7 +1219,7 @@ module M31 interface D0 { // \ / // void id0(); // A4 // }; - + interface A1 extends A0, B0 { void ia1(); void op(); @@ -1239,27 +1239,27 @@ module M31 { void ia2(); }; - + interface B2 extends A1 { void ib2(); }; - + interface C2 extends B1 { void ic2(); }; - + interface D2 extends B1, C1 { void id2(); }; - + interface A3 extends A2, B2 { void ia3(); }; - + interface B3 extends C2, D2 { void ib3(); diff --git a/cpp/test/Slice/errorDetection/IllegalUseOfKeyword.ice b/cpp/test/Slice/errorDetection/IllegalUseOfKeyword.ice index a931dfd75b4..e0d0c02e19b 100644 --- a/cpp/test/Slice/errorDetection/IllegalUseOfKeyword.ice +++ b/cpp/test/Slice/errorDetection/IllegalUseOfKeyword.ice @@ -40,7 +40,7 @@ interface extends interface Foo { void implements(); - + int bar(string throws, long l, out bool void, out short s); int bar2(string s, long byte, out bool b, out short short); diff --git a/cpp/test/Slice/errorDetection/WarningInvalidMetaData.ice b/cpp/test/Slice/errorDetection/WarningInvalidMetaData.ice index 8e50bb7a6a6..7017e6db92e 100644 --- a/cpp/test/Slice/errorDetection/WarningInvalidMetaData.ice +++ b/cpp/test/Slice/errorDetection/WarningInvalidMetaData.ice @@ -35,16 +35,16 @@ interface I { ["cpp:noexcept"] void op(); - + ["cpp:type:std::list< ::std::string>"] void op1(); - + ["cpp:view-type:std::experimental::string_view"] void op2(); - + ["cpp:array"] void op3(); - + ["cpp:range"] void op4(); }; diff --git a/cpp/test/Slice/errorDetection/WarningSuppressInvalidMetaData.ice b/cpp/test/Slice/errorDetection/WarningSuppressInvalidMetaData.ice index 60e47c7e73e..7659edae2b2 100644 --- a/cpp/test/Slice/errorDetection/WarningSuppressInvalidMetaData.ice +++ b/cpp/test/Slice/errorDetection/WarningSuppressInvalidMetaData.ice @@ -37,16 +37,16 @@ interface I { ["cpp:noexcept"] void op(); - + ["cpp:type:std::list< ::std::string>"] void op1(); - + ["cpp:view-type:std::experimental::string_view"] void op2(); - + ["cpp:array"] void op3(); - + ["cpp:range"] void op4(); }; diff --git a/cpp/test/Slice/escape/Clash.ice b/cpp/test/Slice/escape/Clash.ice index a11ad1e11f5..ec95676d7bc 100644 --- a/cpp/test/Slice/escape/Clash.ice +++ b/cpp/test/Slice/escape/Clash.ice @@ -25,9 +25,9 @@ interface Intf void inS(); void istr(); - void op(string context, string current, string response, string ex, string sent, string cookie, + void op(string context, string current, string response, string ex, string sent, string cookie, string sync, string result, string istr, string ostr, optional(1) string proxy); - void opOut(out string context, out string current, out string response, out string ex, + void opOut(out string context, out string current, out string response, out string ex, out string sent, out string cookie, out string sync, out string result, out string istr, out string ostr, out optional(1) string proxy); }; diff --git a/cpp/test/Slice/escape/Client.cpp b/cpp/test/Slice/escape/Client.cpp index 1c2c3093330..c0d993f599c 100644 --- a/cpp/test/Slice/escape/Client.cpp +++ b/cpp/test/Slice/escape/Client.cpp @@ -67,7 +67,7 @@ public: virtual void caseAsync(int, ::std::function<void(int)>, ::std::function<void(::std::exception_ptr)>, - const ::Ice::Current&) + const ::Ice::Current&) { } #else diff --git a/cpp/test/Slice/structure/Client.cpp b/cpp/test/Slice/structure/Client.cpp index 08df7ace7c7..5e6754c3666 100644 --- a/cpp/test/Slice/structure/Client.cpp +++ b/cpp/test/Slice/structure/Client.cpp @@ -51,7 +51,7 @@ allTests(const Ice::CommunicatorPtr& communicator) // cpp:comparable required by tests bellow is only // supported with C++98 mapping. // - + // // Change one primitive member at a time. // diff --git a/cpp/test/ios/controller/Classes/ViewController.m b/cpp/test/ios/controller/Classes/ViewController.m index 158df2a630d..ded9990a842 100644 --- a/cpp/test/ios/controller/Classes/ViewController.m +++ b/cpp/test/ios/controller/Classes/ViewController.m @@ -29,7 +29,7 @@ const char* bundle = "Cpp98ControllerBundle.bundle"; #endif bundlePath = [bundlePath stringByAppendingPathComponent:[NSString stringWithUTF8String:bundle]]; - + NSURL* bundleURL = [NSURL fileURLWithPath:bundlePath]; CFBundleRef handle = CFBundleCreate(NULL, (CFURLRef)bundleURL); if(!handle) @@ -37,7 +37,7 @@ [self println:[NSString stringWithFormat:@"Could not find bundle %@", bundlePath]]; return; } - + CFErrorRef error = nil; Boolean loaded = CFBundleLoadExecutableAndReturnError(handle, &error); if(error != nil || !loaded) @@ -45,7 +45,7 @@ [self println:[(__bridge NSError *)error description]]; return; } - + startController = CFBundleGetFunctionPointerForName(handle, CFSTR("startController")); if(startController == 0) { @@ -54,7 +54,7 @@ [self println:err]; return; } - + stopController = CFBundleGetFunctionPointerForName(handle, CFSTR("stopController")); if(stopController == 0) { @@ -63,7 +63,7 @@ [self println:err]; return; } - + // // Search for local network interfaces // diff --git a/cpp/test/uwp/controller/App.xaml.h b/cpp/test/uwp/controller/App.xaml.h index ea1bef58291..354d2726504 100644 --- a/cpp/test/uwp/controller/App.xaml.h +++ b/cpp/test/uwp/controller/App.xaml.h @@ -21,7 +21,7 @@ ref class App sealed public: App(); virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs) override; - + private: void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e); }; diff --git a/cpp/test/uwp/controller/StandardStyles.xaml b/cpp/test/uwp/controller/StandardStyles.xaml index 81fb398ea20..c6447dce77b 100644 --- a/cpp/test/uwp/controller/StandardStyles.xaml +++ b/cpp/test/uwp/controller/StandardStyles.xaml @@ -13,7 +13,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <!-- Non-brush values that vary across themes --> - + <ResourceDictionary.ThemeDictionaries> <ResourceDictionary x:Key="Default"> <x:String x:Key="BackButtonGlyph"></x:String> @@ -423,7 +423,7 @@ </Style> <!-- Standard App Bar buttons --> - + <Style x:Key="SkipBackAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}"> <Setter Property="AutomationProperties.AutomationId" Value="SkipBackAppBarButton"/> <Setter Property="AutomationProperties.Name" Value="Skip Back"/> @@ -714,7 +714,7 @@ <!-- SnappedBackButtonStyle is used to style a Button for use in the title area of a snapped page. Margins appropriate for the conventional page layout are included as part of the style. - + The obvious duplication here is necessary as the glyphs used in snapped are not merely smaller versions of the same glyph but are actually distinct. --> @@ -968,8 +968,8 @@ <TextBlock Text="{Binding Title}" TextWrapping="NoWrap" Style="{StaticResource BodyTextStyle}"/> <TextBlock Text="{Binding Description}" MaxHeight="140" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" Style="{StaticResource BodyTextStyle}"/> </StackPanel> - </Grid> - </ToolTip> + </Grid> + </ToolTip> </ToolTipService.ToolTip> </Grid> </DataTemplate> diff --git a/cpp/test/uwp/controller/ViewController.xaml b/cpp/test/uwp/controller/ViewController.xaml index cfac024447e..9ea1c4d9beb 100644 --- a/cpp/test/uwp/controller/ViewController.xaml +++ b/cpp/test/uwp/controller/ViewController.xaml @@ -15,14 +15,14 @@ <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <StackPanel Grid.Row="0"> - <TextBlock Text="ZeroC - UWP Controller" - Style="{StaticResource TitleStyle}" - Margin="5" + <TextBlock Text="ZeroC - UWP Controller" + Style="{StaticResource TitleStyle}" + Margin="5" VerticalAlignment="Bottom" TextWrapping="Wrap"/> </StackPanel> <ListBox Margin="5" Grid.Row="1" x:Name="Output" Background="LightGray"></ListBox> <StackPanel Grid.Row="3" VerticalAlignment="Bottom"> - <TextBlock Text="Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved." + <TextBlock Text="Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved." Style="{StaticResource FooterStyle}" Margin="5" TextWrapping="Wrap"/> diff --git a/cpp/test/uwp/controller/ViewController.xaml.cpp b/cpp/test/uwp/controller/ViewController.xaml.cpp index 7862969546d..1ef4f5797f1 100644 --- a/cpp/test/uwp/controller/ViewController.xaml.cpp +++ b/cpp/test/uwp/controller/ViewController.xaml.cpp @@ -257,7 +257,7 @@ MainHelperI::waitReady(int timeout) const unique_lock<mutex> lock(_mutex); while(!_ready && !_completed) { - + if(_condition.wait_for(lock, chrono::seconds(timeout)) == cv_status::timeout) { throw ProcessFailedException("timed out waiting for the process to be ready"); @@ -323,7 +323,7 @@ ProcessControllerI::ProcessControllerI(ViewController^ controller, string hostna shared_ptr<ProcessPrx> ProcessControllerI::start(string testSuite, string exe, StringSeq args, const Ice::Current& c) -{ +{ ostringstream os; os << "starting " << testSuite << " " << exe << "... "; _controller->println(os.str()); |