summaryrefslogtreecommitdiff
path: root/cppe/src
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2007-04-26 19:07:41 +0000
committerDwayne Boone <dwayne@zeroc.com>2007-04-26 19:07:41 +0000
commit8ff8b0052bf9e0121365dca1a99a6334402a58dc (patch)
treeaf43e4491889cb7b795aee946429e866f46ee2e6 /cppe/src
parentBug 2149 (diff)
downloadice-8ff8b0052bf9e0121365dca1a99a6334402a58dc.tar.bz2
ice-8ff8b0052bf9e0121365dca1a99a6334402a58dc.tar.xz
ice-8ff8b0052bf9e0121365dca1a99a6334402a58dc.zip
Bug 2149 - context changes
Diffstat (limited to 'cppe/src')
-rw-r--r--cppe/src/IceE/Outgoing.cpp11
-rw-r--r--cppe/src/IceE/Proxy.cpp32
2 files changed, 12 insertions, 31 deletions
diff --git a/cppe/src/IceE/Outgoing.cpp b/cppe/src/IceE/Outgoing.cpp
index 2dc7074d463..888b33d105a 100644
--- a/cppe/src/IceE/Outgoing.cpp
+++ b/cppe/src/IceE/Outgoing.cpp
@@ -45,7 +45,7 @@ IceInternal::LocalExceptionWrapper::retry() const
}
IceInternal::Outgoing::Outgoing(Connection* connection, Reference* ref, const string& operation,
- OperationMode mode, const Context& context) :
+ OperationMode mode, const Context* context) :
_connection(connection),
_reference(ref),
_state(StateUnsent),
@@ -98,9 +98,14 @@ IceInternal::Outgoing::Outgoing(Connection* connection, Reference* ref, const st
_stream.write(static_cast<Byte>(mode));
- _stream.writeSize(Int(context.size()));
+ if(context == 0)
+ {
+ context = &_reference->getContext()->getValue();
+ }
+
+ _stream.writeSize(Int(context->size()));
Context::const_iterator p;
- for(p = context.begin(); p != context.end(); ++p)
+ for(p = context->begin(); p != context->end(); ++p)
{
_stream.write(p->first);
_stream.write(p->second);
diff --git a/cppe/src/IceE/Proxy.cpp b/cppe/src/IceE/Proxy.cpp
index 5c22de23c8d..0f3bcc1ef06 100644
--- a/cppe/src/IceE/Proxy.cpp
+++ b/cppe/src/IceE/Proxy.cpp
@@ -154,13 +154,7 @@ IceProxy::Ice::Object::ice_toString() const
}
bool
-IceProxy::Ice::Object::ice_isA(const string& __id)
-{
- return ice_isA(__id, _reference->getContext()->getValue());
-}
-
-bool
-IceProxy::Ice::Object::ice_isA(const string& __id, const Context& __context)
+IceProxy::Ice::Object::ice_isA(const string& __id, const Context* __context)
{
int __cnt = 0;
while(true)
@@ -228,13 +222,7 @@ IceProxy::Ice::Object::ice_isA(const string& __id, const Context& __context)
}
void
-IceProxy::Ice::Object::ice_ping()
-{
- ice_ping(_reference->getContext()->getValue());
-}
-
-void
-IceProxy::Ice::Object::ice_ping(const Context& __context)
+IceProxy::Ice::Object::ice_ping(const Context* __context)
{
int __cnt = 0;
while(true)
@@ -291,13 +279,7 @@ IceProxy::Ice::Object::ice_ping(const Context& __context)
}
vector<string>
-IceProxy::Ice::Object::ice_ids()
-{
- return ice_ids(_reference->getContext()->getValue());
-}
-
-vector<string>
-IceProxy::Ice::Object::ice_ids(const Context& __context)
+IceProxy::Ice::Object::ice_ids(const Context* __context)
{
int __cnt = 0;
while(true)
@@ -357,13 +339,7 @@ IceProxy::Ice::Object::ice_ids(const Context& __context)
}
string
-IceProxy::Ice::Object::ice_id()
-{
- return ice_id(_reference->getContext()->getValue());
-}
-
-string
-IceProxy::Ice::Object::ice_id(const Context& __context)
+IceProxy::Ice::Object::ice_id(const Context* __context)
{
int __cnt = 0;
while(true)