diff options
author | Marc Laukien <marc@zeroc.com> | 2001-08-12 14:00:27 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-08-12 14:00:27 +0000 |
commit | 1d20ed6fc8d49eec1a0a27a59cfabb99909b8a65 (patch) | |
tree | 38a980b5b197c3121f3b24417eeedb6de03e3164 /cpp | |
parent | fix (diff) | |
download | ice-1d20ed6fc8d49eec1a0a27a59cfabb99909b8a65.tar.bz2 ice-1d20ed6fc8d49eec1a0a27a59cfabb99909b8a65.tar.xz ice-1d20ed6fc8d49eec1a0a27a59cfabb99909b8a65.zip |
location forward
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/include/Ice/LocalException.h | 12 | ||||
-rw-r--r-- | cpp/include/Ice/Object.h | 22 | ||||
-rw-r--r-- | cpp/include/Ice/Outgoing.h | 1 | ||||
-rw-r--r-- | cpp/include/Ice/Proxy.h | 4 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 4 | ||||
-rw-r--r-- | cpp/src/slice2docbook/Gen.cpp | 4 | ||||
-rw-r--r-- | cpp/test/Makefile | 6 |
7 files changed, 46 insertions, 7 deletions
diff --git a/cpp/include/Ice/LocalException.h b/cpp/include/Ice/LocalException.h index 0cfc851b10b..0365f760156 100644 --- a/cpp/include/Ice/LocalException.h +++ b/cpp/include/Ice/LocalException.h @@ -139,6 +139,18 @@ public: virtual void raise() const; }; +class ICE_API ReferenceIdentityException : public LocalException +{ +public: + + ReferenceIdentityException(const char*, int); + ReferenceIdentityException(const ReferenceIdentityException&); + ReferenceIdentityException& operator=(const ReferenceIdentityException&); + virtual std::string toString() const; + virtual LocalException* clone() const; + virtual void raise() const; +}; + class ICE_API ObjectNotExistException : public LocalException { public: diff --git a/cpp/include/Ice/Object.h b/cpp/include/Ice/Object.h index acac8ab4114..1397debbf77 100644 --- a/cpp/include/Ice/Object.h +++ b/cpp/include/Ice/Object.h @@ -24,9 +24,10 @@ class Stream; enum DispatchStatus { DispatchOK, + DispatchException, + DispatchLocationForward, DispatchObjectNotExist, - DispatchOperationNotExist, - DispatchException + DispatchOperationNotExist }; } @@ -34,6 +35,20 @@ enum DispatchStatus namespace Ice { +class ICE_API LocationForward +{ +public: + + LocationForward(const LocationForward&); + LocationForward(const ObjectPrx&); + +protected: + + ObjectPrx _prx; + friend class ::IceProxy::Ice::Object; + friend class ::IceInternal::Incoming; +}; + class ICE_API ObjectPtrE { public: @@ -63,8 +78,7 @@ public: virtual const std::string* _classIds() = 0; static std::string __names[]; - virtual ::IceInternal::DispatchStatus __dispatch(::IceInternal::Incoming&, - const std::string&); + virtual ::IceInternal::DispatchStatus __dispatch(::IceInternal::Incoming&, const std::string&); virtual void __write(::IceInternal::Stream*) = 0; virtual void __read(::IceInternal::Stream*) = 0; diff --git a/cpp/include/Ice/Outgoing.h b/cpp/include/Ice/Outgoing.h index ee1b103938c..e1dbc330428 100644 --- a/cpp/include/Ice/Outgoing.h +++ b/cpp/include/Ice/Outgoing.h @@ -72,6 +72,7 @@ private: StateInProgress, StateOK, StateException, + StateLocationForward, StateLocalException, } _state; diff --git a/cpp/include/Ice/Proxy.h b/cpp/include/Ice/Proxy.h index a0f3c07bf29..c691f9dfb5a 100644 --- a/cpp/include/Ice/Proxy.h +++ b/cpp/include/Ice/Proxy.h @@ -31,6 +31,7 @@ namespace Ice { class LocalException; +class LocationForward; class ICE_API ObjectPrxE { @@ -45,7 +46,7 @@ public: protected: - ObjectPrx _prx; + ObjectPrx _prx; }; }; @@ -72,6 +73,7 @@ public: ::IceInternal::ReferencePtr __reference() const; void __copyTo(::IceProxy::Ice::Object*) const; void __handleException(const ::Ice::LocalException&, int&); + void __locationForward(const ::Ice::LocationForward&); protected: diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 161714d44a3..3e33c7f90f1 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -702,6 +702,10 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) C << nl << "return;"; } C << eb; + C << nl << "catch (const ::Ice::LocationForward& __ex)"; + C << sb; + C << nl << "__locationForward(__ex);"; + C << eb; C << nl << "catch (const ::IceInternal::NonRepeatable& __ex)"; C << sb; if (p->nonmutating()) diff --git a/cpp/src/slice2docbook/Gen.cpp b/cpp/src/slice2docbook/Gen.cpp index 1cc4be16248..b7bfed1296f 100644 --- a/cpp/src/slice2docbook/Gen.cpp +++ b/cpp/src/slice2docbook/Gen.cpp @@ -412,6 +412,7 @@ Slice::Gen::visitClassDefStart(const ClassDefPtr& p) { for (OperationList::iterator q = operations.begin(); q != operations.end(); ++q) { + bool nonmutating = (*q)->nonmutating(); TypePtr returnType = (*q)->returnType(); TypeStringList inputParams = (*q)->inputParameters(); TypeStringList outputParams = (*q)->outputParameters(); @@ -420,7 +421,8 @@ Slice::Gen::visitClassDefStart(const ClassDefPtr& p) start("section id=" + scopedToId((*q)->scoped()), (*q)->name()); O.zeroIndent(); - O << nl << "<synopsis>" << (returnType ? toString(returnType, p) : "<type>void</type>") + O << nl << "<synopsis>" << (nonmutating ? "nonmutating " : "") + << (returnType ? toString(returnType, p) : "<type>void</type>") << " <function>" << (*q)->name() << "</function>("; O.inc(); TypeStringList::iterator r = inputParams.begin(); diff --git a/cpp/test/Makefile b/cpp/test/Makefile index f8fddc8b540..cfc3f03c0bb 100644 --- a/cpp/test/Makefile +++ b/cpp/test/Makefile @@ -12,7 +12,11 @@ top_srcdir = .. include $(top_srcdir)/config/Make.rules -SUBDIRS = operations inheritance exceptions faultTolerance +SUBDIRS = operations \ + inheritance \ + exceptions \ + faultTolerance \ + locationForward $(EVERYTHING):: @for subdir in $(SUBDIRS); \ |