5#ifndef ICE_PROXY_HANDLE_H
6#define ICE_PROXY_HANDLE_H
8#ifndef ICE_CPP11_MAPPING
18template<
typename T>
class ProxyHandle;
19template<
typename T>
class Handle;
37typedef ::IceInternal::ProxyHandle< ::IceProxy::Ice::Object>
ObjectPrx;
48typedef ::std::map< ::std::string, ::std::string>
Context;
59checkedCastImpl(const ::Ice::ObjectPrx&, const ::Ice::Context&);
62checkedCastImpl(const ::Ice::ObjectPrx&,
const std::string&, const ::Ice::Context&);
65uncheckedCastImpl(const ::Ice::ObjectPrx&);
68uncheckedCastImpl(const ::Ice::ObjectPrx&,
const std::string&);
73template<
typename T,
typename Y>
inline ProxyHandle<T>
74checkedCastHelper(const ::IceInternal::ProxyHandle<Y>& b, T*, const ::Ice::Context&)
79template<
typename T,
typename Y>
inline ProxyHandle<T>
80uncheckedCastHelper(const ::IceInternal::ProxyHandle<Y>& b, T*)
88template<
typename T,
typename Y>
inline ProxyHandle<T>
89checkedCastHelper(const ::IceInternal::ProxyHandle<Y>& b,
void*, const ::Ice::Context& ctx)
95 const ::Ice::ObjectPrx& o = b;
96 return checkedCastImpl<ProxyHandle<T> >(o, ctx);
98 return checkedCastImpl<ProxyHandle<T> >(b, ctx);
102template<
typename T,
typename Y>
inline ProxyHandle<T>
103uncheckedCastHelper(const ::IceInternal::ProxyHandle<Y>& b,
void*)
109 const ::Ice::ObjectPrx& o = b;
110 return uncheckedCastImpl<ProxyHandle<T> >(o);
112 return uncheckedCastImpl<ProxyHandle<T> >(b);
122class ProxyHandle :
public ::IceUtil::HandleBase<T>
126 ProxyHandle(T* p = 0)
137 ProxyHandle(
const ProxyHandle<Y>& r)
148 ProxyHandle(const ::IceUtil::Handle<Y>& r)
158 ProxyHandle(
const ProxyHandle& r)
176 ProxyHandle& operator=(T* p)
196 ProxyHandle& operator=(
const ProxyHandle<Y>& r)
198 if(this->
_ptr != r._ptr)
216 ProxyHandle& operator=(const ::IceUtil::Handle<Y>& r)
218 if(this->
_ptr != r._ptr)
235 ProxyHandle& operator=(
const ProxyHandle& r)
237 if(this->
_ptr != r._ptr)
254 ::IceProxy::Ice::Object* _upCast()
const
263 return ::IceInternal::checkedCastHelper<T>(r, tag, ctx);
267 static ProxyHandle checkedCast(
const ProxyHandle<Y>& r,
const std::string& f,
274 const ::Ice::ObjectPrx& o = r;
275 return ::IceInternal::checkedCastImpl<ProxyHandle>(o, f, ctx);
277 return ::IceInternal::checkedCastImpl<ProxyHandle>(r, f, ctx);
282 static ProxyHandle uncheckedCast(
const ProxyHandle<Y>& r)
285 return::IceInternal::uncheckedCastHelper<T>(r, tag);
289 static ProxyHandle uncheckedCast(
const ProxyHandle<Y>& r,
const std::string& f)
295 const ::Ice::ObjectPrx& o = r;
296 return ::IceInternal::uncheckedCastImpl<ProxyHandle<T> >(o, f);
298 return ::IceInternal::uncheckedCastImpl<ProxyHandle>(r, f);
302 static const std::string& ice_staticId()
304 return T::ice_staticId();
309std::ostream& operator<<(std::ostream& os, ::IceInternal::ProxyHandle<Y> p)
311 return os << (p ? p->ice_toString() : std::string(
""));
#define ICE_API
Definition Config.h:197
Base class of all object proxies.
Definition Proxy.h:1757
T * _ptr
Definition Handle.h:74
The object adapter provides an up-call interface from the Ice run time to the implementation of Ice o...
Definition ObjectAdapter.h:651
Definition Locator.h:1000
Definition BuiltinSequences.h:113
const Context noExplicitContext
Marker value used to indicate that no explicit context was passed to a proxy invocation.
Definition ProxyHandle.h:51
::std::map< ::std::string, ::std::string > Context
A request context.
Definition Current.h:207
IceInternal::ProxyHandle< ::IceProxy::Ice::Object > ObjectPrx
Smart pointer for an object proxy.
Definition ProxyF.h:47
::IceInternal::Handle< ObjectAdapter > ObjectAdapterPtr
Definition ObjectAdapter.h:620
IceUtil::Shared * upCast(::Ice::AsyncResult *)