diff options
Diffstat (limited to 'cpp/include/Ice')
-rw-r--r-- | cpp/include/Ice/BasicStream.h | 2 | ||||
-rw-r--r-- | cpp/include/Ice/Handle.h | 41 | ||||
-rw-r--r-- | cpp/include/Ice/Incoming.h | 2 | ||||
-rw-r--r-- | cpp/include/Ice/IncomingAsync.h | 2 | ||||
-rw-r--r-- | cpp/include/Ice/ProxyHandle.h | 19 |
5 files changed, 47 insertions, 19 deletions
diff --git a/cpp/include/Ice/BasicStream.h b/cpp/include/Ice/BasicStream.h index 36b39ce62ce..0af2a36fffc 100644 --- a/cpp/include/Ice/BasicStream.h +++ b/cpp/include/Ice/BasicStream.h @@ -200,6 +200,7 @@ public: delete oldEncaps; } } + void endWriteEncapsChecked(); // Used by public stream API. void startReadEncaps() { @@ -298,6 +299,7 @@ public: } i += 2; } + void endReadEncapsChecked(); // Used by public stream API. Ice::Int getReadEncapsSize(); void skipEncaps(); diff --git a/cpp/include/Ice/Handle.h b/cpp/include/Ice/Handle.h index 15731e774b3..5c415612642 100644 --- a/cpp/include/Ice/Handle.h +++ b/cpp/include/Ice/Handle.h @@ -14,24 +14,28 @@ #include <Ice/Config.h> // -// We include ProxyHandle.h here to make sure that the -// Ice::ProxyHandle template is defined before any definition of -// incRef() or decRef() (see -// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25495 for information -// on why this is necessary.) +// We include ProxyHandle.h here to make sure that the Ice::ProxyHandle +// template is defined before any definition of upCast(). +// +// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25495 for information +// on why this is necessary. // #include <Ice/ProxyHandle.h> // -// "Handle" or "smart pointer" class for classes derived from -// IceUtil::GCShared, IceUtil::Shared, or IceUtil::SimpleShared. +// "Handle" or "smart pointer" template for classes derived from +// IceInternal::GCShared, IceUtil::Shared, or IceUtil::SimpleShared. +// +// In constrast to IceUtil::Handle, IceInternal::Handle<T> can be used +// for a type T that has been declared but not defined. The only +// requirement is a declaration of the following function: // -// In constrast to IceUtil::Handle, IceInternal::Handle requires the -// declaration of the two global operations IceInternal::incRef(T*) -// and IceInternal::decRef(T*). The use of global operations allows -// this template to be used for types which are declared but not -// defined, provided that the two above mentioned operations are -// declared. +// namespace IceInternal +// { +// X* upCast(T*); +// } +// +// Where X is (or derives from) IceUtil::Shared or IceUtil::SimpleShared. // namespace IceInternal @@ -42,6 +46,17 @@ class Handle : public ::IceUtil::HandleBase<T> { public: +#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) + // + // C++Builder 2009 does not allow setting Ptr to 0. + // + Handle(int p) + { + assert(p == 0); + this->_ptr = 0; + } +#endif + Handle(T* p = 0) { this->_ptr = p; diff --git a/cpp/include/Ice/Incoming.h b/cpp/include/Ice/Incoming.h index 2289917b4d3..3aa4bb8551e 100644 --- a/cpp/include/Ice/Incoming.h +++ b/cpp/include/Ice/Incoming.h @@ -37,6 +37,8 @@ protected: void __warning(const Ice::Exception&) const; void __warning(const std::string&) const; + bool __servantLocatorFinished(); + void __handleException(const std::exception&); void __handleException(); diff --git a/cpp/include/Ice/IncomingAsync.h b/cpp/include/Ice/IncomingAsync.h index 5ce4a22b640..1675350886f 100644 --- a/cpp/include/Ice/IncomingAsync.h +++ b/cpp/include/Ice/IncomingAsync.h @@ -44,8 +44,6 @@ protected: private: - bool __servantLocatorFinished(); - // // We need a separate InstancePtr, because _is and _os only hold a // Instance* for optimization. diff --git a/cpp/include/Ice/ProxyHandle.h b/cpp/include/Ice/ProxyHandle.h index f73222b703f..cad5a557459 100644 --- a/cpp/include/Ice/ProxyHandle.h +++ b/cpp/include/Ice/ProxyHandle.h @@ -15,9 +15,10 @@ // // We include Handle.h here to make sure that the Ice::Handle template -// is defined before any definition of incRef() or decRef() (see -// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25495 for information -// on why this is necessary.) +// is defined before any definition of upCast(). +// +// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25495 for information +// on why this is necessary. // #include <Ice/Handle.h> @@ -106,6 +107,17 @@ template<typename T> class ProxyHandle : public ::IceUtil::HandleBase<T> { public: + +#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) + // + // C++Builder 2009 does not allow setting Prx to 0. + // + ProxyHandle(int p) + { + assert(p == 0); + this->_ptr = 0; + } +#endif ProxyHandle(T* p = 0) { @@ -282,7 +294,6 @@ public: } }; - } template<class Y> |