diff options
28 files changed, 107 insertions, 131 deletions
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/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/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) diff --git a/cpp/include/Ice/ACMF.h b/cpp/src/Ice/ACMF.h index ce4fa07c9ad..9f7f17d26fa 100644 --- a/cpp/include/Ice/ACMF.h +++ b/cpp/src/Ice/ACMF.h @@ -11,7 +11,6 @@ #define ICE_ACM_F_H #include <IceUtil/Shared.h> - #include <Ice/Handle.h> namespace IceInternal @@ -21,13 +20,13 @@ class ACMMonitor; class FactoryACMMonitor; #ifdef ICE_CPP11_MAPPING -typedef ::std::shared_ptr<ACMMonitor> ACMMonitorPtr; -typedef ::std::shared_ptr<FactoryACMMonitor> FactoryACMMonitorPtr; +using ACMMonitorPtr = ::std::shared_ptr<ACMMonitor>; +using FactoryACMMonitorPtr = ::std::shared_ptr<FactoryACMMonitor>; #else -ICE_API IceUtil::Shared* upCast(ACMMonitor*); +IceUtil::Shared* upCast(ACMMonitor*); typedef IceInternal::Handle<ACMMonitor> ACMMonitorPtr; -ICE_API IceUtil::Shared* upCast(FactoryACMMonitor*); +IceUtil::Shared* upCast(FactoryACMMonitor*); typedef IceInternal::Handle<FactoryACMMonitor> FactoryACMMonitorPtr; #endif diff --git a/cpp/src/Ice/ConnectRequestHandlerF.h b/cpp/src/Ice/ConnectRequestHandlerF.h index 3ed40897176..974ca6f05fc 100644 --- a/cpp/src/Ice/ConnectRequestHandlerF.h +++ b/cpp/src/Ice/ConnectRequestHandlerF.h @@ -18,9 +18,9 @@ namespace IceInternal class ConnectRequestHandler; #ifdef ICE_CPP11_MAPPING -typedef ::std::shared_ptr<ConnectRequestHandler> ConnectRequestHandlerPtr; +using ConnectRequestHandlerPtr = ::std::shared_ptr<ConnectRequestHandler>; #else -ICE_API IceUtil::Shared* upCast(ConnectRequestHandler*); +IceUtil::Shared* upCast(ConnectRequestHandler*); typedef IceInternal::Handle<ConnectRequestHandler> ConnectRequestHandlerPtr; #endif diff --git a/cpp/include/Ice/ConnectionFactoryF.h b/cpp/src/Ice/ConnectionFactoryF.h index 7e35fc37c31..033d61b9761 100644 --- a/cpp/include/Ice/ConnectionFactoryF.h +++ b/cpp/src/Ice/ConnectionFactoryF.h @@ -18,15 +18,15 @@ namespace IceInternal { class OutgoingConnectionFactory; -ICE_API IceUtil::Shared* upCast(OutgoingConnectionFactory*); +IceUtil::Shared* upCast(OutgoingConnectionFactory*); typedef IceInternal::Handle<OutgoingConnectionFactory> OutgoingConnectionFactoryPtr; class IncomingConnectionFactory; #ifdef ICE_CPP11_MAPPING -typedef ::std::shared_ptr<IncomingConnectionFactory> IncomingConnectionFactoryPtr; +using IncomingConnectionFactoryPtr = ::std::shared_ptr<IncomingConnectionFactory>; #else -ICE_API IceUtil::Shared* upCast(IncomingConnectionFactory*); +IceUtil::Shared* upCast(IncomingConnectionFactory*); typedef IceInternal::Handle<IncomingConnectionFactory> IncomingConnectionFactoryPtr; #endif diff --git a/cpp/src/Ice/ConnectionI.h b/cpp/src/Ice/ConnectionI.h index d10213fa5c4..023ac044e5b 100644 --- a/cpp/src/Ice/ConnectionI.h +++ b/cpp/src/Ice/ConnectionI.h @@ -147,7 +147,7 @@ public: virtual void connectionStartCompleted(const ConnectionIPtr&) = 0; virtual void connectionStartFailed(const ConnectionIPtr&, const Ice::LocalException&) = 0; }; - typedef ::std::shared_ptr<StartCallback> StartCallbackPtr; + using StartCallbackPtr = ::std::shared_ptr<StartCallback>; #else class StartCallback : public virtual IceUtil::Shared { diff --git a/cpp/src/Ice/EndpointIF.h b/cpp/src/Ice/EndpointIF.h index c3a4c767772..55449a594d4 100644 --- a/cpp/src/Ice/EndpointIF.h +++ b/cpp/src/Ice/EndpointIF.h @@ -24,11 +24,11 @@ class EndpointI_connectors; #ifdef ICE_CPP11_MAPPING // C++11 mapping -typedef ::std::shared_ptr<EndpointI> EndpointIPtr; -typedef ::std::shared_ptr<TcpEndpointI> TcpEndpointIPtr; -typedef ::std::shared_ptr<UdpEndpointI> UdpEndpointIPtr; -typedef ::std::shared_ptr<WSEndpoint> WSEndpointPtr; -typedef ::std::shared_ptr<EndpointI_connectors> EndpointI_connectorsPtr; +using EndpointIPtr = ::std::shared_ptr<EndpointI>; +using TcpEndpointIPtr = ::std::shared_ptr<TcpEndpointI>; +using UdpEndpointIPtr = ::std::shared_ptr<UdpEndpointI>; +using WSEndpointPtr = ::std::shared_ptr<WSEndpoint>; +using EndpointI_connectorsPtr = ::std::shared_ptr<EndpointI_connectors>; #else // C++98 mapping diff --git a/cpp/src/Ice/EventHandlerF.h b/cpp/src/Ice/EventHandlerF.h index 722329efa73..750efeec97a 100644 --- a/cpp/src/Ice/EventHandlerF.h +++ b/cpp/src/Ice/EventHandlerF.h @@ -19,7 +19,7 @@ namespace IceInternal class EventHandler; #ifdef ICE_CPP11_MAPPING -typedef ::std::shared_ptr<EventHandler> EventHandlerPtr; +using EventHandlerPtr = ::std::shared_ptr<EventHandler>; #else ICE_API IceUtil::Shared* upCast(EventHandler*); typedef Handle<EventHandler> EventHandlerPtr; diff --git a/cpp/src/Ice/IPEndpointIF.h b/cpp/src/Ice/IPEndpointIF.h index bc8513b4bd4..4a346f5b545 100644 --- a/cpp/src/Ice/IPEndpointIF.h +++ b/cpp/src/Ice/IPEndpointIF.h @@ -19,7 +19,7 @@ namespace IceInternal class IPEndpointI; #ifdef ICE_CPP11_MAPPING -typedef ::std::shared_ptr<IPEndpointI> IPEndpointIPtr; +using IPEndpointIPtr = ::std::shared_ptr<IPEndpointI>; #else ICE_API IceUtil::Shared* upCast(IPEndpointI*); typedef Handle<IPEndpointI> IPEndpointIPtr; diff --git a/cpp/include/Ice/ObjectAdapterFactoryF.h b/cpp/src/Ice/ObjectAdapterFactoryF.h index 6fa675cd8dc..ab292e47d51 100644 --- a/cpp/include/Ice/ObjectAdapterFactoryF.h +++ b/cpp/src/Ice/ObjectAdapterFactoryF.h @@ -19,7 +19,7 @@ namespace IceInternal class ObjectAdapterFactory; #ifdef ICE_CPP11_MAPPING -typedef ::std::shared_ptr<ObjectAdapterFactory> ObjectAdapterFactoryPtr; +using ObjectAdapterFactoryPtr = ::std::shared_ptr<ObjectAdapterFactory>; #else IceUtil::Shared* upCast(ObjectAdapterFactory*); typedef IceInternal::Handle<ObjectAdapterFactory> ObjectAdapterFactoryPtr; diff --git a/cpp/src/Ice/SlicedData.cpp b/cpp/src/Ice/SlicedData.cpp index ca2b28e5cef..6a433ffbe4d 100644 --- a/cpp/src/Ice/SlicedData.cpp +++ b/cpp/src/Ice/SlicedData.cpp @@ -58,6 +58,7 @@ Ice::UnknownSlicedValue::__gcVisitMembers(IceInternal::GCVisitor& _v) _slicedData->__gcVisitMembers(_v); } } + #endif Ice::UnknownSlicedValue::UnknownSlicedValue(const string& unknownTypeId) : _unknownTypeId(unknownTypeId) @@ -89,3 +90,25 @@ Ice::UnknownSlicedValue::__read(Ice::InputStream* __is) __is->startValue(); _slicedData = __is->endValue(true); } + +#ifdef ICE_CPP11_MAPPING + +string +Ice::UnknownSlicedValue::ice_id() const +{ + return _unknownTypeId; +} + +shared_ptr<Ice::UnknownSlicedValue> +Ice::UnknownSlicedValue::ice_clone() const +{ + return static_pointer_cast<UnknownSlicedValue>(cloneImpl()); +} + +shared_ptr<Ice::Value> +Ice::UnknownSlicedValue::cloneImpl() const +{ + return make_shared<UnknownSlicedValue>(static_cast<const UnknownSlicedValue&>(*this)); +} + +#endif diff --git a/cpp/src/Ice/TraceLevels.cpp b/cpp/src/Ice/TraceLevels.cpp index 09de5048d00..dcdc5f7afb3 100644 --- a/cpp/src/Ice/TraceLevels.cpp +++ b/cpp/src/Ice/TraceLevels.cpp @@ -14,7 +14,7 @@ using namespace std; using namespace Ice; using namespace IceInternal; -ICE_API IceUtil::Shared* IceInternal::upCast(TraceLevels* p) { return p; } +IceUtil::Shared* IceInternal::upCast(TraceLevels* p) { return p; } IceInternal::TraceLevels::TraceLevels(const PropertiesPtr& properties) : network(0), diff --git a/cpp/src/Ice/TraceLevelsF.h b/cpp/src/Ice/TraceLevelsF.h index 52bd4e77c71..a2012c702ba 100644 --- a/cpp/src/Ice/TraceLevelsF.h +++ b/cpp/src/Ice/TraceLevelsF.h @@ -18,7 +18,7 @@ namespace IceInternal { class TraceLevels; -ICE_API IceUtil::Shared* upCast(TraceLevels*); +IceUtil::Shared* upCast(TraceLevels*); typedef Handle<TraceLevels> TraceLevelsPtr; } diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index e7fe5c368bb..f0e3453e41a 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -6717,14 +6717,6 @@ Slice::Gen::Cpp11LocalObjectVisitor::visitClassDefStart(const ClassDefPtr& p) H.inc(); // - // In C++, a nested type cannot have the same name as the enclosing type - // - if(p->name() != "PointerType") - { - H << nl << "using PointerType = ::std::shared_ptr<" << name << ">;"; - } - - // // Out of line virtual dtor to avoid weak vtable // H << sp << nl << _dllMemberExport << "virtual ~" << name << "();"; @@ -7614,15 +7606,6 @@ Slice::Gen::Cpp11ValueVisitor::visitClassDefStart(const ClassDefPtr& p) H << nl << "public:" << sp; H.inc(); - // - // In C++, a nested type cannot have the same name as the enclosing type - // - - if(p->name() != "PointerType") - { - H << nl << "using PointerType = ::std::shared_ptr<" << name << ">;"; - } - // Out of line dtor to avoid weak vtable H << sp; H << nl << _dllMemberExport << "virtual ~" << name << "();"; |