|
|
@ -0,0 +1,825 @@ |
|
|
|
// **********************************************************************
|
|
|
|
//
|
|
|
|
// Copyright (c) 2003-2018 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.
|
|
|
|
//
|
|
|
|
// **********************************************************************
|
|
|
|
//
|
|
|
|
// Ice version 3.7.1
|
|
|
|
//
|
|
|
|
// <auto-generated>
|
|
|
|
//
|
|
|
|
// Generated from file `MW.ice'
|
|
|
|
//
|
|
|
|
// Warning: do not edit this file.
|
|
|
|
//
|
|
|
|
// </auto-generated>
|
|
|
|
//
|
|
|
|
|
|
|
|
#include <MW.h>
|
|
|
|
#include <IceUtil/PushDisableWarnings.h>
|
|
|
|
#include <Ice/LocalException.h>
|
|
|
|
#include <Ice/ValueFactory.h>
|
|
|
|
#include <Ice/OutgoingAsync.h>
|
|
|
|
#include <Ice/InputStream.h>
|
|
|
|
#include <Ice/OutputStream.h>
|
|
|
|
#include <Ice/LocalException.h>
|
|
|
|
#include <Ice/SlicedData.h>
|
|
|
|
#include <IceUtil/PopDisableWarnings.h>
|
|
|
|
|
|
|
|
#if defined(_MSC_VER)
|
|
|
|
# pragma warning(disable:4458) // declaration of ... hides class member
|
|
|
|
#elif defined(__clang__)
|
|
|
|
# pragma clang diagnostic ignored "-Wshadow"
|
|
|
|
#elif defined(__GNUC__)
|
|
|
|
# pragma GCC diagnostic ignored "-Wshadow"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ICE_IGNORE_VERSION
|
|
|
|
# if ICE_INT_VERSION / 100 != 307
|
|
|
|
# error Ice version mismatch!
|
|
|
|
# endif
|
|
|
|
# if ICE_INT_VERSION % 100 > 50
|
|
|
|
# error Beta header file detected
|
|
|
|
# endif
|
|
|
|
# if ICE_INT_VERSION % 100 < 1
|
|
|
|
# error Ice patch level mismatch!
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef ICE_CPP11_MAPPING // C++11 mapping
|
|
|
|
|
|
|
|
namespace |
|
|
|
{ |
|
|
|
|
|
|
|
const ::std::string iceC_MW_MWCallback_ids[2] = |
|
|
|
{ |
|
|
|
"::Ice::Object", |
|
|
|
"::MW::MWCallback" |
|
|
|
}; |
|
|
|
const ::std::string iceC_MW_MWCallback_ops[] = |
|
|
|
{ |
|
|
|
"ice_id", |
|
|
|
"ice_ids", |
|
|
|
"ice_isA", |
|
|
|
"ice_ping", |
|
|
|
"status" |
|
|
|
}; |
|
|
|
const ::std::string iceC_MW_MWCallback_status_name = "status"; |
|
|
|
|
|
|
|
const ::std::string iceC_MW_MWSession_ids[3] = |
|
|
|
{ |
|
|
|
"::Glacier2::Session", |
|
|
|
"::Ice::Object", |
|
|
|
"::MW::MWSession" |
|
|
|
}; |
|
|
|
const ::std::string iceC_MW_MWSession_ops[] = |
|
|
|
{ |
|
|
|
"destroy", |
|
|
|
"ice_id", |
|
|
|
"ice_ids", |
|
|
|
"ice_isA", |
|
|
|
"ice_ping", |
|
|
|
"sendCoords", |
|
|
|
"setCallback" |
|
|
|
}; |
|
|
|
const ::std::string iceC_MW_MWSession_setCallback_name = "setCallback"; |
|
|
|
const ::std::string iceC_MW_MWSession_sendCoords_name = "sendCoords"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
bool |
|
|
|
MW::MWCallback::ice_isA(::std::string s, const ::Ice::Current&) const |
|
|
|
{ |
|
|
|
return ::std::binary_search(iceC_MW_MWCallback_ids, iceC_MW_MWCallback_ids + 2, s); |
|
|
|
} |
|
|
|
|
|
|
|
::std::vector<::std::string> |
|
|
|
MW::MWCallback::ice_ids(const ::Ice::Current&) const |
|
|
|
{ |
|
|
|
return ::std::vector<::std::string>(&iceC_MW_MWCallback_ids[0], &iceC_MW_MWCallback_ids[2]); |
|
|
|
} |
|
|
|
|
|
|
|
::std::string |
|
|
|
MW::MWCallback::ice_id(const ::Ice::Current&) const |
|
|
|
{ |
|
|
|
return ice_staticId(); |
|
|
|
} |
|
|
|
|
|
|
|
const ::std::string& |
|
|
|
MW::MWCallback::ice_staticId() |
|
|
|
{ |
|
|
|
static const ::std::string typeId = "::MW::MWCallback"; |
|
|
|
return typeId; |
|
|
|
} |
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
bool |
|
|
|
MW::MWCallback::_iceD_status(::IceInternal::Incoming& inS, const ::Ice::Current& current) |
|
|
|
{ |
|
|
|
_iceCheckMode(::Ice::OperationMode::Normal, current.mode); |
|
|
|
auto istr = inS.startReadParams(); |
|
|
|
::std::string iceP_s; |
|
|
|
istr->readAll(iceP_s); |
|
|
|
inS.endReadParams(); |
|
|
|
this->status(::std::move(iceP_s), current); |
|
|
|
inS.writeEmptyParams(); |
|
|
|
return true; |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
bool |
|
|
|
MW::MWCallback::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) |
|
|
|
{ |
|
|
|
::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(iceC_MW_MWCallback_ops, iceC_MW_MWCallback_ops + 5, current.operation); |
|
|
|
if(r.first == r.second) |
|
|
|
{ |
|
|
|
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); |
|
|
|
} |
|
|
|
|
|
|
|
switch(r.first - iceC_MW_MWCallback_ops) |
|
|
|
{ |
|
|
|
case 0: |
|
|
|
{ |
|
|
|
return _iceD_ice_id(in, current); |
|
|
|
} |
|
|
|
case 1: |
|
|
|
{ |
|
|
|
return _iceD_ice_ids(in, current); |
|
|
|
} |
|
|
|
case 2: |
|
|
|
{ |
|
|
|
return _iceD_ice_isA(in, current); |
|
|
|
} |
|
|
|
case 3: |
|
|
|
{ |
|
|
|
return _iceD_ice_ping(in, current); |
|
|
|
} |
|
|
|
case 4: |
|
|
|
{ |
|
|
|
return _iceD_status(in, current); |
|
|
|
} |
|
|
|
default: |
|
|
|
{ |
|
|
|
assert(false); |
|
|
|
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
bool |
|
|
|
MW::MWSession::ice_isA(::std::string s, const ::Ice::Current&) const |
|
|
|
{ |
|
|
|
return ::std::binary_search(iceC_MW_MWSession_ids, iceC_MW_MWSession_ids + 3, s); |
|
|
|
} |
|
|
|
|
|
|
|
::std::vector<::std::string> |
|
|
|
MW::MWSession::ice_ids(const ::Ice::Current&) const |
|
|
|
{ |
|
|
|
return ::std::vector<::std::string>(&iceC_MW_MWSession_ids[0], &iceC_MW_MWSession_ids[3]); |
|
|
|
} |
|
|
|
|
|
|
|
::std::string |
|
|
|
MW::MWSession::ice_id(const ::Ice::Current&) const |
|
|
|
{ |
|
|
|
return ice_staticId(); |
|
|
|
} |
|
|
|
|
|
|
|
const ::std::string& |
|
|
|
MW::MWSession::ice_staticId() |
|
|
|
{ |
|
|
|
static const ::std::string typeId = "::MW::MWSession"; |
|
|
|
return typeId; |
|
|
|
} |
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
bool |
|
|
|
MW::MWSession::_iceD_setCallback(::IceInternal::Incoming& inS, const ::Ice::Current& current) |
|
|
|
{ |
|
|
|
_iceCheckMode(::Ice::OperationMode::Normal, current.mode); |
|
|
|
auto istr = inS.startReadParams(); |
|
|
|
::std::shared_ptr<MWCallbackPrx> iceP_callback; |
|
|
|
istr->readAll(iceP_callback); |
|
|
|
inS.endReadParams(); |
|
|
|
this->setCallback(::std::move(iceP_callback), current); |
|
|
|
inS.writeEmptyParams(); |
|
|
|
return true; |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
bool |
|
|
|
MW::MWSession::_iceD_sendCoords(::IceInternal::Incoming& inS, const ::Ice::Current& current) |
|
|
|
{ |
|
|
|
_iceCheckMode(::Ice::OperationMode::Normal, current.mode); |
|
|
|
auto istr = inS.startReadParams(); |
|
|
|
::std::string iceP_coords; |
|
|
|
istr->readAll(iceP_coords); |
|
|
|
inS.endReadParams(); |
|
|
|
this->sendCoords(::std::move(iceP_coords), current); |
|
|
|
inS.writeEmptyParams(); |
|
|
|
return true; |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
bool |
|
|
|
MW::MWSession::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) |
|
|
|
{ |
|
|
|
::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(iceC_MW_MWSession_ops, iceC_MW_MWSession_ops + 7, current.operation); |
|
|
|
if(r.first == r.second) |
|
|
|
{ |
|
|
|
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); |
|
|
|
} |
|
|
|
|
|
|
|
switch(r.first - iceC_MW_MWSession_ops) |
|
|
|
{ |
|
|
|
case 0: |
|
|
|
{ |
|
|
|
return _iceD_destroy(in, current); |
|
|
|
} |
|
|
|
case 1: |
|
|
|
{ |
|
|
|
return _iceD_ice_id(in, current); |
|
|
|
} |
|
|
|
case 2: |
|
|
|
{ |
|
|
|
return _iceD_ice_ids(in, current); |
|
|
|
} |
|
|
|
case 3: |
|
|
|
{ |
|
|
|
return _iceD_ice_isA(in, current); |
|
|
|
} |
|
|
|
case 4: |
|
|
|
{ |
|
|
|
return _iceD_ice_ping(in, current); |
|
|
|
} |
|
|
|
case 5: |
|
|
|
{ |
|
|
|
return _iceD_sendCoords(in, current); |
|
|
|
} |
|
|
|
case 6: |
|
|
|
{ |
|
|
|
return _iceD_setCallback(in, current); |
|
|
|
} |
|
|
|
default: |
|
|
|
{ |
|
|
|
assert(false); |
|
|
|
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
void |
|
|
|
MW::MWCallbackPrx::_iceI_status(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>& outAsync, const ::std::string& iceP_s, const ::Ice::Context& context) |
|
|
|
{ |
|
|
|
outAsync->invoke(iceC_MW_MWCallback_status_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, |
|
|
|
[&](::Ice::OutputStream* ostr) |
|
|
|
{ |
|
|
|
ostr->writeAll(iceP_s); |
|
|
|
}, |
|
|
|
nullptr); |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
::std::shared_ptr<::Ice::ObjectPrx> |
|
|
|
MW::MWCallbackPrx::_newInstance() const |
|
|
|
{ |
|
|
|
return ::IceInternal::createProxy<MWCallbackPrx>(); |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
const ::std::string& |
|
|
|
MW::MWCallbackPrx::ice_staticId() |
|
|
|
{ |
|
|
|
return MWCallback::ice_staticId(); |
|
|
|
} |
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
void |
|
|
|
MW::MWSessionPrx::_iceI_setCallback(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>& outAsync, const ::std::shared_ptr<MWCallbackPrx>& iceP_callback, const ::Ice::Context& context) |
|
|
|
{ |
|
|
|
outAsync->invoke(iceC_MW_MWSession_setCallback_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, |
|
|
|
[&](::Ice::OutputStream* ostr) |
|
|
|
{ |
|
|
|
ostr->writeAll(iceP_callback); |
|
|
|
}, |
|
|
|
nullptr); |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
void |
|
|
|
MW::MWSessionPrx::_iceI_sendCoords(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>& outAsync, const ::std::string& iceP_coords, const ::Ice::Context& context) |
|
|
|
{ |
|
|
|
outAsync->invoke(iceC_MW_MWSession_sendCoords_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, |
|
|
|
[&](::Ice::OutputStream* ostr) |
|
|
|
{ |
|
|
|
ostr->writeAll(iceP_coords); |
|
|
|
}, |
|
|
|
nullptr); |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
::std::shared_ptr<::Ice::ObjectPrx> |
|
|
|
MW::MWSessionPrx::_newInstance() const |
|
|
|
{ |
|
|
|
return ::IceInternal::createProxy<MWSessionPrx>(); |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
const ::std::string& |
|
|
|
MW::MWSessionPrx::ice_staticId() |
|
|
|
{ |
|
|
|
return MWSession::ice_staticId(); |
|
|
|
} |
|
|
|
|
|
|
|
#else // C++98 mapping
|
|
|
|
|
|
|
|
namespace |
|
|
|
{ |
|
|
|
|
|
|
|
const ::std::string iceC_MW_MWCallback_status_name = "status"; |
|
|
|
|
|
|
|
const ::std::string iceC_MW_MWSession_setCallback_name = "setCallback"; |
|
|
|
|
|
|
|
const ::std::string iceC_MW_MWSession_sendCoords_name = "sendCoords"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
::IceProxy::Ice::Object* ::IceProxy::MW::upCast(MWCallback* p) { return p; } |
|
|
|
|
|
|
|
void |
|
|
|
::IceProxy::MW::_readProxy(::Ice::InputStream* istr, ::IceInternal::ProxyHandle< MWCallback>& v) |
|
|
|
{ |
|
|
|
::Ice::ObjectPrx proxy; |
|
|
|
istr->read(proxy); |
|
|
|
if(!proxy) |
|
|
|
{ |
|
|
|
v = 0; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
v = new MWCallback; |
|
|
|
v->_copyFrom(proxy); |
|
|
|
} |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
::Ice::AsyncResultPtr |
|
|
|
IceProxy::MW::MWCallback::_iceI_begin_status(const ::std::string& iceP_s, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) |
|
|
|
{ |
|
|
|
::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_MW_MWCallback_status_name, del, cookie, sync); |
|
|
|
try |
|
|
|
{ |
|
|
|
result->prepare(iceC_MW_MWCallback_status_name, ::Ice::Normal, context); |
|
|
|
::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); |
|
|
|
ostr->write(iceP_s); |
|
|
|
result->endWriteParams(); |
|
|
|
result->invoke(iceC_MW_MWCallback_status_name); |
|
|
|
} |
|
|
|
catch(const ::Ice::Exception& ex) |
|
|
|
{ |
|
|
|
result->abort(ex); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
void |
|
|
|
IceProxy::MW::MWCallback::end_status(const ::Ice::AsyncResultPtr& result) |
|
|
|
{ |
|
|
|
_end(result, iceC_MW_MWCallback_status_name); |
|
|
|
} |
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
::IceProxy::Ice::Object* |
|
|
|
IceProxy::MW::MWCallback::_newInstance() const |
|
|
|
{ |
|
|
|
return new MWCallback; |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
const ::std::string& |
|
|
|
IceProxy::MW::MWCallback::ice_staticId() |
|
|
|
{ |
|
|
|
return ::MW::MWCallback::ice_staticId(); |
|
|
|
} |
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
::IceProxy::Ice::Object* ::IceProxy::MW::upCast(MWSession* p) { return p; } |
|
|
|
|
|
|
|
void |
|
|
|
::IceProxy::MW::_readProxy(::Ice::InputStream* istr, ::IceInternal::ProxyHandle< MWSession>& v) |
|
|
|
{ |
|
|
|
::Ice::ObjectPrx proxy; |
|
|
|
istr->read(proxy); |
|
|
|
if(!proxy) |
|
|
|
{ |
|
|
|
v = 0; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
v = new MWSession; |
|
|
|
v->_copyFrom(proxy); |
|
|
|
} |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
::Ice::AsyncResultPtr |
|
|
|
IceProxy::MW::MWSession::_iceI_begin_setCallback(const ::MW::MWCallbackPrx& iceP_callback, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) |
|
|
|
{ |
|
|
|
::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_MW_MWSession_setCallback_name, del, cookie, sync); |
|
|
|
try |
|
|
|
{ |
|
|
|
result->prepare(iceC_MW_MWSession_setCallback_name, ::Ice::Normal, context); |
|
|
|
::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); |
|
|
|
ostr->write(iceP_callback); |
|
|
|
result->endWriteParams(); |
|
|
|
result->invoke(iceC_MW_MWSession_setCallback_name); |
|
|
|
} |
|
|
|
catch(const ::Ice::Exception& ex) |
|
|
|
{ |
|
|
|
result->abort(ex); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
void |
|
|
|
IceProxy::MW::MWSession::end_setCallback(const ::Ice::AsyncResultPtr& result) |
|
|
|
{ |
|
|
|
_end(result, iceC_MW_MWSession_setCallback_name); |
|
|
|
} |
|
|
|
|
|
|
|
::Ice::AsyncResultPtr |
|
|
|
IceProxy::MW::MWSession::_iceI_begin_sendCoords(const ::std::string& iceP_coords, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) |
|
|
|
{ |
|
|
|
::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_MW_MWSession_sendCoords_name, del, cookie, sync); |
|
|
|
try |
|
|
|
{ |
|
|
|
result->prepare(iceC_MW_MWSession_sendCoords_name, ::Ice::Normal, context); |
|
|
|
::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); |
|
|
|
ostr->write(iceP_coords); |
|
|
|
result->endWriteParams(); |
|
|
|
result->invoke(iceC_MW_MWSession_sendCoords_name); |
|
|
|
} |
|
|
|
catch(const ::Ice::Exception& ex) |
|
|
|
{ |
|
|
|
result->abort(ex); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
void |
|
|
|
IceProxy::MW::MWSession::end_sendCoords(const ::Ice::AsyncResultPtr& result) |
|
|
|
{ |
|
|
|
_end(result, iceC_MW_MWSession_sendCoords_name); |
|
|
|
} |
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
::IceProxy::Ice::Object* |
|
|
|
IceProxy::MW::MWSession::_newInstance() const |
|
|
|
{ |
|
|
|
return new MWSession; |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
const ::std::string& |
|
|
|
IceProxy::MW::MWSession::ice_staticId() |
|
|
|
{ |
|
|
|
return ::MW::MWSession::ice_staticId(); |
|
|
|
} |
|
|
|
|
|
|
|
MW::MWCallback::~MWCallback() |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
::Ice::Object* MW::upCast(MWCallback* p) { return p; } |
|
|
|
|
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
namespace |
|
|
|
{ |
|
|
|
const ::std::string iceC_MW_MWCallback_ids[2] = |
|
|
|
{ |
|
|
|
"::Ice::Object", |
|
|
|
"::MW::MWCallback" |
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
bool |
|
|
|
MW::MWCallback::ice_isA(const ::std::string& s, const ::Ice::Current&) const |
|
|
|
{ |
|
|
|
return ::std::binary_search(iceC_MW_MWCallback_ids, iceC_MW_MWCallback_ids + 2, s); |
|
|
|
} |
|
|
|
|
|
|
|
::std::vector< ::std::string> |
|
|
|
MW::MWCallback::ice_ids(const ::Ice::Current&) const |
|
|
|
{ |
|
|
|
return ::std::vector< ::std::string>(&iceC_MW_MWCallback_ids[0], &iceC_MW_MWCallback_ids[2]); |
|
|
|
} |
|
|
|
|
|
|
|
const ::std::string& |
|
|
|
MW::MWCallback::ice_id(const ::Ice::Current&) const |
|
|
|
{ |
|
|
|
return ice_staticId(); |
|
|
|
} |
|
|
|
|
|
|
|
const ::std::string& |
|
|
|
MW::MWCallback::ice_staticId() |
|
|
|
{ |
|
|
|
#ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC
|
|
|
|
static const ::std::string typeId = "::MW::MWCallback"; |
|
|
|
return typeId; |
|
|
|
#else
|
|
|
|
return iceC_MW_MWCallback_ids[1]; |
|
|
|
#endif
|
|
|
|
} |
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
bool |
|
|
|
MW::MWCallback::_iceD_status(::IceInternal::Incoming& inS, const ::Ice::Current& current) |
|
|
|
{ |
|
|
|
_iceCheckMode(::Ice::Normal, current.mode); |
|
|
|
::Ice::InputStream* istr = inS.startReadParams(); |
|
|
|
::std::string iceP_s; |
|
|
|
istr->read(iceP_s); |
|
|
|
inS.endReadParams(); |
|
|
|
this->status(iceP_s, current); |
|
|
|
inS.writeEmptyParams(); |
|
|
|
return true; |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
namespace |
|
|
|
{ |
|
|
|
const ::std::string iceC_MW_MWCallback_all[] = |
|
|
|
{ |
|
|
|
"ice_id", |
|
|
|
"ice_ids", |
|
|
|
"ice_isA", |
|
|
|
"ice_ping", |
|
|
|
"status" |
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
bool |
|
|
|
MW::MWCallback::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) |
|
|
|
{ |
|
|
|
::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(iceC_MW_MWCallback_all, iceC_MW_MWCallback_all + 5, current.operation); |
|
|
|
if(r.first == r.second) |
|
|
|
{ |
|
|
|
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); |
|
|
|
} |
|
|
|
|
|
|
|
switch(r.first - iceC_MW_MWCallback_all) |
|
|
|
{ |
|
|
|
case 0: |
|
|
|
{ |
|
|
|
return _iceD_ice_id(in, current); |
|
|
|
} |
|
|
|
case 1: |
|
|
|
{ |
|
|
|
return _iceD_ice_ids(in, current); |
|
|
|
} |
|
|
|
case 2: |
|
|
|
{ |
|
|
|
return _iceD_ice_isA(in, current); |
|
|
|
} |
|
|
|
case 3: |
|
|
|
{ |
|
|
|
return _iceD_ice_ping(in, current); |
|
|
|
} |
|
|
|
case 4: |
|
|
|
{ |
|
|
|
return _iceD_status(in, current); |
|
|
|
} |
|
|
|
default: |
|
|
|
{ |
|
|
|
assert(false); |
|
|
|
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
/// \cond STREAM
|
|
|
|
void |
|
|
|
MW::MWCallback::_iceWriteImpl(::Ice::OutputStream* ostr) const |
|
|
|
{ |
|
|
|
ostr->startSlice(ice_staticId(), -1, true); |
|
|
|
::Ice::StreamWriter< MWCallback, ::Ice::OutputStream>::write(ostr, *this); |
|
|
|
ostr->endSlice(); |
|
|
|
} |
|
|
|
|
|
|
|
void |
|
|
|
MW::MWCallback::_iceReadImpl(::Ice::InputStream* istr) |
|
|
|
{ |
|
|
|
istr->startSlice(); |
|
|
|
::Ice::StreamReader< MWCallback, ::Ice::InputStream>::read(istr, *this); |
|
|
|
istr->endSlice(); |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
void |
|
|
|
MW::_icePatchObjectPtr(MWCallbackPtr& handle, const ::Ice::ObjectPtr& v) |
|
|
|
{ |
|
|
|
handle = MWCallbackPtr::dynamicCast(v); |
|
|
|
if(v && !handle) |
|
|
|
{ |
|
|
|
IceInternal::Ex::throwUOE(MWCallback::ice_staticId(), v); |
|
|
|
} |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
MW::MWSession::~MWSession() |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
::Ice::Object* MW::upCast(MWSession* p) { return p; } |
|
|
|
|
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
namespace |
|
|
|
{ |
|
|
|
const ::std::string iceC_MW_MWSession_ids[3] = |
|
|
|
{ |
|
|
|
"::Glacier2::Session", |
|
|
|
"::Ice::Object", |
|
|
|
"::MW::MWSession" |
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
bool |
|
|
|
MW::MWSession::ice_isA(const ::std::string& s, const ::Ice::Current&) const |
|
|
|
{ |
|
|
|
return ::std::binary_search(iceC_MW_MWSession_ids, iceC_MW_MWSession_ids + 3, s); |
|
|
|
} |
|
|
|
|
|
|
|
::std::vector< ::std::string> |
|
|
|
MW::MWSession::ice_ids(const ::Ice::Current&) const |
|
|
|
{ |
|
|
|
return ::std::vector< ::std::string>(&iceC_MW_MWSession_ids[0], &iceC_MW_MWSession_ids[3]); |
|
|
|
} |
|
|
|
|
|
|
|
const ::std::string& |
|
|
|
MW::MWSession::ice_id(const ::Ice::Current&) const |
|
|
|
{ |
|
|
|
return ice_staticId(); |
|
|
|
} |
|
|
|
|
|
|
|
const ::std::string& |
|
|
|
MW::MWSession::ice_staticId() |
|
|
|
{ |
|
|
|
#ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC
|
|
|
|
static const ::std::string typeId = "::MW::MWSession"; |
|
|
|
return typeId; |
|
|
|
#else
|
|
|
|
return iceC_MW_MWSession_ids[2]; |
|
|
|
#endif
|
|
|
|
} |
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
bool |
|
|
|
MW::MWSession::_iceD_setCallback(::IceInternal::Incoming& inS, const ::Ice::Current& current) |
|
|
|
{ |
|
|
|
_iceCheckMode(::Ice::Normal, current.mode); |
|
|
|
::Ice::InputStream* istr = inS.startReadParams(); |
|
|
|
MWCallbackPrx iceP_callback; |
|
|
|
istr->read(iceP_callback); |
|
|
|
inS.endReadParams(); |
|
|
|
this->setCallback(iceP_callback, current); |
|
|
|
inS.writeEmptyParams(); |
|
|
|
return true; |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
bool |
|
|
|
MW::MWSession::_iceD_sendCoords(::IceInternal::Incoming& inS, const ::Ice::Current& current) |
|
|
|
{ |
|
|
|
_iceCheckMode(::Ice::Normal, current.mode); |
|
|
|
::Ice::InputStream* istr = inS.startReadParams(); |
|
|
|
::std::string iceP_coords; |
|
|
|
istr->read(iceP_coords); |
|
|
|
inS.endReadParams(); |
|
|
|
this->sendCoords(iceP_coords, current); |
|
|
|
inS.writeEmptyParams(); |
|
|
|
return true; |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
namespace |
|
|
|
{ |
|
|
|
const ::std::string iceC_MW_MWSession_all[] = |
|
|
|
{ |
|
|
|
"destroy", |
|
|
|
"ice_id", |
|
|
|
"ice_ids", |
|
|
|
"ice_isA", |
|
|
|
"ice_ping", |
|
|
|
"sendCoords", |
|
|
|
"setCallback" |
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
bool |
|
|
|
MW::MWSession::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) |
|
|
|
{ |
|
|
|
::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(iceC_MW_MWSession_all, iceC_MW_MWSession_all + 7, current.operation); |
|
|
|
if(r.first == r.second) |
|
|
|
{ |
|
|
|
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); |
|
|
|
} |
|
|
|
|
|
|
|
switch(r.first - iceC_MW_MWSession_all) |
|
|
|
{ |
|
|
|
case 0: |
|
|
|
{ |
|
|
|
return _iceD_destroy(in, current); |
|
|
|
} |
|
|
|
case 1: |
|
|
|
{ |
|
|
|
return _iceD_ice_id(in, current); |
|
|
|
} |
|
|
|
case 2: |
|
|
|
{ |
|
|
|
return _iceD_ice_ids(in, current); |
|
|
|
} |
|
|
|
case 3: |
|
|
|
{ |
|
|
|
return _iceD_ice_isA(in, current); |
|
|
|
} |
|
|
|
case 4: |
|
|
|
{ |
|
|
|
return _iceD_ice_ping(in, current); |
|
|
|
} |
|
|
|
case 5: |
|
|
|
{ |
|
|
|
return _iceD_sendCoords(in, current); |
|
|
|
} |
|
|
|
case 6: |
|
|
|
{ |
|
|
|
return _iceD_setCallback(in, current); |
|
|
|
} |
|
|
|
default: |
|
|
|
{ |
|
|
|
assert(false); |
|
|
|
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
/// \cond STREAM
|
|
|
|
void |
|
|
|
MW::MWSession::_iceWriteImpl(::Ice::OutputStream* ostr) const |
|
|
|
{ |
|
|
|
ostr->startSlice(ice_staticId(), -1, true); |
|
|
|
::Ice::StreamWriter< MWSession, ::Ice::OutputStream>::write(ostr, *this); |
|
|
|
ostr->endSlice(); |
|
|
|
} |
|
|
|
|
|
|
|
void |
|
|
|
MW::MWSession::_iceReadImpl(::Ice::InputStream* istr) |
|
|
|
{ |
|
|
|
istr->startSlice(); |
|
|
|
::Ice::StreamReader< MWSession, ::Ice::InputStream>::read(istr, *this); |
|
|
|
istr->endSlice(); |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
/// \cond INTERNAL
|
|
|
|
void |
|
|
|
MW::_icePatchObjectPtr(MWSessionPtr& handle, const ::Ice::ObjectPtr& v) |
|
|
|
{ |
|
|
|
handle = MWSessionPtr::dynamicCast(v); |
|
|
|
if(v && !handle) |
|
|
|
{ |
|
|
|
IceInternal::Ex::throwUOE(MWSession::ice_staticId(), v); |
|
|
|
} |
|
|
|
} |
|
|
|
/// \endcond
|
|
|
|
|
|
|
|
namespace Ice |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
#endif
|