summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-12-22 22:34:36 +0100
committerJose <jose@zeroc.com>2015-12-22 22:34:36 +0100
commit27d7d8f432d73318e30dd4fe3395ec19cd18edea (patch)
treed796c6d56df6aebc40aac4513984e6072a6d61e6 /cpp/src
parentFixed C++98 to get rid of Ice::Context pointers now that we use Ice::noExplic... (diff)
downloadice-27d7d8f432d73318e30dd4fe3395ec19cd18edea.tar.bz2
ice-27d7d8f432d73318e30dd4fe3395ec19cd18edea.tar.xz
ice-27d7d8f432d73318e30dd4fe3395ec19cd18edea.zip
C++11 metrics fixes
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/ConnectionI.cpp10
-rw-r--r--cpp/src/Ice/EndpointI.h5
-rw-r--r--cpp/src/Ice/InstrumentationI.cpp18
-rw-r--r--cpp/src/Ice/MetricsAdminI.cpp4
-rw-r--r--cpp/src/Ice/Proxy.cpp6
5 files changed, 24 insertions, 19 deletions
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp
index d9c0050477c..afd26ebdb32 100644
--- a/cpp/src/Ice/ConnectionI.cpp
+++ b/cpp/src/Ice/ConnectionI.cpp
@@ -540,10 +540,12 @@ Ice::ConnectionI::updateObserver()
}
assert(_instance->initializationData().observer);
- _observer.attach(_instance->initializationData().observer->getConnectionObserver(initConnectionInfo(),
- _endpoint,
- toConnectionState(_state),
- _observer.get()));
+
+ ConnectionObserverPtr o = _instance->initializationData().observer->getConnectionObserver(initConnectionInfo(),
+ _endpoint,
+ toConnectionState(_state),
+ _observer.get());
+ _observer.attach(o);
}
void
diff --git a/cpp/src/Ice/EndpointI.h b/cpp/src/Ice/EndpointI.h
index 2b48fb4e1ad..1fb691ddd12 100644
--- a/cpp/src/Ice/EndpointI.h
+++ b/cpp/src/Ice/EndpointI.h
@@ -132,10 +132,7 @@ public:
//
// Compare endpoints for sorting purposes.
//
-#ifdef ICE_CPP11_MAPPING
- virtual bool operator==(const Endpoint&) const = 0;
- virtual bool operator<(const Endpoint&) const = 0;
-#else
+#ifndef ICE_CPP11_MAPPING
virtual bool operator==(const Ice::LocalObject&) const = 0;
virtual bool operator<(const Ice::LocalObject&) const = 0;
#endif
diff --git a/cpp/src/Ice/InstrumentationI.cpp b/cpp/src/Ice/InstrumentationI.cpp
index f5ddd6e6fb4..edd64592523 100644
--- a/cpp/src/Ice/InstrumentationI.cpp
+++ b/cpp/src/Ice/InstrumentationI.cpp
@@ -421,7 +421,7 @@ public:
{
try
{
- os << _proxy->ice_endpoints(Ice::EndpointSeq()) << " [" << _operation << ']';
+ os << _proxy->ice_endpoints(Ice::EndpointSeq())->ice_toString() << " [" << _operation << ']';
}
catch(const Exception&)
{
@@ -868,7 +868,7 @@ InvocationObserverI::getRemoteObserver(const ConnectionInfoPtr& connection,
catch(const exception&)
{
}
- return 0;
+ return ICE_NULLPTR;
}
CollocatedObserverPtr
@@ -888,7 +888,7 @@ InvocationObserverI::getCollocatedObserver(const Ice::ObjectAdapterPtr& adapter,
catch(const exception&)
{
}
- return 0;
+ return ICE_NULLPTR;
}
CommunicatorObserverI::CommunicatorObserverI(const InitializationData& initData) :
@@ -936,7 +936,7 @@ CommunicatorObserverI::getConnectionEstablishmentObserver(const EndpointPtr& end
error << "unexpected exception trying to obtain observer:\n" << ex;
}
}
- return 0;
+ return ICE_NULLPTR;
}
ObserverPtr
@@ -959,7 +959,7 @@ CommunicatorObserverI::getEndpointLookupObserver(const EndpointPtr& endpt)
error << "unexpected exception trying to obtain observer:\n" << ex;
}
}
- return 0;
+ return ICE_NULLPTR;
}
ConnectionObserverPtr
@@ -986,7 +986,7 @@ CommunicatorObserverI::getConnectionObserver(const ConnectionInfoPtr& con,
error << "unexpected exception trying to obtain observer:\n" << ex;
}
}
- return 0;
+ return ICE_NULLPTR;
}
ThreadObserverPtr
@@ -1013,7 +1013,7 @@ CommunicatorObserverI::getThreadObserver(const string& parent,
error << "unexpected exception trying to obtain observer:\n" << ex;
}
}
- return 0;
+ return ICE_NULLPTR;
}
InvocationObserverPtr
@@ -1036,7 +1036,7 @@ CommunicatorObserverI::getInvocationObserver(const ObjectPrxPtr& proxy, const st
error << "unexpected exception trying to obtain observer:\n" << ex;
}
}
- return 0;
+ return ICE_NULLPTR;
}
DispatchObserverPtr
@@ -1059,7 +1059,7 @@ CommunicatorObserverI::getDispatchObserver(const Current& current, int size)
error << "unexpected exception trying to obtain observer:\n" << ex;
}
}
- return 0;
+ return ICE_NULLPTR;
}
const IceInternal::MetricsAdminIPtr&
diff --git a/cpp/src/Ice/MetricsAdminI.cpp b/cpp/src/Ice/MetricsAdminI.cpp
index 0fa85ff3c4f..26f0f93d9bb 100644
--- a/cpp/src/Ice/MetricsAdminI.cpp
+++ b/cpp/src/Ice/MetricsAdminI.cpp
@@ -378,7 +378,7 @@ MetricsViewI::getMap(const string& mapName) const
{
return p->second;
}
- return 0;
+ return ICE_NULLPTR;
}
MetricsAdminI::MetricsAdminI(const PropertiesPtr& properties, const LoggerPtr& logger) :
@@ -639,7 +639,7 @@ MetricsAdminI::getMetricsView(const std::string& name)
{
throw UnknownMetricsView();
}
- return 0;
+ return ICE_NULLPTR;
}
return p->second;
}
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index baaf60f51d5..009ebdb314a 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -529,6 +529,12 @@ Ice::ObjectPrx::__newInstance() const
return make_shared<ObjectPrx>();
}
+ostream&
+Ice::operator<<(ostream& os, const Ice::ObjectPrx& p)
+{
+ return os << p.ice_toString();
+}
+
#else // C++98 mapping
::Ice::ObjectPrxPtr