diff --git a/cpp/include/Ice/Instrumentation.h b/cpp/include/Ice/Instrumentation.h
index af10c8246c2..5b3e936399b 100644
--- a/cpp/include/Ice/Instrumentation.h
+++ b/cpp/include/Ice/Instrumentation.h
@@ -1,65 +1,18 @@
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
-//
-// Ice version 3.7.10
-//
-//
-//
-// Generated from file `Instrumentation.ice'
-//
-// Warning: do not edit this file.
-//
-//
-//
-
-#ifndef __Ice_Instrumentation_h__
-#define __Ice_Instrumentation_h__
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#ifndef ICE_IGNORE_VERSION
-# if ICE_INT_VERSION / 100 != 307
-# error Ice version mismatch!
-# endif
-# if ICE_INT_VERSION % 100 >= 50
-# error Beta header file detected
-# endif
-# if ICE_INT_VERSION % 100 < 10
-# error Ice patch level mismatch!
-# endif
-#endif
-
-#ifndef ICE_API
-# if defined(ICE_STATIC_LIBS)
-# define ICE_API /**/
-# elif defined(ICE_API_EXPORTS)
-# define ICE_API ICE_DECLSPEC_EXPORT
-# else
-# define ICE_API ICE_DECLSPEC_IMPORT
-# endif
-#endif
-
-#ifdef ICE_CPP11_MAPPING // C++11 mapping
-
-namespace Ice
-{
+#ifndef ICE_INSTRUMENTATION_H
+#define ICE_INSTRUMENTATION_H
+#include "Config.h"
+#include "ConnectionF.h"
+#include "Current.h"
+#include "EndpointF.h"
+#include "ObjectAdapterF.h"
+#include
-namespace Instrumentation
+namespace Ice::Instrumentation
{
class Observer;
@@ -73,15 +26,25 @@ class InvocationObserver;
class ObserverUpdater;
class CommunicatorObserver;
-}
+using ObserverPtr = std::shared_ptr;
-}
+using ThreadObserverPtr = std::shared_ptr;
-namespace Ice
-{
+using ConnectionObserverPtr = std::shared_ptr;
-namespace Instrumentation
-{
+using DispatchObserverPtr = std::shared_ptr;
+
+using ChildInvocationObserverPtr = std::shared_ptr;
+
+using RemoteObserverPtr = std::shared_ptr;
+
+using CollocatedObserverPtr = std::shared_ptr;
+
+using InvocationObserverPtr = std::shared_ptr;
+
+using ObserverUpdaterPtr = std::shared_ptr;
+
+using CommunicatorObserverPtr = std::shared_ptr;
/**
* The thread state enumeration keeps track of the different possible states of Ice threads.
@@ -136,16 +99,6 @@ enum class ConnectionState : unsigned char
ConnectionStateClosed
};
-}
-
-}
-
-namespace Ice
-{
-
-namespace Instrumentation
-{
-
/**
* The object observer interface used by instrumented objects to notify the observer of their existence.
* \headerfile Ice/Ice.h
@@ -180,7 +133,7 @@ class ICE_CLASS(ICE_API) Observer
* threads used by the Ice core.
* \headerfile Ice/Ice.h
*/
-class ICE_CLASS(ICE_API) ThreadObserver : public virtual ::Ice::Instrumentation::Observer
+class ICE_CLASS(ICE_API) ThreadObserver : public virtual Observer
{
public:
@@ -198,7 +151,7 @@ class ICE_CLASS(ICE_API) ThreadObserver : public virtual ::Ice::Instrumentation:
* The connection observer interface to instrument Ice connections.
* \headerfile Ice/Ice.h
*/
-class ICE_CLASS(ICE_API) ConnectionObserver : public virtual ::Ice::Instrumentation::Observer
+class ICE_CLASS(ICE_API) ConnectionObserver : public virtual Observer
{
public:
@@ -221,7 +174,7 @@ class ICE_CLASS(ICE_API) ConnectionObserver : public virtual ::Ice::Instrumentat
* The dispatch observer to instrument servant dispatch.
* \headerfile Ice/Ice.h
*/
-class ICE_CLASS(ICE_API) DispatchObserver : public virtual ::Ice::Instrumentation::Observer
+class ICE_CLASS(ICE_API) DispatchObserver : public virtual Observer
{
public:
@@ -243,7 +196,7 @@ class ICE_CLASS(ICE_API) DispatchObserver : public virtual ::Ice::Instrumentatio
* The child invocation observer to instrument remote or collocated invocations.
* \headerfile Ice/Ice.h
*/
-class ICE_CLASS(ICE_API) ChildInvocationObserver : public virtual ::Ice::Instrumentation::Observer
+class ICE_CLASS(ICE_API) ChildInvocationObserver : public virtual Observer
{
public:
@@ -260,7 +213,7 @@ class ICE_CLASS(ICE_API) ChildInvocationObserver : public virtual ::Ice::Instrum
* The remote observer to instrument invocations that are sent over the wire.
* \headerfile Ice/Ice.h
*/
-class ICE_CLASS(ICE_API) RemoteObserver : public virtual ::Ice::Instrumentation::ChildInvocationObserver
+class ICE_CLASS(ICE_API) RemoteObserver : public virtual ChildInvocationObserver
{
public:
@@ -271,7 +224,7 @@ class ICE_CLASS(ICE_API) RemoteObserver : public virtual ::Ice::Instrumentation:
* The collocated observer to instrument invocations that are collocated.
* \headerfile Ice/Ice.h
*/
-class ICE_CLASS(ICE_API) CollocatedObserver : public virtual ::Ice::Instrumentation::ChildInvocationObserver
+class ICE_CLASS(ICE_API) CollocatedObserver : public virtual ChildInvocationObserver
{
public:
@@ -283,7 +236,7 @@ class ICE_CLASS(ICE_API) CollocatedObserver : public virtual ::Ice::Instrumentat
* or remote invocation. If it results in a remote invocation, a sub-observer is requested for the remote invocation.
* \headerfile Ice/Ice.h
*/
-class ICE_CLASS(ICE_API) InvocationObserver : public virtual ::Ice::Instrumentation::Observer
+class ICE_CLASS(ICE_API) InvocationObserver : public virtual Observer
{
public:
@@ -307,7 +260,7 @@ class ICE_CLASS(ICE_API) InvocationObserver : public virtual ::Ice::Instrumentat
* @param size The size of the invocation.
* @return The observer to instrument the remote invocation.
*/
- virtual ::std::shared_ptr<::Ice::Instrumentation::RemoteObserver> getRemoteObserver(const ::std::shared_ptr<::Ice::ConnectionInfo>& con, const ::std::shared_ptr<::Ice::Endpoint>& endpt, int requestId, int size) = 0;
+ virtual RemoteObserverPtr getRemoteObserver(const Ice::ConnectionInfoPtr& con, const Ice::EndpointPtr& endpt, int requestId, int size) = 0;
/**
* Get a collocated observer for this invocation.
@@ -316,7 +269,7 @@ class ICE_CLASS(ICE_API) InvocationObserver : public virtual ::Ice::Instrumentat
* @param size The size of the invocation.
* @return The observer to instrument the collocated invocation.
*/
- virtual ::std::shared_ptr<::Ice::Instrumentation::CollocatedObserver> getCollocatedObserver(const ::std::shared_ptr<::Ice::ObjectAdapter>& adapter, int requestId, int size) = 0;
+ virtual CollocatedObserverPtr getCollocatedObserver(const Ice::ObjectAdapterPtr& adapter, int requestId, int size) = 0;
};
/**
@@ -373,640 +326,7 @@ class ICE_CLASS(ICE_API) CommunicatorObserver
* connect to.
* @return The observer to instrument the connection establishment.
*/
- virtual ::std::shared_ptr<::Ice::Instrumentation::Observer> getConnectionEstablishmentObserver(const ::std::shared_ptr<::Ice::Endpoint>& endpt, const ::std::string& connector) = 0;
-
- /**
- * This method should return an observer for the given endpoint information. The Ice run-time calls this method to
- * resolve an endpoint and obtain the list of connectors. For IP endpoints, this typically involves doing a DNS
- * lookup to obtain the IP addresses associated with the DNS name.
- * @param endpt The endpoint.
- * @return The observer to instrument the endpoint lookup.
- */
- virtual ::std::shared_ptr<::Ice::Instrumentation::Observer> getEndpointLookupObserver(const ::std::shared_ptr<::Ice::Endpoint>& endpt) = 0;
-
- /**
- * This method should return a connection observer for the given connection. The Ice run-time calls this method
- * for each new connection and for all the Ice communicator connections when
- * {@link ObserverUpdater#updateConnectionObservers} is called.
- * @param c The connection information.
- * @param e The connection endpoint.
- * @param s The state of the connection.
- * @param o The old connection observer if one is already set or a null reference otherwise.
- * @return The connection observer to instrument the connection.
- */
- virtual ::std::shared_ptr<::Ice::Instrumentation::ConnectionObserver> getConnectionObserver(const ::std::shared_ptr<::Ice::ConnectionInfo>& c, const ::std::shared_ptr<::Ice::Endpoint>& e, ConnectionState s, const ::std::shared_ptr& o) = 0;
-
- /**
- * This method should return a thread observer for the given thread. The Ice run-time calls this method for each
- * new thread and for all the Ice communicator threads when {@link ObserverUpdater#updateThreadObservers} is
- * called.
- * @param parent The parent of the thread.
- * @param id The ID of the thread to observe.
- * @param s The state of the thread.
- * @param o The old thread observer if one is already set or a null reference otherwise.
- * @return The thread observer to instrument the thread.
- */
- virtual ::std::shared_ptr<::Ice::Instrumentation::ThreadObserver> getThreadObserver(const ::std::string& parent, const ::std::string& id, ThreadState s, const ::std::shared_ptr& o) = 0;
-
- /**
- * This method should return an invocation observer for the given invocation. The Ice run-time calls this method
- * for each new invocation on a proxy.
- * @param prx The proxy used for the invocation.
- * @param operation The name of the operation.
- * @param ctx The context specified by the user.
- * @return The invocation observer to instrument the invocation.
- */
- virtual ::std::shared_ptr<::Ice::Instrumentation::InvocationObserver> getInvocationObserver(const ::std::shared_ptr<::Ice::ObjectPrx>& prx, const ::std::string& operation, const ::Ice::Context& ctx) = 0;
-
- /**
- * This method should return a dispatch observer for the given dispatch. The Ice run-time calls this method each
- * time it receives an incoming invocation to be dispatched for an Ice object.
- * @param c The current object as provided to the Ice servant dispatching the invocation.
- * @param size The size of the dispatch.
- * @return The dispatch observer to instrument the dispatch.
- */
- virtual ::std::shared_ptr<::Ice::Instrumentation::DispatchObserver> getDispatchObserver(const ::Ice::Current& c, int size) = 0;
-
- /**
- * The Ice run-time calls this method when the communicator is initialized. The add-in implementing this
- * interface can use this object to get the Ice run-time to re-obtain observers for observed objects.
- * @param updater The observer updater object.
- */
- virtual void setObserverUpdater(const ::std::shared_ptr& updater) = 0;
-};
-
-}
-
-}
-
-/// \cond STREAM
-namespace Ice
-{
-
-}
-/// \endcond
-
-/// \cond INTERNAL
-namespace Ice
-{
-
-/// \cond INTERNAL
-namespace Instrumentation
-{
-
-using ObserverPtr = ::std::shared_ptr;
-
-using ThreadObserverPtr = ::std::shared_ptr;
-
-using ConnectionObserverPtr = ::std::shared_ptr;
-
-using DispatchObserverPtr = ::std::shared_ptr;
-
-using ChildInvocationObserverPtr = ::std::shared_ptr;
-
-using RemoteObserverPtr = ::std::shared_ptr;
-
-using CollocatedObserverPtr = ::std::shared_ptr;
-
-using InvocationObserverPtr = ::std::shared_ptr;
-
-using ObserverUpdaterPtr = ::std::shared_ptr;
-
-using CommunicatorObserverPtr = ::std::shared_ptr;
-
-}
-/// \endcond
-
-}
-/// \endcond
-
-#else // C++98 mapping
-
-namespace Ice
-{
-
-namespace Instrumentation
-{
-
-class Observer;
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* upCast(Observer*);
-/// \endcond
-typedef ::IceInternal::Handle< Observer> ObserverPtr;
-
-class ThreadObserver;
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* upCast(ThreadObserver*);
-/// \endcond
-typedef ::IceInternal::Handle< ThreadObserver> ThreadObserverPtr;
-
-class ConnectionObserver;
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* upCast(ConnectionObserver*);
-/// \endcond
-typedef ::IceInternal::Handle< ConnectionObserver> ConnectionObserverPtr;
-
-class DispatchObserver;
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* upCast(DispatchObserver*);
-/// \endcond
-typedef ::IceInternal::Handle< DispatchObserver> DispatchObserverPtr;
-
-class ChildInvocationObserver;
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* upCast(ChildInvocationObserver*);
-/// \endcond
-typedef ::IceInternal::Handle< ChildInvocationObserver> ChildInvocationObserverPtr;
-
-class RemoteObserver;
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* upCast(RemoteObserver*);
-/// \endcond
-typedef ::IceInternal::Handle< RemoteObserver> RemoteObserverPtr;
-
-class CollocatedObserver;
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* upCast(CollocatedObserver*);
-/// \endcond
-typedef ::IceInternal::Handle< CollocatedObserver> CollocatedObserverPtr;
-
-class InvocationObserver;
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* upCast(InvocationObserver*);
-/// \endcond
-typedef ::IceInternal::Handle< InvocationObserver> InvocationObserverPtr;
-
-class ObserverUpdater;
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* upCast(ObserverUpdater*);
-/// \endcond
-typedef ::IceInternal::Handle< ObserverUpdater> ObserverUpdaterPtr;
-
-class CommunicatorObserver;
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* upCast(CommunicatorObserver*);
-/// \endcond
-typedef ::IceInternal::Handle< CommunicatorObserver> CommunicatorObserverPtr;
-
-}
-
-}
-
-namespace Ice
-{
-
-namespace Instrumentation
-{
-
-/**
- * The thread state enumeration keeps track of the different possible states of Ice threads.
- */
-enum ThreadState
-{
- /**
- * The thread is idle.
- */
- ThreadStateIdle,
- /**
- * The thread is in use performing reads or writes for Ice connections. This state is only for threads from an Ice
- * thread pool.
- */
- ThreadStateInUseForIO,
- /**
- * The thread is calling user code (servant implementation, AMI callbacks). This state is only for threads from an
- * Ice thread pool.
- */
- ThreadStateInUseForUser,
- /**
- * The thread is performing other internal activities (DNS lookups, timer callbacks, etc).
- */
- ThreadStateInUseForOther
-};
-
-/**
- * The state of an Ice connection.
- */
-enum ConnectionState
-{
- /**
- * The connection is being validated.
- */
- ConnectionStateValidating,
- /**
- * The connection is holding the reception of new messages.
- */
- ConnectionStateHolding,
- /**
- * The connection is active and can send and receive messages.
- */
- ConnectionStateActive,
- /**
- * The connection is being gracefully shutdown and waits for the peer to close its end of the connection.
- */
- ConnectionStateClosing,
- /**
- * The connection is closed and waits for potential dispatch to be finished before being destroyed and detached
- * from the observer.
- */
- ConnectionStateClosed
-};
-
-}
-
-}
-
-namespace Ice
-{
-
-namespace Instrumentation
-{
-
-/**
- * The object observer interface used by instrumented objects to notify the observer of their existence.
- * \headerfile Ice/Ice.h
- */
-class ICE_API Observer : public virtual ::Ice::LocalObject
-{
-public:
-
- typedef ObserverPtr PointerType;
-
- virtual ~Observer();
- Observer() = default;
- Observer(const Observer&) = default;
- Observer& operator=(const Observer&) = default;
-
- /**
- * This method is called when the instrumented object is created or when the observer is attached to an existing
- * object.
- */
- virtual void attach() = 0;
-
- /**
- * This method is called when the instrumented object is destroyed and as a result the observer detached from the
- * object.
- */
- virtual void detach() = 0;
-
- /**
- * Notification of a failure.
- * @param exceptionName The name of the exception.
- */
- virtual void failed(const ::std::string& exceptionName) = 0;
-};
-
-/// \cond INTERNAL
-inline bool operator==(const Observer& lhs, const Observer& rhs)
-{
- return static_cast(lhs) == static_cast(rhs);
-}
-
-inline bool operator<(const Observer& lhs, const Observer& rhs)
-{
- return static_cast(lhs) < static_cast(rhs);
-}
-/// \endcond
-
-/**
- * The thread observer interface to instrument Ice threads. This can be threads from the Ice thread pool or utility
- * threads used by the Ice core.
- * \headerfile Ice/Ice.h
- */
-class ICE_API ThreadObserver : virtual public Observer
-{
-public:
-
- typedef ThreadObserverPtr PointerType;
-
- virtual ~ThreadObserver();
- ThreadObserver() = default;
- ThreadObserver(const ThreadObserver&) = default;
- ThreadObserver& operator=(const ThreadObserver&) = default;
-
- /**
- * Notification of thread state change.
- * @param oldState The previous thread state.
- * @param newState The new thread state.
- */
- virtual void stateChanged(ThreadState oldState, ThreadState newState) = 0;
-};
-
-/// \cond INTERNAL
-inline bool operator==(const ThreadObserver& lhs, const ThreadObserver& rhs)
-{
- return static_cast(lhs) == static_cast(rhs);
-}
-
-inline bool operator<(const ThreadObserver& lhs, const ThreadObserver& rhs)
-{
- return static_cast(lhs) < static_cast(rhs);
-}
-/// \endcond
-
-/**
- * The connection observer interface to instrument Ice connections.
- * \headerfile Ice/Ice.h
- */
-class ICE_API ConnectionObserver : virtual public Observer
-{
-public:
-
- typedef ConnectionObserverPtr PointerType;
-
- virtual ~ConnectionObserver();
- ConnectionObserver() = default;
- ConnectionObserver(const ConnectionObserver&) = default;
- ConnectionObserver& operator=(const ConnectionObserver&) = default;
-
- /**
- * Notification of sent bytes over the connection.
- * @param num The number of bytes sent.
- */
- virtual void sentBytes(::Ice::Int num) = 0;
-
- /**
- * Notification of received bytes over the connection.
- * @param num The number of bytes received.
- */
- virtual void receivedBytes(::Ice::Int num) = 0;
-};
-
-/// \cond INTERNAL
-inline bool operator==(const ConnectionObserver& lhs, const ConnectionObserver& rhs)
-{
- return static_cast(lhs) == static_cast(rhs);
-}
-
-inline bool operator<(const ConnectionObserver& lhs, const ConnectionObserver& rhs)
-{
- return static_cast(lhs) < static_cast(rhs);
-}
-/// \endcond
-
-/**
- * The dispatch observer to instrument servant dispatch.
- * \headerfile Ice/Ice.h
- */
-class ICE_API DispatchObserver : virtual public Observer
-{
-public:
-
- typedef DispatchObserverPtr PointerType;
-
- virtual ~DispatchObserver();
- DispatchObserver() = default;
- DispatchObserver(const DispatchObserver&) = default;
- DispatchObserver& operator=(const DispatchObserver&) = default;
-
- /**
- * Notification of a user exception.
- */
- virtual void userException() = 0;
-
- /**
- * Reply notification.
- * @param size The size of the reply.
- */
- virtual void reply(::Ice::Int size) = 0;
-};
-
-/// \cond INTERNAL
-inline bool operator==(const DispatchObserver& lhs, const DispatchObserver& rhs)
-{
- return static_cast(lhs) == static_cast(rhs);
-}
-
-inline bool operator<(const DispatchObserver& lhs, const DispatchObserver& rhs)
-{
- return static_cast(lhs) < static_cast(rhs);
-}
-/// \endcond
-
-/**
- * The child invocation observer to instrument remote or collocated invocations.
- * \headerfile Ice/Ice.h
- */
-class ICE_API ChildInvocationObserver : virtual public Observer
-{
-public:
-
- typedef ChildInvocationObserverPtr PointerType;
-
- virtual ~ChildInvocationObserver();
- ChildInvocationObserver() = default;
- ChildInvocationObserver(const ChildInvocationObserver&) = default;
- ChildInvocationObserver& operator=(const ChildInvocationObserver&) = default;
-
- /**
- * Reply notification.
- * @param size The size of the reply.
- */
- virtual void reply(::Ice::Int size) = 0;
-};
-
-/// \cond INTERNAL
-inline bool operator==(const ChildInvocationObserver& lhs, const ChildInvocationObserver& rhs)
-{
- return static_cast(lhs) == static_cast(rhs);
-}
-
-inline bool operator<(const ChildInvocationObserver& lhs, const ChildInvocationObserver& rhs)
-{
- return static_cast(lhs) < static_cast(rhs);
-}
-/// \endcond
-
-/**
- * The remote observer to instrument invocations that are sent over the wire.
- * \headerfile Ice/Ice.h
- */
-class ICE_API RemoteObserver : virtual public ChildInvocationObserver
-{
-public:
-
- typedef RemoteObserverPtr PointerType;
-
- virtual ~RemoteObserver();
- RemoteObserver() = default;
- RemoteObserver(const RemoteObserver&) = default;
- RemoteObserver& operator=(const RemoteObserver&) = default;
-};
-
-/// \cond INTERNAL
-inline bool operator==(const RemoteObserver& lhs, const RemoteObserver& rhs)
-{
- return static_cast(lhs) == static_cast(rhs);
-}
-
-inline bool operator<(const RemoteObserver& lhs, const RemoteObserver& rhs)
-{
- return static_cast(lhs) < static_cast(rhs);
-}
-/// \endcond
-
-/**
- * The collocated observer to instrument invocations that are collocated.
- * \headerfile Ice/Ice.h
- */
-class ICE_API CollocatedObserver : virtual public ChildInvocationObserver
-{
-public:
-
- typedef CollocatedObserverPtr PointerType;
-
- virtual ~CollocatedObserver();
- CollocatedObserver() = default;
- CollocatedObserver(const CollocatedObserver&) = default;
- CollocatedObserver& operator=(const CollocatedObserver&) = default;
-};
-
-/// \cond INTERNAL
-inline bool operator==(const CollocatedObserver& lhs, const CollocatedObserver& rhs)
-{
- return static_cast(lhs) == static_cast(rhs);
-}
-
-inline bool operator<(const CollocatedObserver& lhs, const CollocatedObserver& rhs)
-{
- return static_cast(lhs) < static_cast(rhs);
-}
-/// \endcond
-
-/**
- * The invocation observer to instrument invocations on proxies. A proxy invocation can either result in a collocated
- * or remote invocation. If it results in a remote invocation, a sub-observer is requested for the remote invocation.
- * \headerfile Ice/Ice.h
- */
-class ICE_API InvocationObserver : virtual public Observer
-{
-public:
-
- typedef InvocationObserverPtr PointerType;
-
- virtual ~InvocationObserver();
- InvocationObserver() = default;
- InvocationObserver(const InvocationObserver&) = default;
- InvocationObserver& operator=(const InvocationObserver&) = default;
-
- /**
- * Notification of the invocation being retried.
- */
- virtual void retried() = 0;
-
- /**
- * Notification of a user exception.
- */
- virtual void userException() = 0;
-
- /**
- * Get a remote observer for this invocation.
- * @param con The connection information.
- * @param endpt The connection endpoint.
- * @param requestId The ID of the invocation.
- * @param size The size of the invocation.
- * @return The observer to instrument the remote invocation.
- */
- virtual RemoteObserverPtr getRemoteObserver(const ::Ice::ConnectionInfoPtr& con, const ::Ice::EndpointPtr& endpt, ::Ice::Int requestId, ::Ice::Int size) = 0;
-
- /**
- * Get a collocated observer for this invocation.
- * @param adapter The object adapter hosting the collocated Ice object.
- * @param requestId The ID of the invocation.
- * @param size The size of the invocation.
- * @return The observer to instrument the collocated invocation.
- */
- virtual CollocatedObserverPtr getCollocatedObserver(const ::Ice::ObjectAdapterPtr& adapter, ::Ice::Int requestId, ::Ice::Int size) = 0;
-};
-
-/// \cond INTERNAL
-inline bool operator==(const InvocationObserver& lhs, const InvocationObserver& rhs)
-{
- return static_cast(lhs) == static_cast(rhs);
-}
-
-inline bool operator<(const InvocationObserver& lhs, const InvocationObserver& rhs)
-{
- return static_cast(lhs) < static_cast(rhs);
-}
-/// \endcond
-
-/**
- * The observer updater interface. This interface is implemented by the Ice run-time and an instance of this interface
- * is provided by the Ice communicator on initialization to the {@link CommunicatorObserver} object set with the
- * communicator initialization data. The Ice communicator calls {@link CommunicatorObserver#setObserverUpdater} to
- * provide the observer updater.
- * This interface can be used by add-ins implementing the {@link CommunicatorObserver} interface to update the
- * observers of connections and threads.
- * \headerfile Ice/Ice.h
- */
-class ICE_API ObserverUpdater : public virtual ::Ice::LocalObject
-{
-public:
-
- typedef ObserverUpdaterPtr PointerType;
-
- virtual ~ObserverUpdater();
- ObserverUpdater() = default;
- ObserverUpdater(const ObserverUpdater&) = default;
- ObserverUpdater& operator=(const ObserverUpdater&) = default;
-
- /**
- * Update connection observers associated with each of the Ice connection from the communicator and its object
- * adapters.
- * When called, this method goes through all the connections and for each connection
- * {@link CommunicatorObserver#getConnectionObserver} is called. The implementation of getConnectionObserver has
- * the possibility to return an updated observer if necessary.
- */
- virtual void updateConnectionObservers() = 0;
-
- /**
- * Update thread observers associated with each of the Ice thread from the communicator and its object adapters.
- * When called, this method goes through all the threads and for each thread
- * {@link CommunicatorObserver#getThreadObserver} is called. The implementation of getThreadObserver has the
- * possibility to return an updated observer if necessary.
- */
- virtual void updateThreadObservers() = 0;
-};
-
-/// \cond INTERNAL
-inline bool operator==(const ObserverUpdater& lhs, const ObserverUpdater& rhs)
-{
- return static_cast(lhs) == static_cast(rhs);
-}
-
-inline bool operator<(const ObserverUpdater& lhs, const ObserverUpdater& rhs)
-{
- return static_cast(lhs) < static_cast(rhs);
-}
-/// \endcond
-
-/**
- * The communicator observer interface used by the Ice run-time to obtain and update observers for its observable
- * objects. This interface should be implemented by add-ins that wish to observe Ice objects in order to collect
- * statistics. An instance of this interface can be provided to the Ice run-time through the Ice communicator
- * initialization data.
- * \headerfile Ice/Ice.h
- */
-class ICE_API CommunicatorObserver : public virtual ::Ice::LocalObject
-{
-public:
-
- typedef CommunicatorObserverPtr PointerType;
-
- virtual ~CommunicatorObserver();
- CommunicatorObserver() = default;
- CommunicatorObserver(const CommunicatorObserver&) = default;
- CommunicatorObserver& operator=(const CommunicatorObserver&) = default;
-
- /**
- * This method should return an observer for the given endpoint information and connector. The Ice run-time calls
- * this method for each connection establishment attempt.
- * @param endpt The endpoint.
- * @param connector The description of the connector. For IP transports, this is typically the IP address to
- * connect to.
- * @return The observer to instrument the connection establishment.
- */
- virtual ObserverPtr getConnectionEstablishmentObserver(const ::Ice::EndpointPtr& endpt, const ::std::string& connector) = 0;
+ virtual ObserverPtr getConnectionEstablishmentObserver(const Ice::EndpointPtr& endpt, const ::std::string& connector) = 0;
/**
* This method should return an observer for the given endpoint information. The Ice run-time calls this method to
@@ -1015,7 +335,7 @@ class ICE_API CommunicatorObserver : public virtual ::Ice::LocalObject
* @param endpt The endpoint.
* @return The observer to instrument the endpoint lookup.
*/
- virtual ObserverPtr getEndpointLookupObserver(const ::Ice::EndpointPtr& endpt) = 0;
+ virtual ObserverPtr getEndpointLookupObserver(const Ice::EndpointPtr& endpt) = 0;
/**
* This method should return a connection observer for the given connection. The Ice run-time calls this method
@@ -1027,7 +347,7 @@ class ICE_API CommunicatorObserver : public virtual ::Ice::LocalObject
* @param o The old connection observer if one is already set or a null reference otherwise.
* @return The connection observer to instrument the connection.
*/
- virtual ConnectionObserverPtr getConnectionObserver(const ::Ice::ConnectionInfoPtr& c, const ::Ice::EndpointPtr& e, ConnectionState s, const ConnectionObserverPtr& o) = 0;
+ virtual ConnectionObserverPtr getConnectionObserver(const Ice::ConnectionInfoPtr& c, const Ice::EndpointPtr& e, ConnectionState s, const ConnectionObserverPtr& o) = 0;
/**
* This method should return a thread observer for the given thread. The Ice run-time calls this method for each
@@ -1049,7 +369,7 @@ class ICE_API CommunicatorObserver : public virtual ::Ice::LocalObject
* @param ctx The context specified by the user.
* @return The invocation observer to instrument the invocation.
*/
- virtual InvocationObserverPtr getInvocationObserver(const ::Ice::ObjectPrx& prx, const ::std::string& operation, const ::Ice::Context& ctx) = 0;
+ virtual InvocationObserverPtr getInvocationObserver(const Ice::ObjectPrxPtr& prx, const ::std::string& operation, const ::Ice::Context& ctx) = 0;
/**
* This method should return a dispatch observer for the given dispatch. The Ice run-time calls this method each
@@ -1058,7 +378,7 @@ class ICE_API CommunicatorObserver : public virtual ::Ice::LocalObject
* @param size The size of the dispatch.
* @return The dispatch observer to instrument the dispatch.
*/
- virtual DispatchObserverPtr getDispatchObserver(const ::Ice::Current& c, ::Ice::Int size) = 0;
+ virtual DispatchObserverPtr getDispatchObserver(const ::Ice::Current& c, int size) = 0;
/**
* The Ice run-time calls this method when the communicator is initialized. The add-in implementing this
@@ -1068,30 +388,6 @@ class ICE_API CommunicatorObserver : public virtual ::Ice::LocalObject
virtual void setObserverUpdater(const ObserverUpdaterPtr& updater) = 0;
};
-/// \cond INTERNAL
-inline bool operator==(const CommunicatorObserver& lhs, const CommunicatorObserver& rhs)
-{
- return static_cast(lhs) == static_cast(rhs);
-}
-
-inline bool operator<(const CommunicatorObserver& lhs, const CommunicatorObserver& rhs)
-{
- return static_cast(lhs) < static_cast(rhs);
-}
-/// \endcond
-
}
-}
-
-/// \cond STREAM
-namespace Ice
-{
-
-}
-/// \endcond
-
-#endif
-
-#include
#endif
diff --git a/cpp/include/Ice/InstrumentationF.h b/cpp/include/Ice/InstrumentationF.h
index 7321b2aaef8..b198d8b8d01 100644
--- a/cpp/include/Ice/InstrumentationF.h
+++ b/cpp/include/Ice/InstrumentationF.h
@@ -1,128 +1,19 @@
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
-//
-// Ice version 3.7.10
-//
-//
-//
-// Generated from file `InstrumentationF.ice'
-//
-// Warning: do not edit this file.
-//
-//
-//
-
-#ifndef __Ice_InstrumentationF_h__
-#define __Ice_InstrumentationF_h__
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#ifndef ICE_INSTRUMENTATION_F_H
+#define ICE_INSTRUMENTATION_F_H
-#ifndef ICE_IGNORE_VERSION
-# if ICE_INT_VERSION / 100 != 307
-# error Ice version mismatch!
-# endif
-# if ICE_INT_VERSION % 100 >= 50
-# error Beta header file detected
-# endif
-# if ICE_INT_VERSION % 100 < 10
-# error Ice patch level mismatch!
-# endif
-#endif
-
-#ifndef ICE_API
-# if defined(ICE_STATIC_LIBS)
-# define ICE_API /**/
-# elif defined(ICE_API_EXPORTS)
-# define ICE_API ICE_DECLSPEC_EXPORT
-# else
-# define ICE_API ICE_DECLSPEC_IMPORT
-# endif
-#endif
-
-#ifdef ICE_CPP11_MAPPING // C++11 mapping
-
-namespace Ice
-{
-
-
-namespace Instrumentation
+namespace Ice::Instrumentation
{
class Observer;
class CommunicatorObserver;
-}
-
-}
-
-/// \cond STREAM
-namespace Ice
-{
-
-}
-/// \endcond
-
-/// \cond INTERNAL
-namespace Ice
-{
-
-/// \cond INTERNAL
-namespace Instrumentation
-{
-
using ObserverPtr = ::std::shared_ptr;
-
using CommunicatorObserverPtr = ::std::shared_ptr;
}
-/// \endcond
-
-}
-/// \endcond
-
-#else // C++98 mapping
-
-namespace Ice
-{
-
-namespace Instrumentation
-{
-
-class Observer;
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* upCast(Observer*);
-/// \endcond
-typedef ::IceInternal::Handle< Observer> ObserverPtr;
-
-class CommunicatorObserver;
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* upCast(CommunicatorObserver*);
-/// \endcond
-typedef ::IceInternal::Handle< CommunicatorObserver> CommunicatorObserverPtr;
-
-}
-
-}
-
-/// \cond STREAM
-namespace Ice
-{
-
-}
-/// \endcond
-
-#endif
-#include
#endif
diff --git a/cpp/include/Ice/MetricsAdminI.h b/cpp/include/Ice/MetricsAdminI.h
index efe6d776e3a..d99dfc293e9 100644
--- a/cpp/include/Ice/MetricsAdminI.h
+++ b/cpp/include/Ice/MetricsAdminI.h
@@ -28,14 +28,10 @@ namespace IceInternal
{
class ICE_API MetricsMapI;
-ICE_DEFINE_PTR(MetricsMapIPtr, MetricsMapI);
+using MetricsMapIPtr = std::shared_ptr;
+
+class ICE_API MetricsMapI : public std::enable_shared_from_this
-class ICE_API MetricsMapI :
-#ifdef ICE_CPP11_MAPPING
- public std::enable_shared_from_this
-#else
- public virtual IceUtil::Shared
-#endif
{
public:
@@ -68,7 +64,7 @@ class ICE_API MetricsMapI :
std::regex _regex;
};
- ICE_DEFINE_PTR(RegExpPtr, RegExp);
+ using RegExpPtr = std::shared_ptr;
virtual ~MetricsMapI();
@@ -96,9 +92,6 @@ class ICE_API MetricsMapI :
};
class ICE_API MetricsMapFactory
-#ifndef ICE_CPP11_MAPPING
- : public Ice::LocalObject
-#endif
{
public:
@@ -114,28 +107,22 @@ class ICE_API MetricsMapFactory
IceMX::Updater* _updater;
};
-ICE_DEFINE_PTR(MetricsMapFactoryPtr, MetricsMapFactory);
+using MetricsMapFactoryPtr = std::shared_ptr;
template class MetricsMapT : public MetricsMapI, private IceUtil::Mutex
{
public:
- typedef MetricsType T;
- typedef ICE_SHARED_PTR TPtr;
-
- ICE_DEFINE_PTR(MetricsMapTPtr, MetricsMapT);
+ using T = MetricsType;
+ using TPtr = ICE_SHARED_PTR;
+ using MetricsMapTPtr = std::shared_ptr;
typedef IceMX::MetricsMap MetricsType::* SubMapMember;
class EntryT;
- ICE_DEFINE_PTR(EntryTPtr, EntryT);
+ using EntryTPtr = std::shared_ptr;
- class EntryT :
-#ifdef ICE_CPP11_MAPPING
- public std::enable_shared_from_this
-#else
- public Ice::LocalObject
-#endif
+ class EntryT : public std::enable_shared_from_this
{
public:
@@ -197,11 +184,7 @@ template class MetricsMapT : public MetricsMapI, private IceU
_object->totalLifetime += lifetime;
if(--_object->current == 0)
{
-#ifdef ICE_CPP11_MAPPING
_map->detached(this->shared_from_this());
-#else
- _map->detached(this);
-#endif
}
}
@@ -292,23 +275,17 @@ template class MetricsMapT : public MetricsMapI, private IceU
}
}
- MetricsMapT(const MetricsMapT& other)
- :
-#ifndef ICE_CPP11_MAPPING
- IceUtil::Shared(),
-#endif
+ MetricsMapT(const MetricsMapT& other) :
MetricsMapI(other),
IceUtil::Mutex(),
_destroyed(false)
{
}
-#ifdef ICE_CPP11_MAPPING
std::shared_ptr shared_from_this()
{
return std::static_pointer_cast(MetricsMapI::shared_from_this());
}
-#endif
virtual void
destroy()
@@ -368,9 +345,9 @@ template class MetricsMapT : public MetricsMapI, private IceU
_subMaps.find(subMapName);
if(p != _subMaps.end())
{
- return std::pair(ICE_GET_SHARED_FROM_THIS(p->second.second->clone()), p->second.first);
+ return std::pair(p->second.second->clone()->shared_from_this(), p->second.first);
}
- return std::pair(MetricsMapIPtr(ICE_NULLPTR), static_cast(0));
+ return std::pair(MetricsMapIPtr(nullptr), static_cast(0));
}
EntryTPtr
@@ -383,7 +360,7 @@ template class MetricsMapT : public MetricsMapI, private IceU
{
if(!(*p)->match(helper, false))
{
- return ICE_NULLPTR;
+ return nullptr;
}
}
@@ -391,7 +368,7 @@ template class MetricsMapT : public MetricsMapI, private IceU
{
if((*p)->match(helper, true))
{
- return ICE_NULLPTR;
+ return nullptr;
}
}
@@ -423,7 +400,7 @@ template class MetricsMapT : public MetricsMapI, private IceU
}
catch(const std::exception&)
{
- return ICE_NULLPTR;
+ return nullptr;
}
//
@@ -432,7 +409,7 @@ template class MetricsMapT : public MetricsMapI, private IceU
Lock sync(*this);
if(_destroyed)
{
- return ICE_NULLPTR;
+ return nullptr;
}
if(previous && previous->_object->id == key)
@@ -444,16 +421,11 @@ template class MetricsMapT : public MetricsMapI, private IceU
typename std::map::const_iterator p = _objects.find(key);
if(p == _objects.end())
{
- TPtr t = ICE_MAKE_SHARED(T);
+ TPtr t = std::make_shared();
t->id = key;
-#ifdef ICE_CPP11_MAPPING
p = _objects.insert(typename std::map::value_type(
key, std::make_shared(shared_from_this(), t, _detachedQueue.end()))).first;
-#else
- p = _objects.insert(typename std::map::value_type(
- key, new EntryT(this, t, _detachedQueue.end()))).first;
-#endif
}
p->second->attach(helper);
@@ -464,7 +436,7 @@ template class MetricsMapT : public MetricsMapI, private IceU
virtual MetricsMapIPtr clone() const
{
- return ICE_MAKE_SHARED(MetricsMapT, *this);
+ return std::make_shared>(*this);
}
void detached(EntryTPtr entry)
@@ -540,14 +512,14 @@ template class MetricsMapFactoryT : public MetricsMapFactory
virtual MetricsMapIPtr
create(const std::string& mapPrefix, const Ice::PropertiesPtr& properties)
{
- return ICE_MAKE_SHARED(MetricsMapT, mapPrefix, properties, _subMaps);
+ return std::make_shared>(mapPrefix, properties, _subMaps);
}
template void
registerSubMap(const std::string& subMap, IceMX::MetricsMap MetricsType::* member)
{
_subMaps[subMap] = std::pair(member, ICE_MAKE_SHARED(MetricsMapFactoryT, ICE_NULLPTR));
+ MetricsMapFactoryPtr>(member, std::make_shared>(nullptr));
}
private:
@@ -580,7 +552,7 @@ class MetricsViewI : public IceUtil::Shared
const std::string _name;
std::map _maps;
};
-ICE_DEFINE_PTR(MetricsViewIPtr, MetricsViewI);
+using MetricsViewIPtr = std::shared_ptr;
class ICE_API MetricsAdminI : public IceMX::MetricsAdmin,
private IceUtil::Mutex
@@ -601,7 +573,7 @@ class ICE_API MetricsAdminI : public IceMX::MetricsAdmin,
MetricsMapFactoryPtr factory;
{
Lock sync(*this);
- factory = ICE_MAKE_SHARED(MetricsMapFactoryT, updater);
+ factory = std::make_shared>(updater);
_factories[map] = factory;
updated = addOrUpdateMap(map, factory);
}
@@ -615,7 +587,7 @@ class ICE_API MetricsAdminI : public IceMX::MetricsAdmin,
registerSubMap(const std::string& map, const std::string& subMap, IceMX::MetricsMap MetricsType::* member)
{
bool updated;
- ICE_HANDLE > factory;
+ std::shared_ptr> factory;
{
Lock sync(*this);
std::map::const_iterator p = _factories.find(map);
@@ -623,11 +595,9 @@ class ICE_API MetricsAdminI : public IceMX::MetricsAdmin,
{
return;
}
-#ifdef ICE_CPP11_MAPPING
factory = ::std::dynamic_pointer_cast>(p->second);
-#else
- factory = dynamic_cast*>(p->second.get());
-#endif
+
+ // use 'template' keyword to treat 'registerSubMap' as a dependent template name
factory->template registerSubMap(subMap, member);
removeMap(map);
updated = addOrUpdateMap(map, factory);
@@ -677,7 +647,8 @@ class ICE_API MetricsAdminI : public IceMX::MetricsAdmin,
const Ice::LoggerPtr _logger;
Ice::PropertiesPtr _properties;
};
-ICE_DEFINE_SHARED_PTR(MetricsAdminIPtr, MetricsAdminI);
+
+using MetricsAdminIPtr = std::shared_ptr;
};
diff --git a/cpp/include/Ice/MetricsObserverI.h b/cpp/include/Ice/MetricsObserverI.h
index 330ba155ab8..8db39911115 100644
--- a/cpp/include/Ice/MetricsObserverI.h
+++ b/cpp/include/Ice/MetricsObserverI.h
@@ -313,25 +313,18 @@ template class MetricsHelperT
};
class Updater
-#ifndef ICE_CPP11_MAPPING
- : public virtual IceUtil::Shared
-#endif
{
public:
virtual void update() = 0;
};
-ICE_DEFINE_PTR(UpdaterPtr, Updater);
+using UpdaterPtr = std::shared_ptr;
template class UpdaterT final : public Updater
{
public:
-#ifdef ICE_CPP11_MAPPING
UpdaterT(const std::shared_ptr& updater, void (T::*fn)()) :
-#else
- UpdaterT(T* updater, void (T::*fn)()) :
-#endif
_updater(updater),
_fn(fn)
{
@@ -344,11 +337,10 @@ template class UpdaterT final : public Updater
private:
- const ICE_HANDLE _updater;
+ const std::shared_ptr _updater;
void (T::*_fn)();
};
-#ifdef ICE_CPP11_MAPPING
template UpdaterPtr
newUpdater(const std::shared_ptr& updater, void (T::*fn)())
{
@@ -361,20 +353,6 @@ newUpdater(const std::shared_ptr& updater, void (T::*fn)())
return nullptr;
}
}
-#else
-template UpdaterPtr
-newUpdater(const IceInternal::Handle& updater, void (T::*fn)())
-{
- if(updater)
- {
- return UpdaterPtr(new UpdaterT(updater.get(), fn));
- }
- else
- {
- return 0;
- }
-}
-#endif
template class ObserverT : public virtual ::Ice::Instrumentation::Observer
{
@@ -459,10 +437,10 @@ template class ObserverT : public virtual ::Ice::Instrumentation::Ob
return *p;
}
}
- return ICE_NULLPTR;
+ return nullptr;
}
- template ICE_INTERNAL_HANDLE
+ template std::shared_ptr
getObserver(const std::string& mapName, const MetricsHelperT& helper)
{
std::vector::EntryTPtr> metricsObjects;
@@ -477,10 +455,10 @@ template class ObserverT : public virtual ::Ice::Instrumentation::Ob
if(metricsObjects.empty())
{
- return ICE_NULLPTR;
+ return nullptr;
}
- ICE_INTERNAL_HANDLE obsv = ICE_MAKE_SHARED(ObserverImpl);
+ std::shared_ptr obsv = std::make_shared();
obsv->init(helper, metricsObjects);
return obsv;
}
@@ -497,15 +475,9 @@ class ObserverFactoryT : public Updater, private IceUtil::Mutex
{
public:
-#ifdef ICE_CPP11_MAPPING
using ObserverImplPtrType = ::std::shared_ptr;
using MetricsType = typename ObserverImplType::MetricsType;
using MetricsMapSeqType = std::vector<::std::shared_ptr>>;
-#else
- typedef IceUtil::Handle ObserverImplPtrType;
- typedef typename ObserverImplType::MetricsType MetricsType;
- typedef std::vector > > MetricsMapSeqType;
-#endif
ObserverFactoryT(const IceInternal::MetricsAdminIPtr& metrics, const std::string& name) :
_metrics(metrics), _name(name), _enabled(0)
@@ -527,7 +499,7 @@ class ObserverFactoryT : public Updater, private IceUtil::Mutex
IceUtil::Mutex::Lock sync(*this);
if(!_metrics)
{
- return ICE_NULLPTR;
+ return nullptr;
}
typename ObserverImplType::EntrySeqType metricsObjects;
@@ -542,10 +514,10 @@ class ObserverFactoryT : public Updater, private IceUtil::Mutex
if(metricsObjects.empty())
{
- return ICE_NULLPTR;
+ return nullptr;
}
- ObserverImplPtrType obsv = ICE_MAKE_SHARED(ObserverImplType);
+ ObserverImplPtrType obsv = std::make_shared();
obsv->init(helper, metricsObjects);
return obsv;
}
@@ -553,11 +525,7 @@ class ObserverFactoryT : public Updater, private IceUtil::Mutex
template ObserverImplPtrType
getObserver(const MetricsHelperT& helper, const ObserverPtrType& observer)
{
-#ifdef ICE_CPP11_MAPPING
ObserverImplPtrType old = std::dynamic_pointer_cast(observer);
-#else
- ObserverImplPtrType old = ObserverImplPtrType::dynamicCast(observer);
-#endif
if(!observer || !old)
{
@@ -566,7 +534,7 @@ class ObserverFactoryT : public Updater, private IceUtil::Mutex
IceUtil::Mutex::Lock sync(*this);
if(!_metrics)
{
- return ICE_NULLPTR;
+ return nullptr;
}
typename ObserverImplType::EntrySeqType metricsObjects;
@@ -581,10 +549,10 @@ class ObserverFactoryT : public Updater, private IceUtil::Mutex
if(metricsObjects.empty())
{
old->detach();
- return ICE_NULLPTR;
+ return nullptr;
}
- ObserverImplPtrType obsv = ICE_MAKE_SHARED(ObserverImplType);
+ ObserverImplPtrType obsv = std::make_shared();
obsv->init(helper, metricsObjects, old.get());
return obsv;
}
@@ -615,11 +583,7 @@ class ObserverFactoryT : public Updater, private IceUtil::Mutex
_maps.clear();
for(std::vector::const_iterator p = maps.begin(); p != maps.end(); ++p)
{
-#ifdef ICE_CPP11_MAPPING
_maps.push_back(::std::dynamic_pointer_cast>(*p));
-#else
- _maps.push_back(IceUtil::Handle >::dynamicCast(*p));
-#endif
assert(_maps.back());
}
_enabled.exchange(_maps.empty() ? 0 : 1);
diff --git a/cpp/include/Ice/ObserverHelper.h b/cpp/include/Ice/ObserverHelper.h
index 7a4919f3e9b..c01acc20fcc 100644
--- a/cpp/include/Ice/ObserverHelper.h
+++ b/cpp/include/Ice/ObserverHelper.h
@@ -16,11 +16,7 @@ template class ObserverHelperT
{
public:
-#ifdef ICE_CPP11_MAPPING
using TPtr = ::std::shared_ptr;
-#else
- typedef IceInternal::Handle TPtr;
-#endif
ObserverHelperT()
{
@@ -61,18 +57,11 @@ template class ObserverHelperT
_observer->attach();
}
}
-
-#ifdef ICE_CPP11_MAPPING
TPtr get() const
{
return _observer;
}
-#else
- T* get() const
- {
- return _observer.get();
- }
-#endif
+
void adopt(ObserverHelperT& other)
{
_observer = other._observer;
diff --git a/cpp/include/Ice/SharedPtr.h b/cpp/include/Ice/SharedPtr.h
index 70053fcc199..dea6d93fa86 100644
--- a/cpp/include/Ice/SharedPtr.h
+++ b/cpp/include/Ice/SharedPtr.h
@@ -33,7 +33,7 @@ class SharedPtr
{
}
- explicit SharedPtr(std::shared_ptr&& r) noexcept : _ptr(std::move(r))
+ SharedPtr(std::shared_ptr&& r) noexcept : _ptr(std::move(r))
{
}
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp
index 6eb20cd9397..4b684bc40a8 100644
--- a/cpp/src/Ice/ConnectionI.cpp
+++ b/cpp/src/Ice/ConnectionI.cpp
@@ -148,14 +148,14 @@ class ConnectionFlushBatchAsync : public OutgoingAsyncBase
typedef IceUtil::Handle ConnectionFlushBatchAsyncPtr;
ConnectionState connectionStateMap[] = {
- ICE_ENUM(ConnectionState, ConnectionStateValidating), // StateNotInitialized
- ICE_ENUM(ConnectionState, ConnectionStateValidating), // StateNotValidated
- ICE_ENUM(ConnectionState, ConnectionStateActive), // StateActive
- ICE_ENUM(ConnectionState, ConnectionStateHolding), // StateHolding
- ICE_ENUM(ConnectionState, ConnectionStateClosing), // StateClosing
- ICE_ENUM(ConnectionState, ConnectionStateClosing), // StateClosingPending
- ICE_ENUM(ConnectionState, ConnectionStateClosed), // StateClosed
- ICE_ENUM(ConnectionState, ConnectionStateClosed), // StateFinished
+ ConnectionState::ConnectionStateValidating, // StateNotInitialized
+ ConnectionState::ConnectionStateValidating, // StateNotValidated
+ ConnectionState::ConnectionStateActive, // StateActive
+ ConnectionState::ConnectionStateHolding, // StateHolding
+ ConnectionState::ConnectionStateClosing, // StateClosing
+ ConnectionState::ConnectionStateClosing, // StateClosingPending
+ ConnectionState::ConnectionStateClosed, // StateClosed
+ ConnectionState::ConnectionStateClosed, // StateFinished
};
}
diff --git a/cpp/src/Ice/IPEndpointI.cpp b/cpp/src/Ice/IPEndpointI.cpp
index 30bd6452454..97cc0f75030 100644
--- a/cpp/src/Ice/IPEndpointI.cpp
+++ b/cpp/src/Ice/IPEndpointI.cpp
@@ -629,7 +629,7 @@ IceInternal::EndpointHostResolver::run()
if(threadObserver)
{
- threadObserver->stateChanged(ICE_ENUM(ThreadState, ThreadStateIdle), ICE_ENUM(ThreadState, ThreadStateInUseForOther));
+ threadObserver->stateChanged(ThreadState::ThreadStateIdle, ThreadState::ThreadStateInUseForOther);
}
try
@@ -656,8 +656,8 @@ IceInternal::EndpointHostResolver::run()
if(threadObserver)
{
- threadObserver->stateChanged(ICE_ENUM(ThreadState, ThreadStateInUseForOther),
- ICE_ENUM(ThreadState, ThreadStateIdle));
+ threadObserver->stateChanged(ThreadState::ThreadStateInUseForOther,
+ ThreadState::ThreadStateIdle);
}
}
@@ -665,8 +665,8 @@ IceInternal::EndpointHostResolver::run()
{
if(threadObserver)
{
- threadObserver->stateChanged(ICE_ENUM(ThreadState, ThreadStateInUseForOther),
- ICE_ENUM(ThreadState, ThreadStateIdle));
+ threadObserver->stateChanged(ThreadState::ThreadStateInUseForOther,
+ ThreadState::ThreadStateIdle);
}
if(r.observer)
{
@@ -704,7 +704,7 @@ IceInternal::EndpointHostResolver::updateObserver()
{
_observer.attach(obsv->getThreadObserver("Communicator",
name(),
- ICE_ENUM(ThreadState, ThreadStateIdle),
+ ThreadState::ThreadStateIdle,
_observer.get()));
}
}
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 7a7343eaf43..8ee59db9d01 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -224,7 +224,7 @@ Timer::updateObserver(const Ice::Instrumentation::CommunicatorObserverPtr& obsv)
assert(obsv);
_observer.attach(obsv->getThreadObserver("Communicator",
"Ice.Timer",
- Instrumentation::ICE_ENUM(ThreadState, ThreadStateIdle),
+ Instrumentation::ThreadState::ThreadStateIdle,
_observer.get()));
_hasObserver.exchange(_observer.get() ? 1 : 0);
}
@@ -241,8 +241,8 @@ Timer::runTimerTask(const IceUtil::TimerTaskPtr& task)
}
if(threadObserver)
{
- threadObserver->stateChanged(Instrumentation::ICE_ENUM(ThreadState, ThreadStateIdle),
- Instrumentation::ICE_ENUM(ThreadState, ThreadStateInUseForOther));
+ threadObserver->stateChanged(Instrumentation::ThreadState::ThreadStateIdle,
+ Instrumentation::ThreadState::ThreadStateInUseForOther);
}
try
{
@@ -252,14 +252,14 @@ Timer::runTimerTask(const IceUtil::TimerTaskPtr& task)
{
if(threadObserver)
{
- threadObserver->stateChanged(Instrumentation::ICE_ENUM(ThreadState, ThreadStateInUseForOther),
- Instrumentation::ICE_ENUM(ThreadState, ThreadStateIdle));
+ threadObserver->stateChanged(Instrumentation::ThreadState::ThreadStateInUseForOther,
+ Instrumentation::ThreadState::ThreadStateIdle);
}
}
if(threadObserver)
{
- threadObserver->stateChanged(Instrumentation::ICE_ENUM(ThreadState, ThreadStateInUseForOther),
- Instrumentation::ICE_ENUM(ThreadState, ThreadStateIdle));
+ threadObserver->stateChanged(Instrumentation::ThreadState::ThreadStateInUseForOther,
+ Instrumentation::ThreadState::ThreadStateIdle);
}
}
else
@@ -1416,7 +1416,7 @@ IceInternal::Instance::finishSetup(int& argc, const char* argv[], const Ice::Com
const string metricsFacetName = "Metrics";
if(_adminFacetFilter.empty() || _adminFacetFilter.find(metricsFacetName) != _adminFacetFilter.end())
{
- CommunicatorObserverIPtr observer = ICE_MAKE_SHARED(CommunicatorObserverI, _initData);
+ CommunicatorObserverIPtr observer = make_shared(_initData);
_initData.observer = observer;
_adminFacets.insert(make_pair(metricsFacetName, observer->getFacet()));
@@ -1437,7 +1437,7 @@ IceInternal::Instance::finishSetup(int& argc, const char* argv[], const Ice::Com
//
if(_initData.observer)
{
- _initData.observer->setObserverUpdater(ICE_MAKE_SHARED(ObserverUpdaterI, this));
+ _initData.observer->setObserverUpdater(make_shared(this));
}
//
@@ -1618,7 +1618,7 @@ IceInternal::Instance::destroy()
if(_initData.observer)
{
- CommunicatorObserverIPtr observer = ICE_DYNAMIC_CAST(CommunicatorObserverI, _initData.observer);
+ CommunicatorObserverIPtr observer = dynamic_pointer_cast(_initData.observer);
if(observer)
{
observer->destroy(); // Break cyclic reference counts. Don't clear _observer, it's immutable.
diff --git a/cpp/src/Ice/Instance.h b/cpp/src/Ice/Instance.h
index ff663528d80..6aaa04b5628 100644
--- a/cpp/src/Ice/Instance.h
+++ b/cpp/src/Ice/Instance.h
@@ -51,7 +51,7 @@ class Timer;
typedef IceUtil::Handle TimerPtr;
class MetricsAdminI;
-ICE_DEFINE_SHARED_PTR(MetricsAdminIPtr, MetricsAdminI);
+using MetricsAdminIPtr = std::shared_ptr;
class RequestHandlerFactory;
typedef IceUtil::Handle RequestHandlerFactoryPtr;
diff --git a/cpp/src/Ice/Instrumentation.cpp b/cpp/src/Ice/Instrumentation.cpp
index db9092056a3..ade53e9d579 100644
--- a/cpp/src/Ice/Instrumentation.cpp
+++ b/cpp/src/Ice/Instrumentation.cpp
@@ -1,188 +1,45 @@
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
-//
-// Ice version 3.7.10
-//
-//
-//
-// Generated from file `Instrumentation.ice'
-//
-// Warning: do not edit this file.
-//
-//
-//
-
-#ifndef ICE_API_EXPORTS
-# define ICE_API_EXPORTS
-#endif
-#include
-#include
-#include
-#include
-#include
-
-#if defined(_MSC_VER)
-# pragma warning(disable:4458) // declaration of ... hides class member
-#elif defined(__clang__)
-# pragma clang diagnostic ignored "-Wshadow"
-#elif defined(__GNUC__)
-# pragma GCC diagnostic ignored "-Wshadow"
-#endif
-
-#ifndef ICE_IGNORE_VERSION
-# if ICE_INT_VERSION / 100 != 307
-# error Ice version mismatch!
-# endif
-# if ICE_INT_VERSION % 100 >= 50
-# error Beta header file detected
-# endif
-# if ICE_INT_VERSION % 100 < 10
-# error Ice patch level mismatch!
-# endif
-#endif
-
-#ifdef ICE_CPP11_MAPPING // C++11 mapping
-
-namespace
-{
-
-}
-
-Ice::Instrumentation::Observer::~Observer()
-{
-}
-
-Ice::Instrumentation::ThreadObserver::~ThreadObserver()
-{
-}
-
-Ice::Instrumentation::ConnectionObserver::~ConnectionObserver()
-{
-}
-
-Ice::Instrumentation::DispatchObserver::~DispatchObserver()
-{
-}
-
-Ice::Instrumentation::ChildInvocationObserver::~ChildInvocationObserver()
-{
-}
-
-Ice::Instrumentation::RemoteObserver::~RemoteObserver()
-{
-}
-Ice::Instrumentation::CollocatedObserver::~CollocatedObserver()
-{
-}
-
-Ice::Instrumentation::InvocationObserver::~InvocationObserver()
-{
-}
-
-Ice::Instrumentation::ObserverUpdater::~ObserverUpdater()
-{
-}
-
-Ice::Instrumentation::CommunicatorObserver::~CommunicatorObserver()
-{
-}
-
-#else // C++98 mapping
-
-namespace
-{
-
-namespace
-{
-
-}
-
-}
+#include "Ice/Instrumentation.h"
Ice::Instrumentation::Observer::~Observer()
{
}
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* Ice::Instrumentation::upCast(Observer* p) { return p; }
-/// \endcond
-
Ice::Instrumentation::ThreadObserver::~ThreadObserver()
{
}
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* Ice::Instrumentation::upCast(ThreadObserver* p) { return p; }
-/// \endcond
-
Ice::Instrumentation::ConnectionObserver::~ConnectionObserver()
{
}
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* Ice::Instrumentation::upCast(ConnectionObserver* p) { return p; }
-/// \endcond
-
Ice::Instrumentation::DispatchObserver::~DispatchObserver()
{
}
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* Ice::Instrumentation::upCast(DispatchObserver* p) { return p; }
-/// \endcond
-
Ice::Instrumentation::ChildInvocationObserver::~ChildInvocationObserver()
{
}
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* Ice::Instrumentation::upCast(ChildInvocationObserver* p) { return p; }
-/// \endcond
-
Ice::Instrumentation::RemoteObserver::~RemoteObserver()
{
}
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* Ice::Instrumentation::upCast(RemoteObserver* p) { return p; }
-/// \endcond
-
Ice::Instrumentation::CollocatedObserver::~CollocatedObserver()
{
}
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* Ice::Instrumentation::upCast(CollocatedObserver* p) { return p; }
-/// \endcond
-
Ice::Instrumentation::InvocationObserver::~InvocationObserver()
{
}
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* Ice::Instrumentation::upCast(InvocationObserver* p) { return p; }
-/// \endcond
-
Ice::Instrumentation::ObserverUpdater::~ObserverUpdater()
{
}
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* Ice::Instrumentation::upCast(ObserverUpdater* p) { return p; }
-/// \endcond
-
Ice::Instrumentation::CommunicatorObserver::~CommunicatorObserver()
{
}
-
-/// \cond INTERNAL
-ICE_API ::Ice::LocalObject* Ice::Instrumentation::upCast(CommunicatorObserver* p) { return p; }
-/// \endcond
-
-namespace Ice
-{
-}
-
-#endif
diff --git a/cpp/src/Ice/InstrumentationF.cpp b/cpp/src/Ice/InstrumentationF.cpp
deleted file mode 100644
index aa053992e7c..00000000000
--- a/cpp/src/Ice/InstrumentationF.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-// Copyright (c) ZeroC, Inc. All rights reserved.
-//
-//
-// Ice version 3.7.10
-//
-//
-//
-// Generated from file `InstrumentationF.ice'
-//
-// Warning: do not edit this file.
-//
-//
-//
-
-#ifndef ICE_API_EXPORTS
-# define ICE_API_EXPORTS
-#endif
-#include
-#include
-#include
-
-#if defined(_MSC_VER)
-# pragma warning(disable:4458) // declaration of ... hides class member
-#elif defined(__clang__)
-# pragma clang diagnostic ignored "-Wshadow"
-#elif defined(__GNUC__)
-# pragma GCC diagnostic ignored "-Wshadow"
-#endif
-
-#ifndef ICE_IGNORE_VERSION
-# if ICE_INT_VERSION / 100 != 307
-# error Ice version mismatch!
-# endif
-# if ICE_INT_VERSION % 100 >= 50
-# error Beta header file detected
-# endif
-# if ICE_INT_VERSION % 100 < 10
-# error Ice patch level mismatch!
-# endif
-#endif
-
-#ifdef ICE_CPP11_MAPPING // C++11 mapping
-
-namespace
-{
-
-}
-
-#else // C++98 mapping
-
-namespace
-{
-
-namespace
-{
-
-}
-
-}
-
-namespace Ice
-{
-}
-
-#endif
diff --git a/cpp/src/Ice/InstrumentationI.cpp b/cpp/src/Ice/InstrumentationI.cpp
index e4ca6fad53d..fa7c35cead3 100644
--- a/cpp/src/Ice/InstrumentationI.cpp
+++ b/cpp/src/Ice/InstrumentationI.cpp
@@ -31,13 +31,13 @@ getThreadStateMetric(ThreadState s)
{
switch(s)
{
- case ICE_ENUM(ThreadState, ThreadStateIdle):
+ case ThreadState::ThreadStateIdle:
return 0;
- case ICE_ENUM(ThreadState, ThreadStateInUseForIO):
+ case ThreadState::ThreadStateInUseForIO:
return &ThreadMetrics::inUseForIO;
- case ICE_ENUM(ThreadState, ThreadStateInUseForUser):
+ case ThreadState::ThreadStateInUseForUser:
return &ThreadMetrics::inUseForUser;
- case ICE_ENUM(ThreadState, ThreadStateInUseForOther):
+ case ThreadState::ThreadStateInUseForOther:
return &ThreadMetrics::inUseForOther;
default:
assert(false);
@@ -53,11 +53,11 @@ struct ThreadStateChanged
void operator()(const ThreadMetricsPtr& v)
{
- if(oldState != ICE_ENUM(ThreadState, ThreadStateIdle))
+ if(oldState != ThreadState::ThreadStateIdle)
{
--(v.get()->*getThreadStateMetric(oldState));
}
- if(newState != ICE_ENUM(ThreadState, ThreadStateIdle))
+ if(newState != ThreadState::ThreadStateIdle)
{
++(v.get()->*getThreadStateMetric(newState));
}
@@ -78,7 +78,7 @@ getIPConnectionInfo(const ConnectionInfoPtr& info)
return ipInfo;
}
}
- return ICE_NULLPTR;
+ return nullptr;
}
class ConnectionHelper : public MetricsHelperT
@@ -140,15 +140,15 @@ class ConnectionHelper : public MetricsHelperT
{
switch(_state)
{
- case ICE_ENUM(ConnectionState, ConnectionStateValidating):
+ case ConnectionState::ConnectionStateValidating:
return "validating";
- case ICE_ENUM(ConnectionState, ConnectionStateHolding):
+ case ConnectionState::ConnectionStateHolding:
return "holding";
- case ICE_ENUM(ConnectionState, ConnectionStateActive):
+ case ConnectionState::ConnectionStateActive:
return "active";
- case ICE_ENUM(ConnectionState, ConnectionStateClosing):
+ case ConnectionState::ConnectionStateClosing:
return "closing";
- case ICE_ENUM(ConnectionState, ConnectionStateClosed):
+ case ConnectionState::ConnectionStateClosed:
return "closed";
default:
assert(false);
@@ -680,7 +680,7 @@ class ThreadHelper : public MetricsHelperT
virtual void initMetrics(const ThreadMetricsPtr& v) const
{
- if(_state != ICE_ENUM(ThreadState, ThreadStateIdle))
+ if(_state != ThreadState::ThreadStateIdle)
{
++(v.get()->*getThreadStateMetric(_state));
}
@@ -879,7 +879,7 @@ InvocationObserverI::getRemoteObserver(const ConnectionInfoPtr& connection,
catch(const exception&)
{
}
- return ICE_NULLPTR;
+ return nullptr;
}
CollocatedObserverPtr
@@ -899,7 +899,7 @@ InvocationObserverI::getCollocatedObserver(const Ice::ObjectAdapterPtr& adapter,
catch(const exception&)
{
}
- return ICE_NULLPTR;
+ return nullptr;
}
CommunicatorObserverI::CommunicatorObserverI(const InitializationData& initData) :
@@ -947,7 +947,7 @@ CommunicatorObserverI::getConnectionEstablishmentObserver(const EndpointPtr& end
error << "unexpected exception trying to obtain observer:\n" << ex;
}
}
- return ICE_NULLPTR;
+ return nullptr;
}
ObserverPtr
@@ -970,7 +970,7 @@ CommunicatorObserverI::getEndpointLookupObserver(const EndpointPtr& endpt)
error << "unexpected exception trying to obtain observer:\n" << ex;
}
}
- return ICE_NULLPTR;
+ return nullptr;
}
ConnectionObserverPtr
@@ -997,7 +997,7 @@ CommunicatorObserverI::getConnectionObserver(const ConnectionInfoPtr& con,
error << "unexpected exception trying to obtain observer:\n" << ex;
}
}
- return ICE_NULLPTR;
+ return nullptr;
}
ThreadObserverPtr
@@ -1024,7 +1024,7 @@ CommunicatorObserverI::getThreadObserver(const string& parent,
error << "unexpected exception trying to obtain observer:\n" << ex;
}
}
- return ICE_NULLPTR;
+ return nullptr;
}
InvocationObserverPtr
@@ -1047,7 +1047,7 @@ CommunicatorObserverI::getInvocationObserver(const ObjectPrxPtr& proxy, const st
error << "unexpected exception trying to obtain observer:\n" << ex;
}
}
- return ICE_NULLPTR;
+ return nullptr;
}
DispatchObserverPtr
@@ -1070,7 +1070,7 @@ CommunicatorObserverI::getDispatchObserver(const Current& current, int size)
error << "unexpected exception trying to obtain observer:\n" << ex;
}
}
- return ICE_NULLPTR;
+ return nullptr;
}
const IceInternal::MetricsAdminIPtr&
diff --git a/cpp/src/Ice/InstrumentationI.h b/cpp/src/Ice/InstrumentationI.h
index da155ae8ca9..22467165789 100644
--- a/cpp/src/Ice/InstrumentationI.h
+++ b/cpp/src/Ice/InstrumentationI.h
@@ -16,7 +16,7 @@ template class ObserverWithDelegateT : public IceMX::Obs
public:
typedef O ObserverType;
- typedef typename ICE_INTERNAL_HANDLE ObserverPtrType;
+ typedef typename std::shared_ptr ObserverPtrType;
virtual void
attach()
{
@@ -63,7 +63,7 @@ template class ObserverWithDelegateT : public IceMX::Obs
getObserverWithDelegate(const std::string& mapName, const IceMX::MetricsHelperT& helper,
const ObserverPtrType& del)
{
- ICE_INTERNAL_HANDLE obsv = IceMX::ObserverT::template getObserver(mapName,
+ std::shared_ptr obsv = IceMX::ObserverT::template getObserver(mapName,
helper);
if(obsv)
{
@@ -90,7 +90,7 @@ template class ObserverFactoryWithDelegateT : public IceMX::Observer
template ObserverPtrType
getObserverWithDelegate(const IceMX::MetricsHelperT& helper, const ObserverPtrType& del)
{
- ICE_INTERNAL_HANDLE obsv = IceMX::ObserverFactoryT::getObserver(helper);
+ std::shared_ptr obsv = IceMX::ObserverFactoryT::getObserver(helper);
if(obsv)
{
obsv->setDelegate(del);
@@ -103,7 +103,7 @@ template class ObserverFactoryWithDelegateT : public IceMX::Observer
getObserverWithDelegate(const IceMX::MetricsHelperT& helper, const ObserverPtrType& del,
const ObserverPtrType& old)
{
- ICE_INTERNAL_HANDLE obsv = IceMX::ObserverFactoryT::getObserver(helper, old);
+ std::shared_ptr obsv = IceMX::ObserverFactoryT::getObserver(helper, old);
if(obsv)
{
obsv->setDelegate(del);
@@ -249,7 +249,7 @@ class ICE_API CommunicatorObserverI : public Ice::Instrumentation::CommunicatorO
ObserverFactoryWithDelegateT _connects;
ObserverFactoryWithDelegateT _endpointLookups;
};
-ICE_DEFINE_PTR(CommunicatorObserverIPtr, CommunicatorObserverI);
+using CommunicatorObserverIPtr = std::shared_ptr;
};
diff --git a/cpp/src/Ice/MetricsAdminI.cpp b/cpp/src/Ice/MetricsAdminI.cpp
index e8e44e01283..e71e96df1d0 100644
--- a/cpp/src/Ice/MetricsAdminI.cpp
+++ b/cpp/src/Ice/MetricsAdminI.cpp
@@ -75,7 +75,7 @@ parseRule(const PropertiesPtr& properties, const string& name)
{
try
{
- regexps.push_back(ICE_MAKE_SHARED(MetricsMapI::RegExp, p->first.substr(name.length() + 1), p->second));
+ regexps.push_back(make_shared(p->first.substr(name.length() + 1), p->second));
}
catch(const std::exception&)
{
@@ -92,7 +92,6 @@ MetricsMapI::RegExp::RegExp(const string& attribute, const string& regexp) : _at
_regex = regex(regexp, std::regex_constants::extended | std::regex_constants::nosubs);
}
-
bool
MetricsMapI::RegExp::match(const string& value)
{
@@ -157,11 +156,7 @@ MetricsMapI::MetricsMapI(const std::string& mapPrefix, const PropertiesPtr& prop
}
MetricsMapI::MetricsMapI(const MetricsMapI& map) :
-#if defined(ICE_CPP11_MAPPING)
std::enable_shared_from_this(),
-#elif defined(__GNUC__)
- IceUtil::Shared(),
-#endif
_properties(map._properties),
_groupByAttributes(map._groupByAttributes),
_groupBySeparators(map._groupBySeparators),
@@ -403,7 +398,7 @@ MetricsAdminI::updateViews()
map::const_iterator q = _views.find(viewName);
if(q == _views.end())
{
- q = views.insert(map::value_type(viewName, ICE_MAKE_SHARED(MetricsViewI, viewName))).first;
+ q = views.insert(map::value_type(viewName, make_shared(viewName))).first;
}
else
{
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index 9dda3b93973..e4d8c7c2931 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -674,7 +674,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
{
Lock sync(*this);
--_inUse;
- thread->setState(ICE_ENUM(ThreadState, ThreadStateIdle));
+ thread->setState(ThreadState::ThreadStateIdle);
return;
}
catch(const exception& ex)
@@ -765,7 +765,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
current._handler = ICE_GET_SHARED_FROM_THIS(_nextHandler->first);
current.operation = _nextHandler->second;
++_nextHandler;
- thread->setState(ICE_ENUM(ThreadState, ThreadStateInUseForIO));
+ thread->setState(ThreadState::ThreadStateInUseForIO);
}
else
{
@@ -789,7 +789,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
_handlers.clear();
_selector.startSelect();
select = true;
- thread->setState(ICE_ENUM(ThreadState, ThreadStateIdle));
+ thread->setState(ThreadState::ThreadStateIdle);
}
}
else if(_sizeMax > 1)
@@ -874,7 +874,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
{
IceUtil::Monitor::Lock sync(*this);
- thread->setState(ICE_ENUM(ThreadState, ThreadStateInUseForIO));
+ thread->setState(ThreadState::ThreadStateInUseForIO);
}
try
@@ -904,7 +904,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
assert(_inUse > 0);
--_inUse;
}
- thread->setState(ICE_ENUM(ThreadState, ThreadStateIdle));
+ thread->setState(ThreadState::ThreadStateIdle);
}
}
#endif
@@ -917,7 +917,7 @@ IceInternal::ThreadPool::ioCompleted(ThreadPoolCurrent& current)
current._ioCompleted = true; // Set the IO completed flag to specifiy that ioCompleted() has been called.
- current._thread->setState(ICE_ENUM(ThreadState, ThreadStateInUseForUser));
+ current._thread->setState(ThreadState::ThreadStateInUseForUser);
if(_sizeMax > 1)
{
@@ -1115,7 +1115,7 @@ IceInternal::ThreadPool::followerWait(ThreadPoolCurrent& current)
{
assert(!current._leader);
- current._thread->setState(ICE_ENUM(ThreadState, ThreadStateIdle));
+ current._thread->setState(ThreadState::ThreadStateIdle);
//
// It's important to clear the handler before waiting to make sure that
@@ -1172,7 +1172,7 @@ IceInternal::ThreadPool::nextThreadId()
IceInternal::ThreadPool::EventHandlerThread::EventHandlerThread(const ThreadPoolPtr& pool, const string& name) :
IceUtil::Thread(name),
_pool(pool),
- _state(ICE_ENUM(ThreadState, ThreadStateIdle))
+ _state(ThreadState::ThreadStateIdle)
{
updateObserver();
}
diff --git a/cpp/src/Ice/msbuild/ice++11/ice++11.vcxproj b/cpp/src/Ice/msbuild/ice++11/ice++11.vcxproj
index 648ad8c6e05..3307ea2d200 100644
--- a/cpp/src/Ice/msbuild/ice++11/ice++11.vcxproj
+++ b/cpp/src/Ice/msbuild/ice++11/ice++11.vcxproj
@@ -175,7 +175,6 @@
-
diff --git a/cpp/src/Ice/msbuild/ice++11/ice++11.vcxproj.filters b/cpp/src/Ice/msbuild/ice++11/ice++11.vcxproj.filters
index 2efa1e41993..fbdfc0fe7cc 100644
--- a/cpp/src/Ice/msbuild/ice++11/ice++11.vcxproj.filters
+++ b/cpp/src/Ice/msbuild/ice++11/ice++11.vcxproj.filters
@@ -612,9 +612,6 @@
Source Files
-
- Source Files
-
Source Files
diff --git a/cpp/src/Ice/msbuild/ice/ice.vcxproj b/cpp/src/Ice/msbuild/ice/ice.vcxproj
index 471701bf2be..104b7eee433 100644
--- a/cpp/src/Ice/msbuild/ice/ice.vcxproj
+++ b/cpp/src/Ice/msbuild/ice/ice.vcxproj
@@ -180,7 +180,6 @@
-
diff --git a/cpp/src/Ice/msbuild/ice/ice.vcxproj.filters b/cpp/src/Ice/msbuild/ice/ice.vcxproj.filters
index 4d45b3ab448..81f455012ec 100644
--- a/cpp/src/Ice/msbuild/ice/ice.vcxproj.filters
+++ b/cpp/src/Ice/msbuild/ice/ice.vcxproj.filters
@@ -635,9 +635,6 @@
Source Files
-
- Source Files
-
Source Files
diff --git a/cpp/test/Ice/metrics/Client.cpp b/cpp/test/Ice/metrics/Client.cpp
index b18327febf3..ff5d4ed4c44 100644
--- a/cpp/test/Ice/metrics/Client.cpp
+++ b/cpp/test/Ice/metrics/Client.cpp
@@ -26,7 +26,7 @@ Client::run(int argc, char** argv)
initData.properties->setProperty("Ice.Admin.InstanceName", "client");
initData.properties->setProperty("Ice.Admin.DelayCreation", "1");
initData.properties->setProperty("Ice.Warn.Connections", "0");
- CommunicatorObserverIPtr observer = ICE_MAKE_SHARED(CommunicatorObserverI);
+ CommunicatorObserverIPtr observer = make_shared();
initData.observer = observer;
Ice::CommunicatorHolder communicator = initialize(argc, argv, initData);
diff --git a/cpp/test/Ice/metrics/Collocated.cpp b/cpp/test/Ice/metrics/Collocated.cpp
index e5ba7df8bf1..745c09fd866 100644
--- a/cpp/test/Ice/metrics/Collocated.cpp
+++ b/cpp/test/Ice/metrics/Collocated.cpp
@@ -27,7 +27,7 @@ Collocated::run(int argc, char** argv)
initData.properties->setProperty("Ice.Admin.DelayCreation", "1");
initData.properties->setProperty("Ice.Warn.Connections", "0");
initData.properties->setProperty("Ice.Warn.Dispatch", "0");
- CommunicatorObserverIPtr observer = ICE_MAKE_SHARED(CommunicatorObserverI);
+ CommunicatorObserverIPtr observer = make_shared();
initData.observer = observer;
Ice::CommunicatorHolder communicator = initialize(argc, argv, initData);
diff --git a/cpp/test/Ice/metrics/InstrumentationI.h b/cpp/test/Ice/metrics/InstrumentationI.h
index a6085725a5c..64202c4943e 100644
--- a/cpp/test/Ice/metrics/InstrumentationI.h
+++ b/cpp/test/Ice/metrics/InstrumentationI.h
@@ -66,7 +66,7 @@ class ObserverI : public virtual Ice::Instrumentation::Observer, public IceUtil:
Ice::Int current;
Ice::Int failedCount;
};
-ICE_DEFINE_PTR(ObserverIPtr, ObserverI);
+using ObserverIPtr = std::shared_ptr;
class ConnectionObserverI : public Ice::Instrumentation::ConnectionObserver, public ObserverI
{
@@ -98,7 +98,7 @@ class ConnectionObserverI : public Ice::Instrumentation::ConnectionObserver, pub
Ice::Int sent;
Ice::Int received;
};
-ICE_DEFINE_PTR(ConnectionObserverIPtr, ConnectionObserverI);
+using ConnectionObserverIPtr = std::shared_ptr;
class ThreadObserverI : public Ice::Instrumentation::ThreadObserver, public ObserverI
{
@@ -121,7 +121,7 @@ class ThreadObserverI : public Ice::Instrumentation::ThreadObserver, public Obse
Ice::Int states;
};
-ICE_DEFINE_PTR(ThreadObserverIPtr, ThreadObserverI);
+using ThreadObserverIPtr = std::shared_ptr;
class DispatchObserverI : public Ice::Instrumentation::DispatchObserver, public ObserverI
{
@@ -152,7 +152,7 @@ class DispatchObserverI : public Ice::Instrumentation::DispatchObserver, public
Ice::Int userExceptionCount;
Ice::Int replySize;
};
-ICE_DEFINE_PTR(DispatchObserverIPtr, DispatchObserverI);
+using DispatchObserverIPtr = std::shared_ptr;
class ChildInvocationObserverI : public virtual Ice::Instrumentation::ChildInvocationObserver, public ObserverI
{
@@ -175,17 +175,17 @@ class ChildInvocationObserverI : public virtual Ice::Instrumentation::ChildInvoc
Ice::Int replySize;
};
-ICE_DEFINE_PTR(ChildInvocationObserverIPtr, ChildInvocationObserverI);
+using ChildInvocationObserverIPtr = std::shared_ptr;
class RemoteObserverI : public Ice::Instrumentation::RemoteObserver, public ChildInvocationObserverI
{
};
-ICE_DEFINE_PTR(RemoteObserverIPtr, RemoteObserverI);
+using RemoteObserverIPtr = std::shared_ptr;
class CollocatedObserverI : public Ice::Instrumentation::CollocatedObserver, public ChildInvocationObserverI
{
};
-ICE_DEFINE_PTR(CollocatedObserverIPtr, CollocatedObserverI);
+using CollocatedObserverIPtr = std::shared_ptr;
class InvocationObserverI : public Ice::Instrumentation::InvocationObserver, public ObserverI
{
@@ -227,7 +227,7 @@ class InvocationObserverI : public Ice::Instrumentation::InvocationObserver, pub
IceUtil::Mutex::Lock sync(*this);
if(!remoteObserver)
{
- remoteObserver = ICE_MAKE_SHARED(RemoteObserverI);
+ remoteObserver = std::make_shared();
remoteObserver->reset();
}
return remoteObserver;
@@ -239,7 +239,7 @@ class InvocationObserverI : public Ice::Instrumentation::InvocationObserver, pub
IceUtil::Mutex::Lock sync(*this);
if(!collocatedObserver)
{
- collocatedObserver = ICE_MAKE_SHARED(CollocatedObserverI);
+ collocatedObserver = std::make_shared();
collocatedObserver->reset();
}
return collocatedObserver;
@@ -251,7 +251,7 @@ class InvocationObserverI : public Ice::Instrumentation::InvocationObserver, pub
RemoteObserverIPtr remoteObserver;
CollocatedObserverIPtr collocatedObserver;
};
-ICE_DEFINE_PTR(InvocationObserverIPtr, InvocationObserverI);
+using InvocationObserverIPtr = std::shared_ptr;
class CommunicatorObserverI : public Ice::Instrumentation::CommunicatorObserver, public IceUtil::Mutex
{
@@ -269,7 +269,7 @@ class CommunicatorObserverI : public Ice::Instrumentation::CommunicatorObserver,
IceUtil::Mutex::Lock sync(*this);
if(!connectionEstablishmentObserver)
{
- connectionEstablishmentObserver = ICE_MAKE_SHARED(ObserverI);
+ connectionEstablishmentObserver = std::make_shared