// **********************************************************************
//
// Copyright (c) 2003-2017 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.0
//
//
//
// Generated from file `YoloServer.ice'
//
// Warning: do not edit this file.
//
//
//
#include
#include
#include
#include
#include
#include
#include
#include
#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 < 0
# error Ice patch level mismatch!
# endif
#endif
#ifdef ICE_CPP11_MAPPING // C++11 mapping
namespace
{
const ::std::string iceC_YoloDetect_YoloDetectServer_ids[2] =
{
"::Ice::Object",
"::YoloDetect::YoloDetectServer"
};
const ::std::string iceC_YoloDetect_YoloDetectServer_ops[] =
{
"YoloDetect",
"getCocoData",
"ice_id",
"ice_ids",
"ice_isA",
"ice_ping"
};
const ::std::string iceC_YoloDetect_YoloDetectServer_YoloDetect_name = "YoloDetect";
const ::std::string iceC_YoloDetect_YoloDetectServer_getCocoData_name = "getCocoData";
}
bool
YoloDetect::YoloDetectServer::ice_isA(::std::string s, const ::Ice::Current&) const
{
return ::std::binary_search(iceC_YoloDetect_YoloDetectServer_ids, iceC_YoloDetect_YoloDetectServer_ids + 2, s);
}
::std::vector<::std::string>
YoloDetect::YoloDetectServer::ice_ids(const ::Ice::Current&) const
{
return ::std::vector<::std::string>(&iceC_YoloDetect_YoloDetectServer_ids[0], &iceC_YoloDetect_YoloDetectServer_ids[2]);
}
::std::string
YoloDetect::YoloDetectServer::ice_id(const ::Ice::Current&) const
{
return ice_staticId();
}
const ::std::string&
YoloDetect::YoloDetectServer::ice_staticId()
{
static const ::std::string typeId = "::YoloDetect::YoloDetectServer";
return typeId;
}
bool
YoloDetect::YoloDetectServer::_iceD_YoloDetect(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
_iceCheckMode(::Ice::OperationMode::Normal, current.mode);
auto istr = inS.startReadParams();
int iceP_width;
int iceP_height;
::std::string iceP_shareMemory;
istr->readAll(iceP_width, iceP_height, iceP_shareMemory);
inS.endReadParams();
::YoloDetect::ObjInfos ret = this->YoloDetect(iceP_width, iceP_height, ::std::move(iceP_shareMemory), current);
auto ostr = inS.startWriteParams();
ostr->writeAll(ret);
inS.endWriteParams();
return true;
}
bool
YoloDetect::YoloDetectServer::_iceD_getCocoData(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
_iceCheckMode(::Ice::OperationMode::Normal, current.mode);
inS.readEmptyParams();
::YoloDetect::stringData ret = this->getCocoData(current);
auto ostr = inS.startWriteParams();
ostr->writeAll(ret);
inS.endWriteParams();
return true;
}
bool
YoloDetect::YoloDetectServer::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
{
::std::pair r = ::std::equal_range(iceC_YoloDetect_YoloDetectServer_ops, iceC_YoloDetect_YoloDetectServer_ops + 6, current.operation);
if(r.first == r.second)
{
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
switch(r.first - iceC_YoloDetect_YoloDetectServer_ops)
{
case 0:
{
return _iceD_YoloDetect(in, current);
}
case 1:
{
return _iceD_getCocoData(in, current);
}
case 2:
{
return _iceD_ice_id(in, current);
}
case 3:
{
return _iceD_ice_ids(in, current);
}
case 4:
{
return _iceD_ice_isA(in, current);
}
case 5:
{
return _iceD_ice_ping(in, current);
}
default:
{
assert(false);
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
}
}
void
YoloDetect::YoloDetectServerPrx::_iceI_YoloDetect(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::YoloDetect::ObjInfos>>& outAsync, int iceP_width, int iceP_height, const ::std::string& iceP_shareMemory, const ::Ice::Context& context)
{
_checkTwowayOnly(iceC_YoloDetect_YoloDetectServer_YoloDetect_name);
outAsync->invoke(iceC_YoloDetect_YoloDetectServer_YoloDetect_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context,
[&](::Ice::OutputStream* ostr)
{
ostr->writeAll(iceP_width, iceP_height, iceP_shareMemory);
},
nullptr);
}
void
YoloDetect::YoloDetectServerPrx::_iceI_getCocoData(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::YoloDetect::stringData>>& outAsync, const ::Ice::Context& context)
{
_checkTwowayOnly(iceC_YoloDetect_YoloDetectServer_getCocoData_name);
outAsync->invoke(iceC_YoloDetect_YoloDetectServer_getCocoData_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context,
nullptr,
nullptr);
}
::std::shared_ptr<::Ice::ObjectPrx>
YoloDetect::YoloDetectServerPrx::_newInstance() const
{
return ::IceInternal::createProxy();
}
const ::std::string&
YoloDetect::YoloDetectServerPrx::ice_staticId()
{
return YoloDetect::YoloDetectServer::ice_staticId();
}
namespace Ice
{
}
#else // C++98 mapping
namespace
{
const ::std::string iceC_YoloDetect_YoloDetectServer_YoloDetect_name = "YoloDetect";
const ::std::string iceC_YoloDetect_YoloDetectServer_getCocoData_name = "getCocoData";
}
::IceProxy::Ice::Object* ::IceProxy::YoloDetect::upCast(::IceProxy::YoloDetect::YoloDetectServer* p) { return p; }
void
::IceProxy::YoloDetect::_readProxy(::Ice::InputStream* istr, ::IceInternal::ProxyHandle< ::IceProxy::YoloDetect::YoloDetectServer>& v)
{
::Ice::ObjectPrx proxy;
istr->read(proxy);
if(!proxy)
{
v = 0;
}
else
{
v = new ::IceProxy::YoloDetect::YoloDetectServer;
v->_copyFrom(proxy);
}
}
::Ice::AsyncResultPtr
IceProxy::YoloDetect::YoloDetectServer::_iceI_begin_YoloDetect(::Ice::Int iceP_width, ::Ice::Int iceP_height, const ::std::string& iceP_shareMemory, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync)
{
_checkTwowayOnly(iceC_YoloDetect_YoloDetectServer_YoloDetect_name, sync);
::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_YoloDetect_YoloDetectServer_YoloDetect_name, del, cookie, sync);
try
{
result->prepare(iceC_YoloDetect_YoloDetectServer_YoloDetect_name, ::Ice::Normal, context);
::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat);
ostr->write(iceP_width);
ostr->write(iceP_height);
ostr->write(iceP_shareMemory);
result->endWriteParams();
result->invoke(iceC_YoloDetect_YoloDetectServer_YoloDetect_name);
}
catch(const ::Ice::Exception& ex)
{
result->abort(ex);
}
return result;
}
::YoloDetect::ObjInfos
IceProxy::YoloDetect::YoloDetectServer::end_YoloDetect(const ::Ice::AsyncResultPtr& result)
{
::Ice::AsyncResult::_check(result, this, iceC_YoloDetect_YoloDetectServer_YoloDetect_name);
::YoloDetect::ObjInfos ret;
if(!result->_waitForResponse())
{
try
{
result->_throwUserException();
}
catch(const ::Ice::UserException& ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id());
}
}
::Ice::InputStream* istr = result->_startReadParams();
istr->read(ret);
result->_endReadParams();
return ret;
}
::Ice::AsyncResultPtr
IceProxy::YoloDetect::YoloDetectServer::_iceI_begin_getCocoData(const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync)
{
_checkTwowayOnly(iceC_YoloDetect_YoloDetectServer_getCocoData_name, sync);
::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_YoloDetect_YoloDetectServer_getCocoData_name, del, cookie, sync);
try
{
result->prepare(iceC_YoloDetect_YoloDetectServer_getCocoData_name, ::Ice::Normal, context);
result->writeEmptyParams();
result->invoke(iceC_YoloDetect_YoloDetectServer_getCocoData_name);
}
catch(const ::Ice::Exception& ex)
{
result->abort(ex);
}
return result;
}
::YoloDetect::stringData
IceProxy::YoloDetect::YoloDetectServer::end_getCocoData(const ::Ice::AsyncResultPtr& result)
{
::Ice::AsyncResult::_check(result, this, iceC_YoloDetect_YoloDetectServer_getCocoData_name);
::YoloDetect::stringData ret;
if(!result->_waitForResponse())
{
try
{
result->_throwUserException();
}
catch(const ::Ice::UserException& ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id());
}
}
::Ice::InputStream* istr = result->_startReadParams();
istr->read(ret);
result->_endReadParams();
return ret;
}
::IceProxy::Ice::Object*
IceProxy::YoloDetect::YoloDetectServer::_newInstance() const
{
return new YoloDetectServer;
}
const ::std::string&
IceProxy::YoloDetect::YoloDetectServer::ice_staticId()
{
return ::YoloDetect::YoloDetectServer::ice_staticId();
}
YoloDetect::YoloDetectServer::~YoloDetectServer()
{
}
::Ice::Object* YoloDetect::upCast(::YoloDetect::YoloDetectServer* p) { return p; }
namespace
{
const ::std::string iceC_YoloDetect_YoloDetectServer_ids[2] =
{
"::Ice::Object",
"::YoloDetect::YoloDetectServer"
};
}
bool
YoloDetect::YoloDetectServer::ice_isA(const ::std::string& s, const ::Ice::Current&) const
{
return ::std::binary_search(iceC_YoloDetect_YoloDetectServer_ids, iceC_YoloDetect_YoloDetectServer_ids + 2, s);
}
::std::vector< ::std::string>
YoloDetect::YoloDetectServer::ice_ids(const ::Ice::Current&) const
{
return ::std::vector< ::std::string>(&iceC_YoloDetect_YoloDetectServer_ids[0], &iceC_YoloDetect_YoloDetectServer_ids[2]);
}
const ::std::string&
YoloDetect::YoloDetectServer::ice_id(const ::Ice::Current&) const
{
return ice_staticId();
}
const ::std::string&
YoloDetect::YoloDetectServer::ice_staticId()
{
#ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC
static const ::std::string typeId = "::YoloDetect::YoloDetectServer";
return typeId;
#else
return iceC_YoloDetect_YoloDetectServer_ids[1];
#endif
}
bool
YoloDetect::YoloDetectServer::_iceD_YoloDetect(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
_iceCheckMode(::Ice::Normal, current.mode);
::Ice::InputStream* istr = inS.startReadParams();
::Ice::Int iceP_width;
::Ice::Int iceP_height;
::std::string iceP_shareMemory;
istr->read(iceP_width);
istr->read(iceP_height);
istr->read(iceP_shareMemory);
inS.endReadParams();
::YoloDetect::ObjInfos ret = this->YoloDetect(iceP_width, iceP_height, iceP_shareMemory, current);
::Ice::OutputStream* ostr = inS.startWriteParams();
ostr->write(ret);
inS.endWriteParams();
return true;
}
bool
YoloDetect::YoloDetectServer::_iceD_getCocoData(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
_iceCheckMode(::Ice::Normal, current.mode);
inS.readEmptyParams();
::YoloDetect::stringData ret = this->getCocoData(current);
::Ice::OutputStream* ostr = inS.startWriteParams();
ostr->write(ret);
inS.endWriteParams();
return true;
}
namespace
{
const ::std::string iceC_YoloDetect_YoloDetectServer_all[] =
{
"YoloDetect",
"getCocoData",
"ice_id",
"ice_ids",
"ice_isA",
"ice_ping"
};
}
bool
YoloDetect::YoloDetectServer::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
{
::std::pair r = ::std::equal_range(iceC_YoloDetect_YoloDetectServer_all, iceC_YoloDetect_YoloDetectServer_all + 6, current.operation);
if(r.first == r.second)
{
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
switch(r.first - iceC_YoloDetect_YoloDetectServer_all)
{
case 0:
{
return _iceD_YoloDetect(in, current);
}
case 1:
{
return _iceD_getCocoData(in, current);
}
case 2:
{
return _iceD_ice_id(in, current);
}
case 3:
{
return _iceD_ice_ids(in, current);
}
case 4:
{
return _iceD_ice_isA(in, current);
}
case 5:
{
return _iceD_ice_ping(in, current);
}
default:
{
assert(false);
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
}
}
void
YoloDetect::YoloDetectServer::_iceWriteImpl(::Ice::OutputStream* ostr) const
{
ostr->startSlice(ice_staticId(), -1, true);
Ice::StreamWriter< ::YoloDetect::YoloDetectServer, ::Ice::OutputStream>::write(ostr, *this);
ostr->endSlice();
}
void
YoloDetect::YoloDetectServer::_iceReadImpl(::Ice::InputStream* istr)
{
istr->startSlice();
Ice::StreamReader< ::YoloDetect::YoloDetectServer, ::Ice::InputStream>::read(istr, *this);
istr->endSlice();
}
void
YoloDetect::_icePatchObjectPtr(YoloDetectServerPtr& handle, const ::Ice::ObjectPtr& v)
{
handle = ::YoloDetect::YoloDetectServerPtr::dynamicCast(v);
if(v && !handle)
{
IceInternal::Ex::throwUOE(::YoloDetect::YoloDetectServer::ice_staticId(), v);
}
}
namespace Ice
{
}
#endif