summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2005-07-20 04:07:08 +0000
committerMichi Henning <michi@zeroc.com>2005-07-20 04:07:08 +0000
commit544741283baaed48f8ef64737ebf6284dd5781c8 (patch)
treeee0c377812095448dbf02982be218e69d7a087a3 /cpp/src
parentDid a make depend. (diff)
downloadice-544741283baaed48f8ef64737ebf6284dd5781c8.tar.bz2
ice-544741283baaed48f8ef64737ebf6284dd5781c8.tar.xz
ice-544741283baaed48f8ef64737ebf6284dd5781c8.zip
Added ice_communicator() and ice_toString() to proxies.
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Instance.cpp7
-rw-r--r--cpp/src/Ice/Instance.h2
-rw-r--r--cpp/src/Ice/Proxy.cpp12
-rw-r--r--cpp/src/Ice/Reference.cpp6
-rw-r--r--cpp/src/Ice/Reference.h2
5 files changed, 29 insertions, 0 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 73c99c93176..dd31dc1daf7 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -68,6 +68,12 @@ extern bool ICE_UTIL_API nullHandleAbort;
void IceInternal::incRef(Instance* p) { p->__incRef(); }
void IceInternal::decRef(Instance* p) { p->__decRef(); }
+CommunicatorPtr
+IceInternal::Instance::communicator() const
+{
+ return _communicator;
+}
+
PropertiesPtr
IceInternal::Instance::properties() const
{
@@ -391,6 +397,7 @@ IceInternal::Instance::getDefaultContext() const
IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const PropertiesPtr& properties) :
+ _communicator(communicator.get()),
_destroyed(false),
_properties(properties),
_messageSizeMax(0),
diff --git a/cpp/src/Ice/Instance.h b/cpp/src/Ice/Instance.h
index 2ff86dcbdbe..ca0b971282a 100644
--- a/cpp/src/Ice/Instance.h
+++ b/cpp/src/Ice/Instance.h
@@ -48,6 +48,7 @@ class Instance : public IceUtil::Shared, public IceUtil::RecMutex
{
public:
+ Ice::CommunicatorPtr communicator() const;
Ice::PropertiesPtr properties() const;
Ice::LoggerPtr logger() const;
void logger(const Ice::LoggerPtr&);
@@ -85,6 +86,7 @@ private:
void destroy();
friend class Ice::CommunicatorI;
+ Ice::Communicator* _communicator; // Not a Ptr, to avoid having Instance and CommunicatorI point at each other.
bool _destroyed;
const Ice::PropertiesPtr _properties; // Immutable, not reset by destroy().
Ice::LoggerPtr _logger; // Not reset by destroy().
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index ca04ffd949b..3cfb4f1e1e7 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -133,6 +133,18 @@ IceProxy::Ice::Object::ice_hash() const
return _reference->hash();
}
+CommunicatorPtr
+IceProxy::Ice::Object::ice_communicator() const
+{
+ return _reference->getCommunicator();
+}
+
+string
+IceProxy::Ice::Object::ice_toString() const
+{
+ return _reference->toString();
+}
+
bool
IceProxy::Ice::Object::ice_isA(const string& __id)
{
diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp
index ae64dc783b0..ceb0e996961 100644
--- a/cpp/src/Ice/Reference.cpp
+++ b/cpp/src/Ice/Reference.cpp
@@ -51,6 +51,12 @@ IceInternal::Reference::defaultContext() const
return r;
}
+CommunicatorPtr
+IceInternal::Reference::getCommunicator() const
+{
+ return _instance->communicator();
+}
+
ReferencePtr
IceInternal::Reference::changeContext(const Context& newContext) const
{
diff --git a/cpp/src/Ice/Reference.h b/cpp/src/Ice/Reference.h
index 748eb6b011b..a37b94daf78 100644
--- a/cpp/src/Ice/Reference.h
+++ b/cpp/src/Ice/Reference.h
@@ -50,6 +50,8 @@ public:
ReferencePtr defaultContext() const;
+ Ice::CommunicatorPtr getCommunicator() const;
+
virtual bool getSecure() const = 0;
virtual std::vector<EndpointPtr> getEndpoints() const = 0;
virtual bool getCollocationOptimization() const = 0;