// **********************************************************************
|
//
|
// 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
|
//
|
// <auto-generated>
|
//
|
// Generated from file `FaceSearchServer.ice'
|
//
|
// Warning: do not edit this file.
|
//
|
// </auto-generated>
|
//
|
|
#include <FaceSearchServer.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 < 0
|
# error Ice patch level mismatch!
|
# endif
|
#endif
|
|
#ifdef ICE_CPP11_MAPPING // C++11 mapping
|
|
namespace
|
{
|
|
const ::std::string iceC_FaceSearch_FaceFeatureSearchServer_ids[2] =
|
{
|
"::FaceSearch::FaceFeatureSearchServer",
|
"::Ice::Object"
|
};
|
const ::std::string iceC_FaceSearch_FaceFeatureSearchServer_ops[] =
|
{
|
"faceSearchMax",
|
"faceSearchTopN",
|
"ice_id",
|
"ice_ids",
|
"ice_isA",
|
"ice_ping"
|
};
|
const ::std::string iceC_FaceSearch_FaceFeatureSearchServer_faceSearchMax_name = "faceSearchMax";
|
const ::std::string iceC_FaceSearch_FaceFeatureSearchServer_faceSearchTopN_name = "faceSearchTopN";
|
|
}
|
|
bool
|
FaceSearch::FaceFeatureSearchServer::ice_isA(::std::string s, const ::Ice::Current&) const
|
{
|
return ::std::binary_search(iceC_FaceSearch_FaceFeatureSearchServer_ids, iceC_FaceSearch_FaceFeatureSearchServer_ids + 2, s);
|
}
|
|
::std::vector<::std::string>
|
FaceSearch::FaceFeatureSearchServer::ice_ids(const ::Ice::Current&) const
|
{
|
return ::std::vector<::std::string>(&iceC_FaceSearch_FaceFeatureSearchServer_ids[0], &iceC_FaceSearch_FaceFeatureSearchServer_ids[2]);
|
}
|
|
::std::string
|
FaceSearch::FaceFeatureSearchServer::ice_id(const ::Ice::Current&) const
|
{
|
return ice_staticId();
|
}
|
|
const ::std::string&
|
FaceSearch::FaceFeatureSearchServer::ice_staticId()
|
{
|
static const ::std::string typeId = "::FaceSearch::FaceFeatureSearchServer";
|
return typeId;
|
}
|
|
bool
|
FaceSearch::FaceFeatureSearchServer::_iceD_faceSearchMax(::IceInternal::Incoming& inS, const ::Ice::Current& current)
|
{
|
_iceCheckMode(::Ice::OperationMode::Normal, current.mode);
|
auto istr = inS.startReadParams();
|
::FaceSearch::Data iceP_feature;
|
::std::string iceP_info;
|
istr->readAll(iceP_feature, iceP_info);
|
inS.endReadParams();
|
::FaceSearch::FaceResults ret = this->faceSearchMax(::std::move(iceP_feature), ::std::move(iceP_info), current);
|
auto ostr = inS.startWriteParams();
|
ostr->writeAll(ret);
|
inS.endWriteParams();
|
return true;
|
}
|
|
bool
|
FaceSearch::FaceFeatureSearchServer::_iceD_faceSearchTopN(::IceInternal::Incoming& inS, const ::Ice::Current& current)
|
{
|
_iceCheckMode(::Ice::OperationMode::Normal, current.mode);
|
auto istr = inS.startReadParams();
|
::FaceSearch::Data iceP_feature;
|
::std::string iceP_info;
|
int iceP_topN;
|
float iceP_score;
|
istr->readAll(iceP_feature, iceP_info, iceP_topN, iceP_score);
|
inS.endReadParams();
|
::FaceSearch::FaceResults ret = this->faceSearchTopN(::std::move(iceP_feature), ::std::move(iceP_info), iceP_topN, iceP_score, current);
|
auto ostr = inS.startWriteParams();
|
ostr->writeAll(ret);
|
inS.endWriteParams();
|
return true;
|
}
|
|
bool
|
FaceSearch::FaceFeatureSearchServer::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
|
{
|
::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(iceC_FaceSearch_FaceFeatureSearchServer_ops, iceC_FaceSearch_FaceFeatureSearchServer_ops + 6, current.operation);
|
if(r.first == r.second)
|
{
|
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
|
}
|
|
switch(r.first - iceC_FaceSearch_FaceFeatureSearchServer_ops)
|
{
|
case 0:
|
{
|
return _iceD_faceSearchMax(in, current);
|
}
|
case 1:
|
{
|
return _iceD_faceSearchTopN(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
|
FaceSearch::FaceFeatureSearchServerPrx::_iceI_faceSearchMax(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::FaceSearch::FaceResults>>& outAsync, const ::FaceSearch::Data& iceP_feature, const ::std::string& iceP_info, const ::Ice::Context& context)
|
{
|
_checkTwowayOnly(iceC_FaceSearch_FaceFeatureSearchServer_faceSearchMax_name);
|
outAsync->invoke(iceC_FaceSearch_FaceFeatureSearchServer_faceSearchMax_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context,
|
[&](::Ice::OutputStream* ostr)
|
{
|
ostr->writeAll(iceP_feature, iceP_info);
|
},
|
nullptr);
|
}
|
|
void
|
FaceSearch::FaceFeatureSearchServerPrx::_iceI_faceSearchTopN(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::FaceSearch::FaceResults>>& outAsync, const ::FaceSearch::Data& iceP_feature, const ::std::string& iceP_info, int iceP_topN, float iceP_score, const ::Ice::Context& context)
|
{
|
_checkTwowayOnly(iceC_FaceSearch_FaceFeatureSearchServer_faceSearchTopN_name);
|
outAsync->invoke(iceC_FaceSearch_FaceFeatureSearchServer_faceSearchTopN_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context,
|
[&](::Ice::OutputStream* ostr)
|
{
|
ostr->writeAll(iceP_feature, iceP_info, iceP_topN, iceP_score);
|
},
|
nullptr);
|
}
|
|
::std::shared_ptr<::Ice::ObjectPrx>
|
FaceSearch::FaceFeatureSearchServerPrx::_newInstance() const
|
{
|
return ::IceInternal::createProxy<FaceFeatureSearchServerPrx>();
|
}
|
|
const ::std::string&
|
FaceSearch::FaceFeatureSearchServerPrx::ice_staticId()
|
{
|
return FaceSearch::FaceFeatureSearchServer::ice_staticId();
|
}
|
|
namespace Ice
|
{
|
}
|
|
#else // C++98 mapping
|
|
namespace
|
{
|
|
const ::std::string iceC_FaceSearch_FaceFeatureSearchServer_faceSearchMax_name = "faceSearchMax";
|
|
const ::std::string iceC_FaceSearch_FaceFeatureSearchServer_faceSearchTopN_name = "faceSearchTopN";
|
|
}
|
::IceProxy::Ice::Object* ::IceProxy::FaceSearch::upCast(::IceProxy::FaceSearch::FaceFeatureSearchServer* p) { return p; }
|
|
void
|
::IceProxy::FaceSearch::_readProxy(::Ice::InputStream* istr, ::IceInternal::ProxyHandle< ::IceProxy::FaceSearch::FaceFeatureSearchServer>& v)
|
{
|
::Ice::ObjectPrx proxy;
|
istr->read(proxy);
|
if(!proxy)
|
{
|
v = 0;
|
}
|
else
|
{
|
v = new ::IceProxy::FaceSearch::FaceFeatureSearchServer;
|
v->_copyFrom(proxy);
|
}
|
}
|
|
::Ice::AsyncResultPtr
|
IceProxy::FaceSearch::FaceFeatureSearchServer::_iceI_begin_faceSearchMax(const ::FaceSearch::Data& iceP_feature, const ::std::string& iceP_info, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync)
|
{
|
_checkTwowayOnly(iceC_FaceSearch_FaceFeatureSearchServer_faceSearchMax_name, sync);
|
::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_FaceSearch_FaceFeatureSearchServer_faceSearchMax_name, del, cookie, sync);
|
try
|
{
|
result->prepare(iceC_FaceSearch_FaceFeatureSearchServer_faceSearchMax_name, ::Ice::Normal, context);
|
::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat);
|
ostr->write(iceP_feature);
|
ostr->write(iceP_info);
|
result->endWriteParams();
|
result->invoke(iceC_FaceSearch_FaceFeatureSearchServer_faceSearchMax_name);
|
}
|
catch(const ::Ice::Exception& ex)
|
{
|
result->abort(ex);
|
}
|
return result;
|
}
|
|
::FaceSearch::FaceResults
|
IceProxy::FaceSearch::FaceFeatureSearchServer::end_faceSearchMax(const ::Ice::AsyncResultPtr& result)
|
{
|
::Ice::AsyncResult::_check(result, this, iceC_FaceSearch_FaceFeatureSearchServer_faceSearchMax_name);
|
::FaceSearch::FaceResults 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::FaceSearch::FaceFeatureSearchServer::_iceI_begin_faceSearchTopN(const ::FaceSearch::Data& iceP_feature, const ::std::string& iceP_info, ::Ice::Int iceP_topN, ::Ice::Float iceP_score, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync)
|
{
|
_checkTwowayOnly(iceC_FaceSearch_FaceFeatureSearchServer_faceSearchTopN_name, sync);
|
::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_FaceSearch_FaceFeatureSearchServer_faceSearchTopN_name, del, cookie, sync);
|
try
|
{
|
result->prepare(iceC_FaceSearch_FaceFeatureSearchServer_faceSearchTopN_name, ::Ice::Normal, context);
|
::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat);
|
ostr->write(iceP_feature);
|
ostr->write(iceP_info);
|
ostr->write(iceP_topN);
|
ostr->write(iceP_score);
|
result->endWriteParams();
|
result->invoke(iceC_FaceSearch_FaceFeatureSearchServer_faceSearchTopN_name);
|
}
|
catch(const ::Ice::Exception& ex)
|
{
|
result->abort(ex);
|
}
|
return result;
|
}
|
|
::FaceSearch::FaceResults
|
IceProxy::FaceSearch::FaceFeatureSearchServer::end_faceSearchTopN(const ::Ice::AsyncResultPtr& result)
|
{
|
::Ice::AsyncResult::_check(result, this, iceC_FaceSearch_FaceFeatureSearchServer_faceSearchTopN_name);
|
::FaceSearch::FaceResults 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::FaceSearch::FaceFeatureSearchServer::_newInstance() const
|
{
|
return new FaceFeatureSearchServer;
|
}
|
|
const ::std::string&
|
IceProxy::FaceSearch::FaceFeatureSearchServer::ice_staticId()
|
{
|
return ::FaceSearch::FaceFeatureSearchServer::ice_staticId();
|
}
|
|
FaceSearch::FaceFeatureSearchServer::~FaceFeatureSearchServer()
|
{
|
}
|
|
::Ice::Object* FaceSearch::upCast(::FaceSearch::FaceFeatureSearchServer* p) { return p; }
|
|
|
namespace
|
{
|
const ::std::string iceC_FaceSearch_FaceFeatureSearchServer_ids[2] =
|
{
|
"::FaceSearch::FaceFeatureSearchServer",
|
"::Ice::Object"
|
};
|
|
}
|
|
bool
|
FaceSearch::FaceFeatureSearchServer::ice_isA(const ::std::string& s, const ::Ice::Current&) const
|
{
|
return ::std::binary_search(iceC_FaceSearch_FaceFeatureSearchServer_ids, iceC_FaceSearch_FaceFeatureSearchServer_ids + 2, s);
|
}
|
|
::std::vector< ::std::string>
|
FaceSearch::FaceFeatureSearchServer::ice_ids(const ::Ice::Current&) const
|
{
|
return ::std::vector< ::std::string>(&iceC_FaceSearch_FaceFeatureSearchServer_ids[0], &iceC_FaceSearch_FaceFeatureSearchServer_ids[2]);
|
}
|
|
const ::std::string&
|
FaceSearch::FaceFeatureSearchServer::ice_id(const ::Ice::Current&) const
|
{
|
return ice_staticId();
|
}
|
|
const ::std::string&
|
FaceSearch::FaceFeatureSearchServer::ice_staticId()
|
{
|
#ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC
|
static const ::std::string typeId = "::FaceSearch::FaceFeatureSearchServer";
|
return typeId;
|
#else
|
return iceC_FaceSearch_FaceFeatureSearchServer_ids[0];
|
#endif
|
}
|
|
bool
|
FaceSearch::FaceFeatureSearchServer::_iceD_faceSearchMax(::IceInternal::Incoming& inS, const ::Ice::Current& current)
|
{
|
_iceCheckMode(::Ice::Normal, current.mode);
|
::Ice::InputStream* istr = inS.startReadParams();
|
::FaceSearch::Data iceP_feature;
|
::std::string iceP_info;
|
istr->read(iceP_feature);
|
istr->read(iceP_info);
|
inS.endReadParams();
|
::FaceSearch::FaceResults ret = this->faceSearchMax(iceP_feature, iceP_info, current);
|
::Ice::OutputStream* ostr = inS.startWriteParams();
|
ostr->write(ret);
|
inS.endWriteParams();
|
return true;
|
}
|
|
bool
|
FaceSearch::FaceFeatureSearchServer::_iceD_faceSearchTopN(::IceInternal::Incoming& inS, const ::Ice::Current& current)
|
{
|
_iceCheckMode(::Ice::Normal, current.mode);
|
::Ice::InputStream* istr = inS.startReadParams();
|
::FaceSearch::Data iceP_feature;
|
::std::string iceP_info;
|
::Ice::Int iceP_topN;
|
::Ice::Float iceP_score;
|
istr->read(iceP_feature);
|
istr->read(iceP_info);
|
istr->read(iceP_topN);
|
istr->read(iceP_score);
|
inS.endReadParams();
|
::FaceSearch::FaceResults ret = this->faceSearchTopN(iceP_feature, iceP_info, iceP_topN, iceP_score, current);
|
::Ice::OutputStream* ostr = inS.startWriteParams();
|
ostr->write(ret);
|
inS.endWriteParams();
|
return true;
|
}
|
|
namespace
|
{
|
const ::std::string iceC_FaceSearch_FaceFeatureSearchServer_all[] =
|
{
|
"faceSearchMax",
|
"faceSearchTopN",
|
"ice_id",
|
"ice_ids",
|
"ice_isA",
|
"ice_ping"
|
};
|
|
}
|
|
bool
|
FaceSearch::FaceFeatureSearchServer::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
|
{
|
::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(iceC_FaceSearch_FaceFeatureSearchServer_all, iceC_FaceSearch_FaceFeatureSearchServer_all + 6, current.operation);
|
if(r.first == r.second)
|
{
|
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
|
}
|
|
switch(r.first - iceC_FaceSearch_FaceFeatureSearchServer_all)
|
{
|
case 0:
|
{
|
return _iceD_faceSearchMax(in, current);
|
}
|
case 1:
|
{
|
return _iceD_faceSearchTopN(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
|
FaceSearch::FaceFeatureSearchServer::_iceWriteImpl(::Ice::OutputStream* ostr) const
|
{
|
ostr->startSlice(ice_staticId(), -1, true);
|
Ice::StreamWriter< ::FaceSearch::FaceFeatureSearchServer, ::Ice::OutputStream>::write(ostr, *this);
|
ostr->endSlice();
|
}
|
|
void
|
FaceSearch::FaceFeatureSearchServer::_iceReadImpl(::Ice::InputStream* istr)
|
{
|
istr->startSlice();
|
Ice::StreamReader< ::FaceSearch::FaceFeatureSearchServer, ::Ice::InputStream>::read(istr, *this);
|
istr->endSlice();
|
}
|
|
void
|
FaceSearch::_icePatchObjectPtr(FaceFeatureSearchServerPtr& handle, const ::Ice::ObjectPtr& v)
|
{
|
handle = ::FaceSearch::FaceFeatureSearchServerPtr::dynamicCast(v);
|
if(v && !handle)
|
{
|
IceInternal::Ex::throwUOE(::FaceSearch::FaceFeatureSearchServer::ice_staticId(), v);
|
}
|
}
|
|
namespace Ice
|
{
|
}
|
|
#endif
|