diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/ACMF.h | 35 | ||||
-rw-r--r-- | cpp/src/Ice/ConnectRequestHandlerF.h | 4 | ||||
-rw-r--r-- | cpp/src/Ice/ConnectionFactoryF.h | 35 | ||||
-rw-r--r-- | cpp/src/Ice/ConnectionI.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/EndpointIF.h | 10 | ||||
-rw-r--r-- | cpp/src/Ice/EventHandlerF.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/IPEndpointIF.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/ObjectAdapterFactoryF.h | 30 | ||||
-rw-r--r-- | cpp/src/Ice/SlicedData.cpp | 23 | ||||
-rw-r--r-- | cpp/src/Ice/TraceLevels.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/TraceLevelsF.h | 2 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 17 |
12 files changed, 135 insertions, 29 deletions
diff --git a/cpp/src/Ice/ACMF.h b/cpp/src/Ice/ACMF.h new file mode 100644 index 00000000000..9f7f17d26fa --- /dev/null +++ b/cpp/src/Ice/ACMF.h @@ -0,0 +1,35 @@ +// ********************************************************************** +// +// 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 +using ACMMonitorPtr = ::std::shared_ptr<ACMMonitor>; +using FactoryACMMonitorPtr = ::std::shared_ptr<FactoryACMMonitor>; +#else +IceUtil::Shared* upCast(ACMMonitor*); +typedef IceInternal::Handle<ACMMonitor> ACMMonitorPtr; + +IceUtil::Shared* upCast(FactoryACMMonitor*); +typedef IceInternal::Handle<FactoryACMMonitor> FactoryACMMonitorPtr; +#endif + +} + +#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/src/Ice/ConnectionFactoryF.h b/cpp/src/Ice/ConnectionFactoryF.h new file mode 100644 index 00000000000..033d61b9761 --- /dev/null +++ b/cpp/src/Ice/ConnectionFactoryF.h @@ -0,0 +1,35 @@ +// ********************************************************************** +// +// 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; +IceUtil::Shared* upCast(OutgoingConnectionFactory*); +typedef IceInternal::Handle<OutgoingConnectionFactory> OutgoingConnectionFactoryPtr; + +class IncomingConnectionFactory; + +#ifdef ICE_CPP11_MAPPING +using IncomingConnectionFactoryPtr = ::std::shared_ptr<IncomingConnectionFactory>; +#else +IceUtil::Shared* upCast(IncomingConnectionFactory*); +typedef IceInternal::Handle<IncomingConnectionFactory> IncomingConnectionFactoryPtr; +#endif + +} + +#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/src/Ice/ObjectAdapterFactoryF.h b/cpp/src/Ice/ObjectAdapterFactoryF.h new file mode 100644 index 00000000000..ab292e47d51 --- /dev/null +++ b/cpp/src/Ice/ObjectAdapterFactoryF.h @@ -0,0 +1,30 @@ +// ********************************************************************** +// +// 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 +using ObjectAdapterFactoryPtr = ::std::shared_ptr<ObjectAdapterFactory>; +#else +IceUtil::Shared* upCast(ObjectAdapterFactory*); +typedef IceInternal::Handle<ObjectAdapterFactory> ObjectAdapterFactoryPtr; +#endif + +} + +#endif 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 << "();"; |