diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-05-27 12:29:18 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-05-27 12:29:18 -0230 |
commit | 781e357a2e4703af1d292d1169ad9f1249792330 (patch) | |
tree | b49458392e6e3d99dc97e5f817d499276768a1d4 /cpp/src/Ice/Reference.cpp | |
parent | Bug 3502: Improve javadoc support in Eclipse (diff) | |
download | ice-781e357a2e4703af1d292d1169ad9f1249792330.tar.bz2 ice-781e357a2e4703af1d292d1169ad9f1249792330.tar.xz ice-781e357a2e4703af1d292d1169ad9f1249792330.zip |
Bug 3964 - improve endpoint info
Diffstat (limited to 'cpp/src/Ice/Reference.cpp')
-rw-r--r-- | cpp/src/Ice/Reference.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp index 8dccf73240a..e78f845584c 100644 --- a/cpp/src/Ice/Reference.cpp +++ b/cpp/src/Ice/Reference.cpp @@ -12,6 +12,7 @@ #include <Ice/LocalException.h> #include <Ice/Instance.h> #include <Ice/EndpointI.h> +#include <Ice/OpaqueEndpointI.h> #include <Ice/BasicStream.h> #include <Ice/RouterInfo.h> #include <Ice/Router.h> @@ -1816,6 +1817,17 @@ IceInternal::RoutableReference::RoutableReference(const RoutableReference& r) : { } +struct EndpointIsOpaque : public unary_function<EndpointIPtr, bool> +{ +public: + + bool + operator()(EndpointIPtr p) const + { + return dynamic_cast<OpaqueEndpointI*>(p.get()) != 0; + } +}; + vector<EndpointIPtr> IceInternal::RoutableReference::filterEndpoints(const vector<EndpointIPtr>& allEndpoints) const { @@ -1824,8 +1836,7 @@ IceInternal::RoutableReference::filterEndpoints(const vector<EndpointIPtr>& allE // // Filter out unknown endpoints. // - endpoints.erase(remove_if(endpoints.begin(), endpoints.end(), Ice::constMemFun(&EndpointI::unknown)), - endpoints.end()); + endpoints.erase(remove_if(endpoints.begin(), endpoints.end(), EndpointIsOpaque()), endpoints.end()); // // Filter out endpoints according to the mode of the reference. |