summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ObserverHelper.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-09-06 14:32:45 +0200
committerBenoit Foucher <benoit@zeroc.com>2012-09-06 14:32:45 +0200
commit55653e8e80f1a4ed1c54742de9fdb81cc1ca0bd9 (patch)
tree859ce7d45c580afb8abf6c9c86296e795d8e4a19 /cpp/src/Ice/ObserverHelper.cpp
parentAdded Python properties demo, fixed bugs (diff)
downloadice-55653e8e80f1a4ed1c54742de9fdb81cc1ca0bd9.tar.bz2
ice-55653e8e80f1a4ed1c54742de9fdb81cc1ca0bd9.tar.xz
ice-55653e8e80f1a4ed1c54742de9fdb81cc1ca0bd9.zip
Performance improvments
Diffstat (limited to 'cpp/src/Ice/ObserverHelper.cpp')
-rw-r--r--cpp/src/Ice/ObserverHelper.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/cpp/src/Ice/ObserverHelper.cpp b/cpp/src/Ice/ObserverHelper.cpp
index f4e128ff652..c4406dd088b 100644
--- a/cpp/src/Ice/ObserverHelper.cpp
+++ b/cpp/src/Ice/ObserverHelper.cpp
@@ -19,16 +19,23 @@ using namespace IceInternal;
InvocationObserver::InvocationObserver(IceProxy::Ice::Object* proxy, const string& operation, const Context* context)
{
- if(proxy->__reference()->getInstance()->initializationData().observer)
+ const Ice::Instrumentation::CommunicatorObserverPtr& obsv =
+ proxy->__reference()->getInstance()->initializationData().observer;
+ if(obsv)
{
- attach(proxy, operation, context);
+ if(context)
+ {
+ ObserverHelperT<Ice::Instrumentation::InvocationObserver>::attach(
+ obsv->getInvocationObserverWithContext(proxy, operation, *context));
+ }
+ else
+ {
+ ObserverHelperT<Ice::Instrumentation::InvocationObserver>::attach(
+ obsv->getInvocationObserver(proxy, operation));
+ }
}
}
-InvocationObserver::InvocationObserver()
-{
-}
-
void
InvocationObserver::attach(IceProxy::Ice::Object* proxy, const string& operation, const Context* context)
{