summaryrefslogtreecommitdiff
path: root/cpp/include
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/include')
-rw-r--r--cpp/include/Ice/ACMF.h36
-rw-r--r--cpp/include/Ice/AsyncResultF.h9
-rw-r--r--cpp/include/Ice/ConnectionFactoryF.h35
-rw-r--r--cpp/include/Ice/ConnectionIF.h2
-rw-r--r--cpp/include/Ice/IncomingAsyncF.h4
-rw-r--r--cpp/include/Ice/InterfaceByValue.h17
-rw-r--r--cpp/include/Ice/MetricsObserverI.h6
-rw-r--r--cpp/include/Ice/ObjectAdapterFactoryF.h30
-rw-r--r--cpp/include/Ice/ObjectF.h4
-rw-r--r--cpp/include/Ice/ObserverHelper.h2
-rw-r--r--cpp/include/Ice/OutgoingAsyncF.h9
-rw-r--r--cpp/include/Ice/Proxy.h4
-rw-r--r--cpp/include/Ice/ProxyF.h34
-rw-r--r--cpp/include/Ice/RequestHandlerF.h4
-rw-r--r--cpp/include/Ice/ResponseHandlerF.h2
-rw-r--r--cpp/include/Ice/SlicedData.h36
-rw-r--r--cpp/include/Ice/SlicedDataF.h6
-rw-r--r--cpp/include/Ice/ValueF.h16
-rw-r--r--cpp/include/IceUtil/Config.h2
19 files changed, 64 insertions, 194 deletions
diff --git a/cpp/include/Ice/ACMF.h b/cpp/include/Ice/ACMF.h
deleted file mode 100644
index ce4fa07c9ad..00000000000
--- a/cpp/include/Ice/ACMF.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-#ifndef ICE_ACM_F_H
-#define ICE_ACM_F_H
-
-#include <IceUtil/Shared.h>
-
-#include <Ice/Handle.h>
-
-namespace IceInternal
-{
-
-class ACMMonitor;
-class FactoryACMMonitor;
-
-#ifdef ICE_CPP11_MAPPING
-typedef ::std::shared_ptr<ACMMonitor> ACMMonitorPtr;
-typedef ::std::shared_ptr<FactoryACMMonitor> FactoryACMMonitorPtr;
-#else
-ICE_API IceUtil::Shared* upCast(ACMMonitor*);
-typedef IceInternal::Handle<ACMMonitor> ACMMonitorPtr;
-
-ICE_API IceUtil::Shared* upCast(FactoryACMMonitor*);
-typedef IceInternal::Handle<FactoryACMMonitor> FactoryACMMonitorPtr;
-#endif
-
-}
-
-#endif
diff --git a/cpp/include/Ice/AsyncResultF.h b/cpp/include/Ice/AsyncResultF.h
index a822ef46993..13d904f81d2 100644
--- a/cpp/include/Ice/AsyncResultF.h
+++ b/cpp/include/Ice/AsyncResultF.h
@@ -10,22 +10,19 @@
#ifndef ICE_ASYNC_RESULT_F_H
#define ICE_ASYNC_RESULT_F_H
-#include <IceUtil/Shared.h>
+#ifndef ICE_CPP11_MAPPING
+#include <IceUtil/Shared.h>
#include <Ice/Handle.h>
namespace Ice
{
class AsyncResult;
-
-#ifdef ICE_CPP11_MAPPING
-typedef ::std::shared_ptr<AsyncResult> AsyncResultPtr;
-#else
ICE_API IceUtil::Shared* upCast(::Ice::AsyncResult*);
typedef IceInternal::Handle<AsyncResult> AsyncResultPtr;
-#endif
}
#endif
+#endif
diff --git a/cpp/include/Ice/ConnectionFactoryF.h b/cpp/include/Ice/ConnectionFactoryF.h
deleted file mode 100644
index 7e35fc37c31..00000000000
--- a/cpp/include/Ice/ConnectionFactoryF.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-#ifndef ICE_CONNECTION_FACTORY_F_H
-#define ICE_CONNECTION_FACTORY_F_H
-
-#include <IceUtil/Shared.h>
-
-#include <Ice/Handle.h>
-
-namespace IceInternal
-{
-
-class OutgoingConnectionFactory;
-ICE_API IceUtil::Shared* upCast(OutgoingConnectionFactory*);
-typedef IceInternal::Handle<OutgoingConnectionFactory> OutgoingConnectionFactoryPtr;
-
-class IncomingConnectionFactory;
-
-#ifdef ICE_CPP11_MAPPING
-typedef ::std::shared_ptr<IncomingConnectionFactory> IncomingConnectionFactoryPtr;
-#else
-ICE_API IceUtil::Shared* upCast(IncomingConnectionFactory*);
-typedef IceInternal::Handle<IncomingConnectionFactory> IncomingConnectionFactoryPtr;
-#endif
-
-}
-
-#endif
diff --git a/cpp/include/Ice/ConnectionIF.h b/cpp/include/Ice/ConnectionIF.h
index 3301b470ecf..1543affe3fe 100644
--- a/cpp/include/Ice/ConnectionIF.h
+++ b/cpp/include/Ice/ConnectionIF.h
@@ -18,7 +18,7 @@ namespace Ice
class ConnectionI;
#ifdef ICE_CPP11_MAPPING // C++11 mapping
-typedef ::std::shared_ptr<ConnectionI> ConnectionIPtr;
+using ConnectionIPtr = ::std::shared_ptr<ConnectionI>;
#else // C++98 mapping
ICE_API Ice::LocalObject* upCast(Ice::ConnectionI*);
typedef IceInternal::Handle<ConnectionI> ConnectionIPtr;
diff --git a/cpp/include/Ice/IncomingAsyncF.h b/cpp/include/Ice/IncomingAsyncF.h
index 32dd5ed5bd1..5161faa8a15 100644
--- a/cpp/include/Ice/IncomingAsyncF.h
+++ b/cpp/include/Ice/IncomingAsyncF.h
@@ -19,9 +19,9 @@ namespace IceInternal
{
class IncomingAsync;
-typedef std::shared_ptr<IncomingAsync> IncomingAsyncPtr;
+using IncomingAsyncPtr = ::std::shared_ptr<IncomingAsync>;
-};
+}
#else
namespace IceInternal
{
diff --git a/cpp/include/Ice/InterfaceByValue.h b/cpp/include/Ice/InterfaceByValue.h
index c0b3c437463..6e1bd42590c 100644
--- a/cpp/include/Ice/InterfaceByValue.h
+++ b/cpp/include/Ice/InterfaceByValue.h
@@ -20,7 +20,7 @@ namespace Ice
{
template<typename T>
-class InterfaceByValue : public Ice::ValueHelper<Ice::InterfaceByValue<T>, Ice::Value>
+class InterfaceByValue : public ValueHelper<InterfaceByValue<T>, Value>
{
public:
virtual std::string ice_id() const
@@ -32,18 +32,11 @@ public:
{
return T::ice_staticId();
}
-};
-
-template<typename S, typename T>
-struct StreamWriter<Ice::InterfaceByValue<T>, S>
-{
- static void write(S* __os, const Ice::InterfaceByValue<T>& v) { }
-};
-template<typename S, typename T>
-struct StreamReader<Ice::InterfaceByValue<T>, S>
-{
- static void read(S* __is, Ice::InterfaceByValue<T>& v) { }
+ std::tuple<> ice_tuple() const
+ {
+ return std::tie();
+ }
};
}
diff --git a/cpp/include/Ice/MetricsObserverI.h b/cpp/include/Ice/MetricsObserverI.h
index 39b1f08f61b..3ef9af54d84 100644
--- a/cpp/include/Ice/MetricsObserverI.h
+++ b/cpp/include/Ice/MetricsObserverI.h
@@ -489,9 +489,9 @@ class ObserverFactoryT : public Updater, private IceUtil::Mutex
public:
#ifdef ICE_CPP11_MAPPING
- typedef ::std::shared_ptr<ObserverImplType> ObserverImplPtrType;
- typedef typename ObserverImplType::MetricsType MetricsType;
- typedef std::vector<::std::shared_ptr<IceInternal::MetricsMapT<MetricsType> > > MetricsMapSeqType;
+ using ObserverImplPtrType = ::std::shared_ptr<ObserverImplType>;
+ using MetricsType = typename ObserverImplType::MetricsType;
+ using MetricsMapSeqType = std::vector<::std::shared_ptr<IceInternal::MetricsMapT<MetricsType>>>;
#else
typedef IceUtil::Handle<ObserverImplType> ObserverImplPtrType;
typedef typename ObserverImplType::MetricsType MetricsType;
diff --git a/cpp/include/Ice/ObjectAdapterFactoryF.h b/cpp/include/Ice/ObjectAdapterFactoryF.h
deleted file mode 100644
index 6fa675cd8dc..00000000000
--- a/cpp/include/Ice/ObjectAdapterFactoryF.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-#ifndef ICE_OBJECT_ADAPTER_FACTORY_F_H
-#define ICE_OBJECT_ADAPTER_FACTORY_F_H
-
-#include <IceUtil/Shared.h>
-
-#include <Ice/Handle.h>
-
-namespace IceInternal
-{
-
-class ObjectAdapterFactory;
-#ifdef ICE_CPP11_MAPPING
-typedef ::std::shared_ptr<ObjectAdapterFactory> ObjectAdapterFactoryPtr;
-#else
-IceUtil::Shared* upCast(ObjectAdapterFactory*);
-typedef IceInternal::Handle<ObjectAdapterFactory> ObjectAdapterFactoryPtr;
-#endif
-
-}
-
-#endif
diff --git a/cpp/include/Ice/ObjectF.h b/cpp/include/Ice/ObjectF.h
index 328a7f1b4c8..eb157fac899 100644
--- a/cpp/include/Ice/ObjectF.h
+++ b/cpp/include/Ice/ObjectF.h
@@ -18,10 +18,10 @@ namespace Ice
class Object;
#ifdef ICE_CPP11_MAPPING
-typedef ::std::shared_ptr<Object> ObjectPtr;
+using ObjectPtr = ::std::shared_ptr<Object>;
#else
ICE_API Object* upCast(Object*);
-typedef IceInternal::Handle< Object > ObjectPtr;
+typedef IceInternal::Handle<Object> ObjectPtr;
typedef ObjectPtr ValuePtr;
ICE_API void __patch(ObjectPtr&, const ObjectPtr&);
#endif
diff --git a/cpp/include/Ice/ObserverHelper.h b/cpp/include/Ice/ObserverHelper.h
index 468fba6d498..0cf15178dcf 100644
--- a/cpp/include/Ice/ObserverHelper.h
+++ b/cpp/include/Ice/ObserverHelper.h
@@ -22,7 +22,7 @@ template<typename T = Ice::Instrumentation::Observer> class ObserverHelperT
public:
#ifdef ICE_CPP11_MAPPING
- typedef ::std::shared_ptr<T> TPtr;
+ using TPtr = ::std::shared_ptr<T>;
#else
typedef IceInternal::Handle<T> TPtr;
#endif
diff --git a/cpp/include/Ice/OutgoingAsyncF.h b/cpp/include/Ice/OutgoingAsyncF.h
index ec8f9e4a1e7..356b2843a30 100644
--- a/cpp/include/Ice/OutgoingAsyncF.h
+++ b/cpp/include/Ice/OutgoingAsyncF.h
@@ -11,7 +11,6 @@
#define ICE_OUTGOING_ASYNC_F_H
#include <IceUtil/Shared.h>
-
#include <Ice/Handle.h>
namespace IceInternal
@@ -23,10 +22,10 @@ class ProxyOutgoingAsyncBase;
class CommunicatorFlushBatchAsync;
#ifdef ICE_CPP11_MAPPING
-typedef ::std::shared_ptr<OutgoingAsyncBase> OutgoingAsyncBasePtr;
-typedef ::std::shared_ptr<OutgoingAsync> OutgoingAsyncPtr;
-typedef ::std::shared_ptr<ProxyOutgoingAsyncBase> ProxyOutgoingAsyncBasePtr;
-typedef ::std::shared_ptr<CommunicatorFlushBatchAsync> CommunicatorFlushBatchAsyncPtr;
+using OutgoingAsyncBasePtr = ::std::shared_ptr<OutgoingAsyncBase>;
+using OutgoingAsyncPtr = ::std::shared_ptr<OutgoingAsync>;
+using ProxyOutgoingAsyncBasePtr = ::std::shared_ptr<ProxyOutgoingAsyncBase>;
+using CommunicatorFlushBatchAsyncPtr = ::std::shared_ptr<CommunicatorFlushBatchAsync>;
#else
ICE_API IceUtil::Shared* upCast(OutgoingAsyncBase*);
typedef IceInternal::Handle<OutgoingAsyncBase> OutgoingAsyncBasePtr;
diff --git a/cpp/include/Ice/Proxy.h b/cpp/include/Ice/Proxy.h
index b378095994b..ced24b6bcc9 100644
--- a/cpp/include/Ice/Proxy.h
+++ b/cpp/include/Ice/Proxy.h
@@ -238,10 +238,10 @@ namespace Ice
{
class RouterPrx;
-typedef ::std::shared_ptr<::Ice::RouterPrx> RouterPrxPtr;
+using RouterPrxPtr = ::std::shared_ptr<::Ice::RouterPrx>;
class LocatorPrx;
-typedef ::std::shared_ptr<::Ice::LocatorPrx> LocatorPrxPtr;
+using LocatorPrxPtr = ::std::shared_ptr<::Ice::LocatorPrx>;
class LocalException;
class OutputStream;
diff --git a/cpp/include/Ice/ProxyF.h b/cpp/include/Ice/ProxyF.h
index 9c4c4486bef..025ab41b044 100644
--- a/cpp/include/Ice/ProxyF.h
+++ b/cpp/include/Ice/ProxyF.h
@@ -13,46 +13,44 @@
#include <Ice/Config.h>
#include <Ice/ProxyHandle.h>
-#ifndef ICE_CPP11_MAPPING // C++98 mapping
-namespace IceProxy
-{
-
+#ifdef ICE_CPP11_MAPPING
namespace Ice
{
-class Object;
-inline Object* upCast(Object* o) { return o; }
-
-}
+class ObjectPrx;
+using ObjectPrxPtr = ::std::shared_ptr<ObjectPrx>;
}
-namespace Ice
+namespace IceInternal
{
-typedef IceInternal::ProxyHandle< ::IceProxy::Ice::Object> ObjectPrx;
-typedef ObjectPrx ObjectPrxPtr;
+template<typename P>
+::std::shared_ptr<P> createProxy();
}
-#else // C++11 mapping
+#else // C++98 mapping
+namespace IceProxy
+{
namespace Ice
{
-class ObjectPrx;
-typedef ::std::shared_ptr<ObjectPrx> ObjectPrxPtr;
+class Object;
+inline Object* upCast(Object* o) { return o; }
}
-namespace IceInternal
+}
+
+namespace Ice
{
-template<typename P>
-::std::shared_ptr<P> createProxy();
+typedef IceInternal::ProxyHandle< ::IceProxy::Ice::Object> ObjectPrx;
+typedef ObjectPrx ObjectPrxPtr;
}
#endif
-
#endif
diff --git a/cpp/include/Ice/RequestHandlerF.h b/cpp/include/Ice/RequestHandlerF.h
index f5e47f3c1c7..c4deca41076 100644
--- a/cpp/include/Ice/RequestHandlerF.h
+++ b/cpp/include/Ice/RequestHandlerF.h
@@ -20,8 +20,8 @@ class CancellationHandler;
class RequestHandler;
#ifdef ICE_CPP11_MAPPING
-typedef ::std::shared_ptr<CancellationHandler> CancellationHandlerPtr;
-typedef ::std::shared_ptr<RequestHandler> RequestHandlerPtr;
+using CancellationHandlerPtr = ::std::shared_ptr<CancellationHandler>;
+using RequestHandlerPtr = ::std::shared_ptr<RequestHandler>;
#else
ICE_API IceUtil::Shared* upCast(CancellationHandler*);
typedef IceInternal::Handle<CancellationHandler> CancellationHandlerPtr;
diff --git a/cpp/include/Ice/ResponseHandlerF.h b/cpp/include/Ice/ResponseHandlerF.h
index f0be6cab9c3..b75ffba27ff 100644
--- a/cpp/include/Ice/ResponseHandlerF.h
+++ b/cpp/include/Ice/ResponseHandlerF.h
@@ -19,7 +19,7 @@ namespace IceInternal
class ResponseHandler;
#ifdef ICE_CPP11_MAPPING
-typedef ::std::shared_ptr<ResponseHandler> ResponseHandlerPtr;
+using ResponseHandlerPtr = ::std::shared_ptr<ResponseHandler>;
#else
ICE_API IceUtil::Shared* upCast(ResponseHandler*);
typedef IceInternal::Handle<ResponseHandler> ResponseHandlerPtr;
diff --git a/cpp/include/Ice/SlicedData.h b/cpp/include/Ice/SlicedData.h
index 2b005d2b01a..dcd322b661b 100644
--- a/cpp/include/Ice/SlicedData.h
+++ b/cpp/include/Ice/SlicedData.h
@@ -82,13 +82,10 @@ public:
// Unknown sliced object holds instance of unknown type.
//
class ICE_API UnknownSlicedValue :
-#if defined(ICE_CPP11_MAPPING)
- public ValueHelper<UnknownSlicedValue, Value>
-#elif defined(__IBMCPP__)
-// xlC does not handle properly the public/private multiple inheritance from Object
- public IceInternal::GCObject
+#ifdef ICE_CPP11_MAPPING
+ public Value
#else
- virtual public Object, private IceInternal::GCObject
+ public IceInternal::GCObject
#endif
{
public:
@@ -99,12 +96,22 @@ public:
SlicedDataPtr getSlicedData() const;
-#ifndef ICE_CPP11_MAPPING
+#ifdef ICE_CPP11_MAPPING
+ virtual void __write(::Ice::OutputStream*) const override;
+ virtual void __read(::Ice::InputStream*) override;
+
+ virtual std::string ice_id() const override;
+ std::shared_ptr<UnknownSlicedValue> ice_clone() const;
+
+protected:
+
+ virtual std::shared_ptr<Value> cloneImpl() const override;
+#else
virtual void __gcVisitMembers(IceInternal::GCVisitor&);
-#endif
virtual void __write(::Ice::OutputStream*) const;
virtual void __read(::Ice::InputStream*);
+#endif
private:
@@ -112,19 +119,6 @@ private:
SlicedDataPtr _slicedData;
};
-#if defined(ICE_CPP11_MAPPING)
-template<typename S>
-struct StreamWriter<UnknownSlicedValue, S>
-{
- static void write(S* __os, const UnknownSlicedValue& v) { }
-};
-template<typename S>
-struct StreamReader<UnknownSlicedValue, S>
-{
- static void read(S* __is, UnknownSlicedValue& v) { }
-};
-#endif
-
}
#endif
diff --git a/cpp/include/Ice/SlicedDataF.h b/cpp/include/Ice/SlicedDataF.h
index b63ef68eea4..ebaed237f3b 100644
--- a/cpp/include/Ice/SlicedDataF.h
+++ b/cpp/include/Ice/SlicedDataF.h
@@ -21,9 +21,9 @@ class SlicedData;
class UnknownSlicedValue;
#ifdef ICE_CPP11_MAPPING
-typedef ::std::shared_ptr<SliceInfo> SliceInfoPtr;
-typedef ::std::shared_ptr<SlicedData> SlicedDataPtr;
-typedef ::std::shared_ptr<UnknownSlicedValue> UnknownSlicedValuePtr;
+using SliceInfoPtr = ::std::shared_ptr<SliceInfo>;
+using SlicedDataPtr = ::std::shared_ptr<SlicedData>;
+using UnknownSlicedValuePtr = ::std::shared_ptr<UnknownSlicedValue>;
#else
ICE_API IceUtil::Shared* upCast(SliceInfo*);
typedef IceInternal::Handle<SliceInfo> SliceInfoPtr;
diff --git a/cpp/include/Ice/ValueF.h b/cpp/include/Ice/ValueF.h
index 6ef2517ebf9..f64789ef3ca 100644
--- a/cpp/include/Ice/ValueF.h
+++ b/cpp/include/Ice/ValueF.h
@@ -10,25 +10,15 @@
#ifndef ICE_VALUE_F_H
#define ICE_VALUE_F_H
-#include <IceUtil/Shared.h>
-#include <Ice/Handle.h>
-#include <Ice/ObjectF.h>
+#ifdef ICE_CPP11_MAPPING
+#include <IceUtil/Config.h>
-#ifdef ICE_CPP11_MAPPING // C++11 mapping
namespace Ice
{
class Value;
-typedef ::std::shared_ptr< ::Ice::Value> ValuePtr;
-ICE_API void __patch(ValuePtr&, const ValuePtr&);
+using ValuePtr = ::std::shared_ptr<Value>;
}
-#else // C++98 mapping
-//
-// Define value as an alias to Object
-//
-//typedef ::Ice::Object Value;
-//typedef ::Ice::ObjectPtr ValuePtr;
#endif
-
#endif
diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h
index 1748d25aab3..e4b3d9997cc 100644
--- a/cpp/include/IceUtil/Config.h
+++ b/cpp/include/IceUtil/Config.h
@@ -362,7 +362,7 @@ typedef long long Int64;
# define ICE_INTERNAL_HANDLE ::std::shared_ptr
# define ICE_PROXY_HANDLE ::std::shared_ptr
# define ICE_MAKE_SHARED(T, ...) ::std::make_shared<T>(__VA_ARGS__)
-# define ICE_DEFINE_PTR(TPtr, T) typedef ::std::shared_ptr<T> TPtr
+# define ICE_DEFINE_PTR(TPtr, T) using TPtr = ::std::shared_ptr<T>
# define ICE_ENUM(CLASS,ENUMERATOR) CLASS::ENUMERATOR
# define ICE_NULLPTR nullptr
# define ICE_DYNAMIC_CAST(T,V) ::std::dynamic_pointer_cast<T>(V)