diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-10-21 17:02:37 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-10-21 17:02:37 +0200 |
commit | a80b3c8cbb203c78b061e99e1a764685af4a93e9 (patch) | |
tree | 5448b1dd66499b8fc9e46c618aa65b6687855946 /cpp/src/Ice/OpaqueEndpointI.cpp | |
parent | Bug 4311 - change Ice::Service::start signature (diff) | |
download | ice-a80b3c8cbb203c78b061e99e1a764685af4a93e9.tar.bz2 ice-a80b3c8cbb203c78b061e99e1a764685af4a93e9.tar.xz ice-a80b3c8cbb203c78b061e99e1a764685af4a93e9.zip |
- Removed old IceSSL::ConnectionInfo struct, it's now replaced with
IceSSL::NativeConnectionInfo.
- Removed Ice::ConnectionInfo endpoint attribute.
- Added Ice::Connection::getEndpoint() method.
- Added Ice::ConnectionInfo adapterName and incoming attributes.
- Replaced Tcp and Udp prefixes with TCP and UDP in endpoint/info classes.
- Added IPEndpointInfo and IPConnectionInfo intermediate classes.
- Fixed 2058: deprecate ice_hash for Ice.Object & Ice.LocalObject, added ice_getHash
- Fixed bug where Ice::Endpoint comparison would only compare the endpoint object addresses rather than the endpoint attributes like in Java and C#.
- Added ice_getHash implementation for endpoints and cleaned up Reference::hash to use HashUtil.h helper methods.
- Added test/Ice/info and removed endpoint info test from test/Ice/proxy.
Diffstat (limited to 'cpp/src/Ice/OpaqueEndpointI.cpp')
-rw-r--r-- | cpp/src/Ice/OpaqueEndpointI.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/cpp/src/Ice/OpaqueEndpointI.cpp b/cpp/src/Ice/OpaqueEndpointI.cpp index 19c033881e7..9960872df1c 100644 --- a/cpp/src/Ice/OpaqueEndpointI.cpp +++ b/cpp/src/Ice/OpaqueEndpointI.cpp @@ -12,6 +12,7 @@ #include <Ice/Exception.h> #include <Ice/Instance.h> #include <Ice/Base64.h> +#include <Ice/HashUtil.h> using namespace std; using namespace Ice; @@ -282,7 +283,7 @@ IceInternal::OpaqueEndpointI::equivalent(const EndpointIPtr&) const } bool -IceInternal::OpaqueEndpointI::operator==(const EndpointI& r) const +IceInternal::OpaqueEndpointI::operator==(const LocalObject& r) const { const OpaqueEndpointI* p = dynamic_cast<const OpaqueEndpointI*>(&r); if(!p) @@ -309,18 +310,17 @@ IceInternal::OpaqueEndpointI::operator==(const EndpointI& r) const } bool -IceInternal::OpaqueEndpointI::operator!=(const EndpointI& r) const -{ - return !operator==(r); -} - -bool -IceInternal::OpaqueEndpointI::operator<(const EndpointI& r) const +IceInternal::OpaqueEndpointI::operator<(const LocalObject& r) const { const OpaqueEndpointI* p = dynamic_cast<const OpaqueEndpointI*>(&r); if(!p) { - return type() < r.type(); + const EndpointI* e = dynamic_cast<const EndpointI*>(&r); + if(!e) + { + return false; + } + return type() < e->type(); } if(this == p) @@ -348,3 +348,11 @@ IceInternal::OpaqueEndpointI::operator<(const EndpointI& r) const return false; } + +Ice::Int +IceInternal::OpaqueEndpointI::hashInit() const +{ + Ice::Int h = _type; + hashAdd(h, _rawBytes); + return h; +} |