eis/src/proxy/MessageICE.cpp

594 lines
17 KiB
C++
Raw Normal View History

// **********************************************************************
//
// 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 `MessageICE.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
#include <proxy/MessageICE.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 <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_baosight_MessageICE_ids[2] =
{
"::Ice::Object",
"::baosight::MessageICE"
};
const ::std::string iceC_baosight_MessageICE_ops[] =
{
"SendDataLong",
"SendDataShort",
"TimeNotify",
"ice_id",
"ice_ids",
"ice_isA",
"ice_ping"
};
const ::std::string iceC_baosight_MessageICE_SendDataShort_name = "SendDataShort";
const ::std::string iceC_baosight_MessageICE_SendDataLong_name = "SendDataLong";
const ::std::string iceC_baosight_MessageICE_TimeNotify_name = "TimeNotify";
}
bool
baosight::MessageICE::ice_isA(::std::string s, const ::Ice::Current&) const
{
return ::std::binary_search(iceC_baosight_MessageICE_ids, iceC_baosight_MessageICE_ids + 2, s);
}
::std::vector<::std::string>
baosight::MessageICE::ice_ids(const ::Ice::Current&) const
{
return ::std::vector<::std::string>(&iceC_baosight_MessageICE_ids[0], &iceC_baosight_MessageICE_ids[2]);
}
::std::string
baosight::MessageICE::ice_id(const ::Ice::Current&) const
{
return ice_staticId();
}
const ::std::string&
baosight::MessageICE::ice_staticId()
{
static const ::std::string typeId = "::baosight::MessageICE";
return typeId;
}
/// \cond INTERNAL
bool
baosight::MessageICE::_iceD_SendDataShort(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
_iceCheckMode(::Ice::OperationMode::Normal, current.mode);
auto istr = inS.startReadParams();
int iceP_eventNo;
::Ice::ByteSeq iceP_seq;
int iceP_length;
istr->readAll(iceP_eventNo, iceP_seq, iceP_length);
inS.endReadParams();
this->SendDataShort(iceP_eventNo, ::std::move(iceP_seq), iceP_length, current);
inS.writeEmptyParams();
return true;
}
/// \endcond
/// \cond INTERNAL
bool
baosight::MessageICE::_iceD_SendDataLong(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
_iceCheckMode(::Ice::OperationMode::Normal, current.mode);
auto istr = inS.startReadParams();
int iceP_eventNo;
::Ice::ByteSeq iceP_seq;
int iceP_length;
::std::string iceP_sender;
::std::string iceP_reciver;
::std::string iceP_aditional;
istr->readAll(iceP_eventNo, iceP_seq, iceP_length, iceP_sender, iceP_reciver, iceP_aditional);
inS.endReadParams();
this->SendDataLong(iceP_eventNo, ::std::move(iceP_seq), iceP_length, ::std::move(iceP_sender), ::std::move(iceP_reciver), ::std::move(iceP_aditional), current);
inS.writeEmptyParams();
return true;
}
/// \endcond
/// \cond INTERNAL
bool
baosight::MessageICE::_iceD_TimeNotify(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
_iceCheckMode(::Ice::OperationMode::Normal, current.mode);
auto istr = inS.startReadParams();
int iceP_eventNo;
::Ice::ByteSeq iceP_seq;
istr->readAll(iceP_eventNo, iceP_seq);
inS.endReadParams();
this->TimeNotify(iceP_eventNo, ::std::move(iceP_seq), current);
inS.writeEmptyParams();
return true;
}
/// \endcond
/// \cond INTERNAL
bool
baosight::MessageICE::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
{
::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(iceC_baosight_MessageICE_ops, iceC_baosight_MessageICE_ops + 7, current.operation);
if(r.first == r.second)
{
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
switch(r.first - iceC_baosight_MessageICE_ops)
{
case 0:
{
return _iceD_SendDataLong(in, current);
}
case 1:
{
return _iceD_SendDataShort(in, current);
}
case 2:
{
return _iceD_TimeNotify(in, current);
}
case 3:
{
return _iceD_ice_id(in, current);
}
case 4:
{
return _iceD_ice_ids(in, current);
}
case 5:
{
return _iceD_ice_isA(in, current);
}
case 6:
{
return _iceD_ice_ping(in, current);
}
default:
{
assert(false);
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
}
}
/// \endcond
/// \cond INTERNAL
void
baosight::MessageICEPrx::_iceI_SendDataShort(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>& outAsync, int iceP_eventNo, const ::Ice::ByteSeq& iceP_seq, int iceP_length, const ::Ice::Context& context)
{
outAsync->invoke(iceC_baosight_MessageICE_SendDataShort_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context,
[&](::Ice::OutputStream* ostr)
{
ostr->writeAll(iceP_eventNo, iceP_seq, iceP_length);
},
nullptr);
}
/// \endcond
/// \cond INTERNAL
void
baosight::MessageICEPrx::_iceI_SendDataLong(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>& outAsync, int iceP_eventNo, const ::Ice::ByteSeq& iceP_seq, int iceP_length, const ::std::string& iceP_sender, const ::std::string& iceP_reciver, const ::std::string& iceP_aditional, const ::Ice::Context& context)
{
outAsync->invoke(iceC_baosight_MessageICE_SendDataLong_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context,
[&](::Ice::OutputStream* ostr)
{
ostr->writeAll(iceP_eventNo, iceP_seq, iceP_length, iceP_sender, iceP_reciver, iceP_aditional);
},
nullptr);
}
/// \endcond
/// \cond INTERNAL
void
baosight::MessageICEPrx::_iceI_TimeNotify(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>& outAsync, int iceP_eventNo, const ::Ice::ByteSeq& iceP_seq, const ::Ice::Context& context)
{
outAsync->invoke(iceC_baosight_MessageICE_TimeNotify_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context,
[&](::Ice::OutputStream* ostr)
{
ostr->writeAll(iceP_eventNo, iceP_seq);
},
nullptr);
}
/// \endcond
/// \cond INTERNAL
::std::shared_ptr<::Ice::ObjectPrx>
baosight::MessageICEPrx::_newInstance() const
{
return ::IceInternal::createProxy<MessageICEPrx>();
}
/// \endcond
const ::std::string&
baosight::MessageICEPrx::ice_staticId()
{
return MessageICE::ice_staticId();
}
#else // C++98 mapping
namespace
{
const ::std::string iceC_baosight_MessageICE_SendDataShort_name = "SendDataShort";
const ::std::string iceC_baosight_MessageICE_SendDataLong_name = "SendDataLong";
const ::std::string iceC_baosight_MessageICE_TimeNotify_name = "TimeNotify";
}
/// \cond INTERNAL
::IceProxy::Ice::Object* ::IceProxy::baosight::upCast(MessageICE* p) { return p; }
void
::IceProxy::baosight::_readProxy(::Ice::InputStream* istr, ::IceInternal::ProxyHandle< MessageICE>& v)
{
::Ice::ObjectPrx proxy;
istr->read(proxy);
if(!proxy)
{
v = 0;
}
else
{
v = new MessageICE;
v->_copyFrom(proxy);
}
}
/// \endcond
::Ice::AsyncResultPtr
IceProxy::baosight::MessageICE::_iceI_begin_SendDataShort(::Ice::Int iceP_eventNo, const ::Ice::ByteSeq& iceP_seq, ::Ice::Int iceP_length, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync)
{
::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_baosight_MessageICE_SendDataShort_name, del, cookie, sync);
try
{
result->prepare(iceC_baosight_MessageICE_SendDataShort_name, ::Ice::Normal, context);
::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat);
ostr->write(iceP_eventNo);
ostr->write(iceP_seq);
ostr->write(iceP_length);
result->endWriteParams();
result->invoke(iceC_baosight_MessageICE_SendDataShort_name);
}
catch(const ::Ice::Exception& ex)
{
result->abort(ex);
}
return result;
}
void
IceProxy::baosight::MessageICE::end_SendDataShort(const ::Ice::AsyncResultPtr& result)
{
_end(result, iceC_baosight_MessageICE_SendDataShort_name);
}
::Ice::AsyncResultPtr
IceProxy::baosight::MessageICE::_iceI_begin_SendDataLong(::Ice::Int iceP_eventNo, const ::Ice::ByteSeq& iceP_seq, ::Ice::Int iceP_length, const ::std::string& iceP_sender, const ::std::string& iceP_reciver, const ::std::string& iceP_aditional, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync)
{
::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_baosight_MessageICE_SendDataLong_name, del, cookie, sync);
try
{
result->prepare(iceC_baosight_MessageICE_SendDataLong_name, ::Ice::Normal, context);
::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat);
ostr->write(iceP_eventNo);
ostr->write(iceP_seq);
ostr->write(iceP_length);
ostr->write(iceP_sender);
ostr->write(iceP_reciver);
ostr->write(iceP_aditional);
result->endWriteParams();
result->invoke(iceC_baosight_MessageICE_SendDataLong_name);
}
catch(const ::Ice::Exception& ex)
{
result->abort(ex);
}
return result;
}
void
IceProxy::baosight::MessageICE::end_SendDataLong(const ::Ice::AsyncResultPtr& result)
{
_end(result, iceC_baosight_MessageICE_SendDataLong_name);
}
::Ice::AsyncResultPtr
IceProxy::baosight::MessageICE::_iceI_begin_TimeNotify(::Ice::Int iceP_eventNo, const ::Ice::ByteSeq& iceP_seq, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync)
{
::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_baosight_MessageICE_TimeNotify_name, del, cookie, sync);
try
{
result->prepare(iceC_baosight_MessageICE_TimeNotify_name, ::Ice::Normal, context);
::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat);
ostr->write(iceP_eventNo);
ostr->write(iceP_seq);
result->endWriteParams();
result->invoke(iceC_baosight_MessageICE_TimeNotify_name);
}
catch(const ::Ice::Exception& ex)
{
result->abort(ex);
}
return result;
}
void
IceProxy::baosight::MessageICE::end_TimeNotify(const ::Ice::AsyncResultPtr& result)
{
_end(result, iceC_baosight_MessageICE_TimeNotify_name);
}
/// \cond INTERNAL
::IceProxy::Ice::Object*
IceProxy::baosight::MessageICE::_newInstance() const
{
return new MessageICE;
}
/// \endcond
const ::std::string&
IceProxy::baosight::MessageICE::ice_staticId()
{
return ::baosight::MessageICE::ice_staticId();
}
baosight::MessageICE::~MessageICE()
{
}
/// \cond INTERNAL
::Ice::Object* baosight::upCast(MessageICE* p) { return p; }
/// \endcond
namespace
{
const ::std::string iceC_baosight_MessageICE_ids[2] =
{
"::Ice::Object",
"::baosight::MessageICE"
};
}
bool
baosight::MessageICE::ice_isA(const ::std::string& s, const ::Ice::Current&) const
{
return ::std::binary_search(iceC_baosight_MessageICE_ids, iceC_baosight_MessageICE_ids + 2, s);
}
::std::vector< ::std::string>
baosight::MessageICE::ice_ids(const ::Ice::Current&) const
{
return ::std::vector< ::std::string>(&iceC_baosight_MessageICE_ids[0], &iceC_baosight_MessageICE_ids[2]);
}
const ::std::string&
baosight::MessageICE::ice_id(const ::Ice::Current&) const
{
return ice_staticId();
}
const ::std::string&
baosight::MessageICE::ice_staticId()
{
#ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC
static const ::std::string typeId = "::baosight::MessageICE";
return typeId;
#else
return iceC_baosight_MessageICE_ids[1];
#endif
}
/// \cond INTERNAL
bool
baosight::MessageICE::_iceD_SendDataShort(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
_iceCheckMode(::Ice::Normal, current.mode);
::Ice::InputStream* istr = inS.startReadParams();
::Ice::Int iceP_eventNo;
::Ice::ByteSeq iceP_seq;
::Ice::Int iceP_length;
istr->read(iceP_eventNo);
istr->read(iceP_seq);
istr->read(iceP_length);
inS.endReadParams();
this->SendDataShort(iceP_eventNo, iceP_seq, iceP_length, current);
inS.writeEmptyParams();
return true;
}
/// \endcond
/// \cond INTERNAL
bool
baosight::MessageICE::_iceD_SendDataLong(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
_iceCheckMode(::Ice::Normal, current.mode);
::Ice::InputStream* istr = inS.startReadParams();
::Ice::Int iceP_eventNo;
::Ice::ByteSeq iceP_seq;
::Ice::Int iceP_length;
::std::string iceP_sender;
::std::string iceP_reciver;
::std::string iceP_aditional;
istr->read(iceP_eventNo);
istr->read(iceP_seq);
istr->read(iceP_length);
istr->read(iceP_sender);
istr->read(iceP_reciver);
istr->read(iceP_aditional);
inS.endReadParams();
this->SendDataLong(iceP_eventNo, iceP_seq, iceP_length, iceP_sender, iceP_reciver, iceP_aditional, current);
inS.writeEmptyParams();
return true;
}
/// \endcond
/// \cond INTERNAL
bool
baosight::MessageICE::_iceD_TimeNotify(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
_iceCheckMode(::Ice::Normal, current.mode);
::Ice::InputStream* istr = inS.startReadParams();
::Ice::Int iceP_eventNo;
::Ice::ByteSeq iceP_seq;
istr->read(iceP_eventNo);
istr->read(iceP_seq);
inS.endReadParams();
this->TimeNotify(iceP_eventNo, iceP_seq, current);
inS.writeEmptyParams();
return true;
}
/// \endcond
namespace
{
const ::std::string iceC_baosight_MessageICE_all[] =
{
"SendDataLong",
"SendDataShort",
"TimeNotify",
"ice_id",
"ice_ids",
"ice_isA",
"ice_ping"
};
}
/// \cond INTERNAL
bool
baosight::MessageICE::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
{
::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(iceC_baosight_MessageICE_all, iceC_baosight_MessageICE_all + 7, current.operation);
if(r.first == r.second)
{
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
switch(r.first - iceC_baosight_MessageICE_all)
{
case 0:
{
return _iceD_SendDataLong(in, current);
}
case 1:
{
return _iceD_SendDataShort(in, current);
}
case 2:
{
return _iceD_TimeNotify(in, current);
}
case 3:
{
return _iceD_ice_id(in, current);
}
case 4:
{
return _iceD_ice_ids(in, current);
}
case 5:
{
return _iceD_ice_isA(in, current);
}
case 6:
{
return _iceD_ice_ping(in, current);
}
default:
{
assert(false);
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
}
}
/// \endcond
/// \cond STREAM
void
baosight::MessageICE::_iceWriteImpl(::Ice::OutputStream* ostr) const
{
ostr->startSlice(ice_staticId(), -1, true);
::Ice::StreamWriter< MessageICE, ::Ice::OutputStream>::write(ostr, *this);
ostr->endSlice();
}
void
baosight::MessageICE::_iceReadImpl(::Ice::InputStream* istr)
{
istr->startSlice();
::Ice::StreamReader< MessageICE, ::Ice::InputStream>::read(istr, *this);
istr->endSlice();
}
/// \endcond
/// \cond INTERNAL
void
baosight::_icePatchObjectPtr(MessageICEPtr& handle, const ::Ice::ObjectPtr& v)
{
handle = MessageICEPtr::dynamicCast(v);
if(v && !handle)
{
IceInternal::Ex::throwUOE(MessageICE::ice_staticId(), v);
}
}
/// \endcond
namespace Ice
{
}
#endif