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.cpp59
1 files changed, 46 insertions, 13 deletions
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index 8e73188486a..22b18a98695 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -10,8 +10,8 @@
#include <Ice/Proxy.h>
#include <Ice/Object.h>
-#include <Ice/ObjectAdapterFactory.h>
#include <Ice/Outgoing.h>
+#include <Ice/Direct.h>
#include <Ice/Reference.h>
#include <Ice/Endpoint.h>
#include <Ice/Instance.h>
@@ -36,6 +36,9 @@ void IceInternal::decRef(::IceDelegate::Ice::Object* p) { p->__decRef(); }
void IceInternal::incRef(::IceDelegateM::Ice::Object* p) { p->__incRef(); }
void IceInternal::decRef(::IceDelegateM::Ice::Object* p) { p->__decRef(); }
+void IceInternal::incRef(::IceDelegateD::Ice::Object* p) { p->__incRef(); }
+void IceInternal::decRef(::IceDelegateD::Ice::Object* p) { p->__decRef(); }
+
void
IceInternal::checkedCast(::IceProxy::Ice::Object* b, ::IceProxy::Ice::Object*& d)
{
@@ -405,6 +408,7 @@ IceProxy::Ice::Object::__getDelegate()
JTCSyncT<JTCMutex> sync(*this);
if (!_delegate)
{
+/*
ObjectPtr obj = _reference->instance->objectAdapterFactory()->proxyToServant(this);
if (obj)
@@ -413,6 +417,7 @@ IceProxy::Ice::Object::__getDelegate()
}
else
{
+*/
_delegate = __createDelegateM();
try
{
@@ -423,7 +428,7 @@ IceProxy::Ice::Object::__getDelegate()
_delegate = 0;
throw;
}
- }
+// }
}
return _delegate;
@@ -445,12 +450,6 @@ IceProxy::Ice::Object::setup(const ReferencePtr& reference)
_reference = reference;
}
-void
-IceDelegate::Ice::Object::_flush()
-{
- // Do nothing
-}
-
IceDelegate::Ice::Object::Object()
{
}
@@ -459,11 +458,6 @@ IceDelegate::Ice::Object::~Object()
{
}
-void
-IceDelegate::Ice::Object::setup(const ReferencePtr&)
-{
-}
-
bool
IceDelegateM::Ice::Object::_isA(const string& s)
{
@@ -561,3 +555,42 @@ IceDelegateM::Ice::Object::setup(const ReferencePtr& reference)
__emitter = factory->create(endpoints);
assert(__emitter);
}
+
+bool
+IceDelegateD::Ice::Object::_isA(const string& s)
+{
+ Direct __direct(__adapter, __reference, "_isA");
+ return __direct.servant()->_isA(s);
+}
+
+void
+IceDelegateD::Ice::Object::_ping()
+{
+ Direct __direct(__adapter, __reference, "_isA");
+ __direct.servant()->_ping();
+}
+
+void
+IceDelegateD::Ice::Object::_flush()
+{
+ // Nothing to do for direct delegates
+}
+
+IceDelegateD::Ice::Object::Object()
+{
+}
+
+IceDelegateD::Ice::Object::~Object()
+{
+}
+
+void
+IceDelegateD::Ice::Object::setup(const ReferencePtr& reference)
+{
+ //
+ // No need to synchronize, as this operation is only called
+ // upon initial initialization.
+ //
+ __reference = reference;
+}
+