summaryrefslogtreecommitdiff
path: root/cpp/src/IceStorm/Util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceStorm/Util.cpp')
-rw-r--r--cpp/src/IceStorm/Util.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/cpp/src/IceStorm/Util.cpp b/cpp/src/IceStorm/Util.cpp
new file mode 100644
index 00000000000..3ba86f439d3
--- /dev/null
+++ b/cpp/src/IceStorm/Util.cpp
@@ -0,0 +1,35 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <IceStorm/Util.h>
+
+using namespace std;
+
+string
+IceStormInternal::describeEndpoints(const Ice::ObjectPrx& proxy)
+{
+ ostringstream os;
+ if(proxy)
+ {
+ Ice::EndpointSeq endpoints = proxy->ice_getEndpoints();
+ for(Ice::EndpointSeq::const_iterator i = endpoints.begin(); i != endpoints.end(); ++i)
+ {
+ if(i != endpoints.begin())
+ {
+ os << ", ";
+ }
+ os << "\"" << (*i)->toString() << "\"";
+ }
+ }
+ else
+ {
+ os << "subscriber proxy is null";
+ }
+ return os.str();
+}