diff options
Diffstat (limited to 'cppe')
-rw-r--r-- | cppe/include/IceE/Outgoing.h | 2 | ||||
-rw-r--r-- | cppe/include/IceE/Proxy.h | 48 | ||||
-rw-r--r-- | cppe/src/IceE/Outgoing.cpp | 11 | ||||
-rw-r--r-- | cppe/src/IceE/Proxy.cpp | 32 |
4 files changed, 53 insertions, 40 deletions
diff --git a/cppe/include/IceE/Outgoing.h b/cppe/include/IceE/Outgoing.h index da84d8613e9..6b7242f801e 100644 --- a/cppe/include/IceE/Outgoing.h +++ b/cppe/include/IceE/Outgoing.h @@ -68,7 +68,7 @@ public: StateLocalException }; - Outgoing(Ice::Connection*, Reference*, const std::string&, Ice::OperationMode, const Ice::Context&); + Outgoing(Ice::Connection*, Reference*, const std::string&, Ice::OperationMode, const Ice::Context*); ~Outgoing() {} bool invoke(); // Returns true if ok, false if user exception. diff --git a/cppe/include/IceE/Proxy.h b/cppe/include/IceE/Proxy.h index 31ee9c30634..13070252667 100644 --- a/cppe/include/IceE/Proxy.h +++ b/cppe/include/IceE/Proxy.h @@ -120,14 +120,41 @@ public: ::std::string ice_toString() const; - bool ice_isA(const ::std::string&); - bool ice_isA(const ::std::string&, const ::Ice::Context&); - void ice_ping(); - void ice_ping(const ::Ice::Context&); - ::std::vector< ::std::string> ice_ids(); - ::std::vector< ::std::string> ice_ids(const ::Ice::Context&); - ::std::string ice_id(); - ::std::string ice_id(const ::Ice::Context&); + bool ice_isA(const ::std::string& typeId) + { + return ice_isA(typeId, 0); + } + bool ice_isA(const ::std::string& typeId, const ::Ice::Context& context) + { + return ice_isA(typeId, &context); + } + + void ice_ping() + { + ice_ping(0); + } + void ice_ping(const ::Ice::Context& context) + { + ice_ping(&context); + } + + ::std::vector< ::std::string> ice_ids() + { + return ice_ids(0); + } + ::std::vector< ::std::string> ice_ids(const ::Ice::Context& context) + { + return ice_ids(&context); + } + + ::std::string ice_id() + { + return ice_id(0); + } + ::std::string ice_id(const ::Ice::Context& context) + { + return ice_id(&context); + } ::Ice::Identity ice_getIdentity() const; ICE_DEPRECATED_API ::Ice::ObjectPrx ice_newIdentity(const ::Ice::Identity& id) const @@ -196,6 +223,11 @@ protected: private: + bool ice_isA(const ::std::string&, const ::Ice::Context*); + void ice_ping(const ::Ice::Context*); + ::std::vector< ::std::string> ice_ids(const ::Ice::Context*); + ::std::string ice_id(const ::Ice::Context*); + void setup(const ::IceInternal::ReferencePtr& ref) { // 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) |