diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/include/Ice/Object.h | 16 | ||||
-rw-r--r-- | cpp/src/Ice/LoggerAdminI.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/Object.cpp | 24 | ||||
-rw-r--r-- | cpp/src/IceDiscovery/LookupI.h | 22 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 4 | ||||
-rw-r--r-- | cpp/test/Slice/keyword/Client.cpp | 14 | ||||
-rw-r--r-- | cpp/test/include/TestCommon.h | 2 |
7 files changed, 46 insertions, 38 deletions
diff --git a/cpp/include/Ice/Object.h b/cpp/include/Ice/Object.h index 404fd23b6c5..cafe5698a59 100644 --- a/cpp/include/Ice/Object.h +++ b/cpp/include/Ice/Object.h @@ -43,14 +43,14 @@ enum DispatchStatus class ICE_API DispatchInterceptorAsyncCallback : public virtual IceUtil::Shared { public: - + virtual bool response(bool) = 0; virtual bool exception(const std::exception&) = 0; virtual bool exception() = 0; }; typedef IceUtil::Handle<DispatchInterceptorAsyncCallback> DispatchInterceptorAsyncCallbackPtr; -class ICE_API Request +class ICE_API Request { public: @@ -65,11 +65,11 @@ class ICE_API Object public: virtual ~Object() = default; - + virtual bool operator==(const Object&) const; virtual bool operator<(const Object&) const; - virtual bool ice_isA(const std::string&, const Current& = Current()) const; + virtual bool ice_isA(std::string, const Current& = Current()) const; DispatchStatus ___ice_isA(IceInternal::Incoming&, const Current&); virtual void ice_ping(const Current& = Current()) const; @@ -80,7 +80,7 @@ public: virtual const std::string& ice_id(const Current& = Current()) const; DispatchStatus ___ice_id(IceInternal::Incoming&, const Current&); - + static const std::string& ice_staticId(); virtual ObjectPtr ice_clone() const; @@ -115,7 +115,7 @@ public: DispatchStatus ___ice_id(IceInternal::Incoming&, const Current&); virtual Int ice_operationAttributes(const std::string&) const; - + virtual void __write(IceInternal::BasicStream*) const; virtual void __read(IceInternal::BasicStream*); @@ -124,10 +124,10 @@ public: virtual bool __gcVisit(IceInternal::GCVisitor&) { return false; }; virtual void ice_collectable(bool) { }; - + virtual void ice_preMarshal(); virtual void ice_postUnmarshal(); - + static const std::string& ice_staticId(); virtual ObjectPtr ice_clone() const; diff --git a/cpp/src/Ice/LoggerAdminI.cpp b/cpp/src/Ice/LoggerAdminI.cpp index 86b820f27eb..a213026fcf3 100644 --- a/cpp/src/Ice/LoggerAdminI.cpp +++ b/cpp/src/Ice/LoggerAdminI.cpp @@ -492,7 +492,7 @@ LogMessageSeq LoggerAdminI::getLog(LogMessageTypeSeq messageTypes, StringSeq categories, Int messageMax, string& prefix, const Current& current) #else -LoggerAdminI::getLog(LogMessageTypeSeq messageTypes, StringSeq categories, +LoggerAdminI::getLog(const LogMessageTypeSeq& messageTypes, const StringSeq& categories, Int messageMax, string& prefix, const Current& current) #endif { diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp index 24ba8ea42b7..7378d7e4e75 100644 --- a/cpp/src/Ice/Object.cpp +++ b/cpp/src/Ice/Object.cpp @@ -53,7 +53,11 @@ const string __Ice__Object_ids[] = } bool +#ifdef ICE_CPP11_MAPPING +Ice::Object::ice_isA(string s, const Current&) const +#else Ice::Object::ice_isA(const string& s, const Current&) const +#endif { return s == __Ice__Object_ids[0]; } @@ -178,7 +182,7 @@ Ice::Object::ice_dispatch(Request& request, const DispatchInterceptorAsyncCallba IceInternal::Incoming& in = dynamic_cast<IceInternal::IncomingRequest&>(request)._in; - + PushCb pusbCb(in, cb); in.startOver(); // may raise ResponseSentException return __dispatch(in, in.getCurrent()); @@ -193,7 +197,7 @@ Ice::Object::__dispatch(Incoming& in, const Current& current) if(r.first == r.second) { throw OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); - } + } switch(r.first - __all) { @@ -237,32 +241,32 @@ Ice::Object::__write(IceInternal::BasicStream* os) const __writeImpl(os); os->endWriteObject(); } - -void + +void Ice::Object::__read(IceInternal::BasicStream* is) { is->startReadObject(); __readImpl(is); is->endReadObject(false); } - -void + +void Ice::Object::__write(const OutputStreamPtr& os) const { os->startObject(0); __writeImpl(os); os->endObject(); } - -void + +void Ice::Object::__read(const InputStreamPtr& is) { is->startObject(); __readImpl(is); is->endObject(false); } - -void + +void Ice::Object::__writeImpl(const OutputStreamPtr&) const { throw MarshalException(__FILE__, __LINE__, "class was not generated with stream support"); diff --git a/cpp/src/IceDiscovery/LookupI.h b/cpp/src/IceDiscovery/LookupI.h index b54875ff0f2..7e603ef8688 100644 --- a/cpp/src/IceDiscovery/LookupI.h +++ b/cpp/src/IceDiscovery/LookupI.h @@ -29,8 +29,8 @@ template<class T> class Request : public std::enable_shared_from_this<Request<T>> { public: - - Request(std::shared_ptr<LookupI> lookup, const T& id, int retryCount) : + + Request(std::shared_ptr<LookupI> lookup, const T& id, int retryCount) : _lookup(lookup), _id(id), _nRetry(retryCount) @@ -41,7 +41,7 @@ public: { return _id; } - + virtual bool retry() { return --_nRetry >= 0; @@ -55,7 +55,7 @@ public: virtual void finished(const Ice::ObjectPrxPtr& proxy) { - for(auto cb : _callbacks) + for(auto cb : _callbacks) { cb(proxy); } @@ -74,7 +74,7 @@ class ObjectRequest : public Request<Ice::Identity> { public: - ObjectRequest(const std::shared_ptr<LookupI>& lookup, const Ice::Identity& id, int retryCount) : + ObjectRequest(const std::shared_ptr<LookupI>& lookup, const Ice::Identity& id, int retryCount) : Request<Ice::Identity>(lookup, id, retryCount) { } @@ -91,7 +91,7 @@ class AdapterRequest : public Request<std::string> { public: - AdapterRequest(std::shared_ptr<LookupI> lookup, const std::string& adapterId, int retryCount) : + AdapterRequest(std::shared_ptr<LookupI> lookup, const std::string& adapterId, int retryCount) : Request<std::string>(lookup, adapterId, retryCount), _start(IceUtil::Time::now()) { @@ -130,7 +130,7 @@ protected: template<class T, class CB> class RequestT : public Request { public: - + RequestT(LookupI* lookup, T id, int retryCount) : Request(lookup, retryCount), _id(id) { } @@ -165,7 +165,7 @@ class ObjectRequest : public RequestT<Ice::Identity, Ice::AMD_Locator_findObject { public: - ObjectRequest(LookupI* lookup, const Ice::Identity& id, int retryCount) : + ObjectRequest(LookupI* lookup, const Ice::Identity& id, int retryCount) : RequestT<Ice::Identity, Ice::AMD_Locator_findObjectByIdPtr>(lookup, id, retryCount) { } @@ -182,7 +182,7 @@ class AdapterRequest : public RequestT<std::string, Ice::AMD_Locator_findAdapter { public: - AdapterRequest(LookupI* lookup, const std::string& adapterId, int retryCount) : + AdapterRequest(LookupI* lookup, const std::string& adapterId, int retryCount) : RequestT<std::string, Ice::AMD_Locator_findAdapterByIdPtr>(lookup, adapterId, retryCount), _start(IceUtil::Time::now()) { @@ -228,7 +228,7 @@ public: #else virtual void findObjectById(const std::string&, const Ice::Identity&, const IceDiscovery::LookupReplyPrx&, const Ice::Current&); - virtual void findAdapterById(const std::string&, const std::string, ::std::shared_ptr<IceDiscovery::LookupReplyPrx>, + virtual void findAdapterById(const std::string&, const std::string&, const IceDiscovery::LookupReplyPrx&, const Ice::Current&); void findObject(const Ice::AMD_Locator_findObjectByIdPtr&, const Ice::Identity&); void findAdapter(const Ice::AMD_Locator_findAdapterByIdPtr&, const std::string&); @@ -236,7 +236,7 @@ public: void foundObject(const Ice::Identity&, const Ice::ObjectPrxPtr&); void foundAdapter(const std::string&, const Ice::ObjectPrxPtr&, bool); - + void adapterRequestTimedOut(const AdapterRequestPtr&); void objectRequestTimedOut(const ObjectRequestPtr&); diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 8e598e882a9..217ab73cd61 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -7874,7 +7874,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefStart(const ClassDefPtr& p) H << sp; H << nl << "virtual bool ice_isA" - << "(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const;"; + << "(::std::string, const ::Ice::Current& = ::Ice::Current()) const;"; H << nl << "virtual ::std::vector< ::std::string> ice_ids" << "(const ::Ice::Current& = ::Ice::Current()) const;"; H << nl << "virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;"; @@ -7901,7 +7901,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefStart(const ClassDefPtr& p) C << sp; C << nl << "bool" << nl << scoped.substr(2) - << "::ice_isA(const ::std::string& _s, const ::Ice::Current&) const"; + << "::ice_isA(::std::string _s, const ::Ice::Current&) const"; C << sb; C << nl << "return ::std::binary_search(" << flatName << ", " << flatName << " + " << ids.size() << ", _s);"; C << eb; diff --git a/cpp/test/Slice/keyword/Client.cpp b/cpp/test/Slice/keyword/Client.cpp index 138750fe97d..66ad4c054e4 100644 --- a/cpp/test/Slice/keyword/Client.cpp +++ b/cpp/test/Slice/keyword/Client.cpp @@ -16,7 +16,7 @@ using namespace std; class breakI : public _cpp_and::_cpp_break { public: - + #ifdef ICE_CPP11_MAPPING virtual void case_async(::Ice::Int, function<void (int)> response, @@ -50,7 +50,11 @@ public: class switchI: public _cpp_and::_cpp_switch { public: - virtual void foo(_cpp_and::charPrx, Ice::Int&, const ::Ice::Current&) +#ifdef ICE_CPP11_MAPPING + virtual void foo(shared_ptr<_cpp_and::charPrx>, Ice::Int&, const ::Ice::Current&) +#else + virtual void foo(const _cpp_and::charPrx&, Ice::Int&, const ::Ice::Current&) +#endif { } }; @@ -70,7 +74,7 @@ public: { } #endif - virtual void _cpp_explicit(const ::Ice::Current&) + virtual void _cpp_explicit(const ::Ice::Current&) { } virtual void foo(const _cpp_and::charPrx&, Ice::Int&, const ::Ice::Current&) @@ -82,7 +86,7 @@ class friendI : public _cpp_and::_cpp_friend { public: virtual _cpp_and::_cpp_auto - _cpp_goto(_cpp_and::_cpp_continue, + _cpp_goto(_cpp_and::_cpp_continue, const _cpp_and::_cpp_auto&, #ifdef ICE_CPP11_MAPPING const _cpp_and::_cpp_delete&, @@ -101,7 +105,7 @@ public: return _cpp_and::_cpp_auto(); } }; - + // // This section of the test is present to ensure that the C++ types // are named correctly. It is not expected to run. diff --git a/cpp/test/include/TestCommon.h b/cpp/test/include/TestCommon.h index 1341dd65f58..1a6261ee080 100644 --- a/cpp/test/include/TestCommon.h +++ b/cpp/test/include/TestCommon.h @@ -15,7 +15,7 @@ #ifdef ICE_CPP11_MAPPING # define ICE_IN(T) T #else -# define ICE_IN(T) const T##& +# define ICE_IN(T) const T& #endif #if defined(ICE_OS_WINRT) || (TARGET_OS_IPHONE) |