summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Proxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Proxy.cpp')
-rw-r--r--cpp/src/Ice/Proxy.cpp67
1 files changed, 36 insertions, 31 deletions
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index 99fdf23b5d4..7b7a4095ad9 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -97,13 +97,13 @@ IceProxy::Ice::Object::operator<(const Object& r) const
Int
IceProxy::Ice::Object::ice_hash() const
{
- return _reference->hashValue;
+ return _reference->hash();
}
bool
IceProxy::Ice::Object::ice_isA(const string& __id)
{
- return ice_isA(__id, _reference->context);
+ return ice_isA(__id, _reference->getContext());
}
bool
@@ -132,7 +132,7 @@ IceProxy::Ice::Object::ice_isA(const string& __id, const Context& __context)
void
IceProxy::Ice::Object::ice_ping()
{
- ice_ping(_reference->context);
+ ice_ping(_reference->getContext());
}
void
@@ -161,7 +161,7 @@ IceProxy::Ice::Object::ice_ping(const Context& __context)
vector<string>
IceProxy::Ice::Object::ice_ids()
{
- return ice_ids(_reference->context);
+ return ice_ids(_reference->getContext());
}
vector<string>
@@ -190,7 +190,7 @@ IceProxy::Ice::Object::ice_ids(const Context& __context)
string
IceProxy::Ice::Object::ice_id()
{
- return ice_id(_reference->context);
+ return ice_id(_reference->getContext());
}
string
@@ -222,7 +222,7 @@ IceProxy::Ice::Object::ice_invoke(const string& operation,
const vector<Byte>& inParams,
vector<Byte>& outParams)
{
- return ice_invoke(operation, mode, inParams, outParams, _reference->context);
+ return ice_invoke(operation, mode, inParams, outParams, _reference->getContext());
}
bool
@@ -265,7 +265,7 @@ IceProxy::Ice::Object::ice_invoke_async(const AMI_Object_ice_invokePtr& cb,
OperationMode mode,
const vector<Byte>& inParams)
{
- ice_invoke_async(cb, operation, mode, inParams, _reference->context);
+ ice_invoke_async(cb, operation, mode, inParams, _reference->getContext());
}
void
@@ -282,13 +282,13 @@ IceProxy::Ice::Object::ice_invoke_async(const AMI_Object_ice_invokePtr& cb,
Context
IceProxy::Ice::Object::ice_getContext() const
{
- return _reference->context;
+ return _reference->getContext();
}
ObjectPrx
IceProxy::Ice::Object::ice_newContext(const Context& newContext) const
{
- if(newContext == _reference->context)
+ if(newContext == _reference->getContext())
{
return ObjectPrx(const_cast< ::IceProxy::Ice::Object*>(this));
}
@@ -303,13 +303,13 @@ IceProxy::Ice::Object::ice_newContext(const Context& newContext) const
Identity
IceProxy::Ice::Object::ice_getIdentity() const
{
- return _reference->identity;
+ return _reference->getIdentity();
}
ObjectPrx
IceProxy::Ice::Object::ice_newIdentity(const Identity& newIdentity) const
{
- if(newIdentity == _reference->identity)
+ if(newIdentity == _reference->getIdentity())
{
return ObjectPrx(const_cast< ::IceProxy::Ice::Object*>(this));
}
@@ -324,13 +324,13 @@ IceProxy::Ice::Object::ice_newIdentity(const Identity& newIdentity) const
const string&
IceProxy::Ice::Object::ice_getFacet() const
{
- return _reference->facet;
+ return _reference->getFacet();
}
ObjectPrx
IceProxy::Ice::Object::ice_newFacet(const string& newFacet) const
{
- if(newFacet == _reference->facet)
+ if(newFacet == _reference->getFacet())
{
return ObjectPrx(const_cast< ::IceProxy::Ice::Object*>(this));
}
@@ -361,7 +361,7 @@ IceProxy::Ice::Object::ice_twoway() const
bool
IceProxy::Ice::Object::ice_isTwoway() const
{
- return _reference->mode == Reference::ModeTwoway;
+ return _reference->getMode() == Reference::ModeTwoway;
}
ObjectPrx
@@ -383,7 +383,7 @@ IceProxy::Ice::Object::ice_oneway() const
bool
IceProxy::Ice::Object::ice_isOneway() const
{
- return _reference->mode == Reference::ModeOneway;
+ return _reference->getMode() == Reference::ModeOneway;
}
ObjectPrx
@@ -405,7 +405,7 @@ IceProxy::Ice::Object::ice_batchOneway() const
bool
IceProxy::Ice::Object::ice_isBatchOneway() const
{
- return _reference->mode == Reference::ModeBatchOneway;
+ return _reference->getMode() == Reference::ModeBatchOneway;
}
ObjectPrx
@@ -427,7 +427,7 @@ IceProxy::Ice::Object::ice_datagram() const
bool
IceProxy::Ice::Object::ice_isDatagram() const
{
- return _reference->mode == Reference::ModeDatagram;
+ return _reference->getMode() == Reference::ModeDatagram;
}
ObjectPrx
@@ -449,7 +449,7 @@ IceProxy::Ice::Object::ice_batchDatagram() const
bool
IceProxy::Ice::Object::ice_isBatchDatagram() const
{
- return _reference->mode == Reference::ModeBatchDatagram;
+ return _reference->getMode() == Reference::ModeBatchDatagram;
}
ObjectPrx
@@ -552,6 +552,8 @@ ObjectPrx
IceProxy::Ice::Object::ice_default() const
{
ReferencePtr ref = _reference->changeDefault();
+ ref = ref->changeDefault();
+
if(ref == _reference)
{
return ObjectPrx(const_cast< ::IceProxy::Ice::Object*>(this));
@@ -638,12 +640,13 @@ IceProxy::Ice::Object::__handleException(const LocalException& ex, int& cnt)
_delegate = 0;
}
- if(_reference->locatorInfo)
+ IndirectReferencePtr ir = IndirectReferencePtr::dynamicCast(_reference);
+ if(ir && ir->getLocatorInfo())
{
- _reference->locatorInfo->clearObjectCache(_reference);
+ ir->getLocatorInfo()->clearObjectCache(ir);
}
- ProxyFactoryPtr proxyFactory = _reference->instance->proxyFactory();
+ ProxyFactoryPtr proxyFactory = _reference->getInstance()->proxyFactory();
if(proxyFactory)
{
proxyFactory->checkRetryAfterException(ex, cnt);
@@ -665,9 +668,10 @@ IceProxy::Ice::Object::__rethrowException(const LocalException& ex)
_delegate = 0;
}
- if(_reference->locatorInfo)
+ IndirectReferencePtr ir = IndirectReferencePtr::dynamicCast(_reference);
+ if(ir && ir->getLocatorInfo())
{
- _reference->locatorInfo->clearObjectCache(_reference);
+ ir->getLocatorInfo()->clearObjectCache(ir);
}
ex.ice_throw();
@@ -696,9 +700,9 @@ IceProxy::Ice::Object::__getDelegate()
if(!_delegate)
{
- if(_reference->collocationOptimization)
+ if(_reference->getCollocationOptimization())
{
- ObjectAdapterPtr adapter = _reference->instance->objectAdapterFactory()->findObjectAdapter(this);
+ ObjectAdapterPtr adapter = _reference->getInstance()->objectAdapterFactory()->findObjectAdapter(this);
if(adapter)
{
Handle< ::IceDelegateD::Ice::Object> delegate = __createDelegateD();
@@ -718,9 +722,10 @@ IceProxy::Ice::Object::__getDelegate()
// using a router, then add this proxy to the router info
// object.
//
- if(_reference->routerInfo)
+ RoutableReferencePtr rr = RoutableReferencePtr::dynamicCast(_reference);
+ if(rr && rr->getRouterInfo())
{
- _reference->routerInfo->addProxy(this);
+ rr->getRouterInfo()->addProxy(this);
}
}
}
@@ -743,7 +748,7 @@ IceProxy::Ice::Object::__createDelegateD()
const Context&
IceProxy::Ice::Object::__defaultContext() const
{
- return _reference->context;
+ return _reference->getContext();
}
void
@@ -862,7 +867,7 @@ IceDelegateM::Ice::Object::ice_invoke(const string& operation,
BasicStream* __os = __out.os();
__os->writeBlob(inParams);
bool ok = __out.invoke();
- if(__reference->mode == Reference::ModeTwoway)
+ if(__reference->getMode() == Reference::ModeTwoway)
{
try
{
@@ -1013,8 +1018,8 @@ IceDelegateD::Ice::Object::__initCurrent(Current& current, const string& op, Ope
const Context& context)
{
current.adapter = __adapter;
- current.id = __reference->identity;
- current.facet = __reference->facet;
+ current.id = __reference->getIdentity();
+ current.facet = __reference->getFacet();
current.operation = op;
current.mode = mode;
current.ctx = context;