summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp274
1 files changed, 0 insertions, 274 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index f3e9549097d..fa645a4f360 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -1957,140 +1957,6 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
H << nl << deprecateSymbol << retS << ' ' << fixKwd(name) << spar << paramsDecl
<< "const ::Ice::Context& __ctx = ::Ice::noExplicitContext" << epar << ";";
- H.zeroIndent();
- H << nl << "#ifdef ICE_CPP11_COMPILER";
- H.restoreIndent();
-
- string retEndArg = getEndArg(ret, p->getMetaData(), "__ret");
-
- //
- // COMPILERFIX VC compilers up to VC110 don't support more than 10 parameters with std::function due to
- // lack of variadic templates.
- //
- if(outDecls.size() > 10 || (outDecls.size() > 9 && !retInS.empty()))
- {
- H.zeroIndent();
- H << nl << "#if !defined(_MSC_VER) || _MSC_VER > 1700";
- H.restoreIndent();
- H << nl << "//";
- H << nl << "// COMPILERFIX VC compilers up to VC110 don't support more than 10 parameters with";
- H << nl << "// std::function due to lack of variadic templates.";
- H << nl << "//";
- }
-
- H << nl << "::Ice::AsyncResultPtr";
- H << nl << "begin_" << name << spar << paramsDeclAMI
- << "const ::IceInternal::Function<void " << spar;
- if(!retInS.empty())
- {
- H << retInS;
- }
- H << outDecls << epar << ">& __response, "
- << "const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = "
- "::IceInternal::Function<void (const ::Ice::Exception&)>(), "
- << "const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>()" << epar;
-
- H << sb;
- if(p->returnsData())
- {
- H << nl << "return begin_" << name << spar << argsAMI << "::Ice::noExplicitContext, __response, __exception, __sent" << epar << ";";
- }
- else
- {
- H << nl << "return __begin_" << name << spar << argsAMI
- << "::Ice::noExplicitContext, new ::IceInternal::Cpp11FnOnewayCallbackNC(__response, __exception, __sent)" << epar << ";";
-
- }
- H << eb;
-
- //
- // COMPILERFIX VC compilers up to VC110 don't support more than 10 parameters with std::function due to
- // lack of variadic templates.
- //
- if(outDecls.size() > 10 || (outDecls.size() > 9 && !retInS.empty()))
- {
- H.zeroIndent();
- H << nl << "#endif";
- H.restoreIndent();
- }
-
- H << nl << "::Ice::AsyncResultPtr";
- H << nl << "begin_" << name << spar << paramsDeclAMI
- << "const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed"
- << "const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = "
- "::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>()" << epar;
- H << sb;
- H << nl << "return __begin_" << name << spar << argsAMI << "::Ice::noExplicitContext, ::Ice::newCallback(__completed, __sent), 0" << epar << ";";
- H << eb;
-
- //
- // COMPILERFIX VC compilers up to VC110 don't support more than 10 parameters with std::function due to
- // lack of variadic templates.
- //
- if(outDecls.size() > 10 || (outDecls.size() > 9 && !retInS.empty()))
- {
- H.zeroIndent();
- H << nl << "#if !defined(_MSC_VER) || _MSC_VER > 1700";
- H.restoreIndent();
- H << nl << "//";
- H << nl << "// COMPILERFIX VC compilers up to VC110 don't support more than 10 parameters with";
- H << nl << "// std::function due to lack of variadic templates.";
- H << nl << "//";
- }
-
- H << nl << "::Ice::AsyncResultPtr";
- H << nl << "begin_" << name << spar << paramsDeclAMI << "const ::Ice::Context& __ctx"
- << "const ::IceInternal::Function<void " << spar;
- if(!retInS.empty())
- {
- H << retInS;
- }
-
- if(p->returnsData())
- {
- H << outDecls << epar << ">&, "
- << "const ::IceInternal::Function<void (const ::Ice::Exception&)>& = "
- << "::IceInternal::Function<void (const ::Ice::Exception&)>(), "
- << "const ::IceInternal::Function<void (bool)>& = ::IceInternal::Function<void (bool)>()"
- << epar << ";";
- }
- else
- {
- H << outDecls << epar << ">& __response, "
- << "const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = "
- << "::IceInternal::Function<void (const ::Ice::Exception&)>(), "
- << "const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>()" << epar;
- H << sb;
- H << nl << "return __begin_" << name << spar << argsAMI
- << "__ctx, new ::IceInternal::Cpp11FnOnewayCallbackNC(__response, __exception, __sent), 0" << epar << ";";
- H << eb;
- }
-
- //
- // COMPILERFIX VC compilers up to VC110 don't support more than 10 parameters with std::function due to
- // lack of variadic templates.
- //
- if(outDecls.size() > 10 || (outDecls.size() > 9 && !retInS.empty()))
- {
- H.zeroIndent();
- H << nl << "#endif";
- H.restoreIndent();
- }
-
- H << nl << "::Ice::AsyncResultPtr";
- H << nl << "begin_" << name << spar << paramsDeclAMI
- << "const ::Ice::Context& __ctx"
- << "const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed"
- << "const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = "
- "::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>()" << epar;
- H << sb;
- H << nl << "return __begin_" << name << spar << argsAMI << "__ctx, ::Ice::newCallback(__completed, __sent)" << epar << ";";
- H << eb;
-
- H.zeroIndent();
- H << nl << "#endif";
- H.restoreIndent();
-
H << sp << nl << "::Ice::AsyncResultPtr begin_" << name << spar << paramsDeclAMI
<< "const ::Ice::Context& __ctx = ::Ice::noExplicitContext" << epar;
H << sb;
@@ -2295,140 +2161,6 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
C << nl << "return __result;";
C << eb;
- if(p->returnsData())
- {
- C << nl << nl << "#ifdef ICE_CPP11_COMPILER";
-
- //
- // COMPILERFIX VC compilers up to VC110 don't support more than 10 parameters with std::function due to
- // lack of variadic templates.
- //
- if(outDecls.size() > 10 || (outDecls.size() > 9 && !retInS.empty()))
- {
-
- C << nl << "#if !defined(_MSC_VER) || _MSC_VER > 1700";
-
- C << nl << "//";
- C << nl << "// COMPILERFIX VC compilers up to VC110 don't support more than 10 parameters with";
- C << nl << "// std::function due to lack of variadic templates.";
- C << nl << "//";
- }
-
- C << sp << nl << "::Ice::AsyncResultPtr" << nl
- << "IceProxy" << scope << "begin_" << name << spar << paramsDeclAMI
- << "const ::Ice::Context& __ctx" << "const ::IceInternal::Function<void " << spar;
-
- if(!retInS.empty())
- {
- C << retInS;
- }
- C << outDecls;
-
- C << epar << ">& __response, "
- << "const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception, "
- << "const ::IceInternal::Function<void (bool)>& __sent" << epar;
-
- C << sb;
- C << nl << "class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC";
- C << sb;
- C.dec();
- C << nl << "public:";
- C.inc();
- C << sp << nl << "Cpp11CB" << spar << "const ::std::function<void " << spar;
- if(!retInS.empty())
- {
- C << retInS;
- }
- C << outDecls;
- C << epar << ">& responseFunc, "
- << "const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, "
- << "const ::std::function<void (bool)>& sentFunc" << epar << " :";
- C.inc();
- C << nl << "::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc),";
- C << nl << "_response(responseFunc)";
- C.dec();
- C << sb;
- C << nl << "CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr);";
- C << eb;
-
- //
- // completed.
- //
- C << sp << nl << "virtual void completed(const ::Ice::AsyncResultPtr& __result) const";
- C << sb;
- C << nl << clScope << clName << "Prx __proxy = " << clScope << clName
- << "Prx::uncheckedCast(__result->getProxy());";
- writeAllocateCode(C, outParams, p, true, _useWstring | TypeContextInParam | TypeContextAMICallPrivateEnd);
- C << nl << "try";
- C << sb;
- C << nl;
- if(!usePrivateEnd(p))
- {
- if(ret)
- {
- C << retEndArg << " = ";
- }
- C << "__proxy->end_" << p->name() << spar << outEndArgs << "__result" << epar << ';';
- }
- else
- {
- C << "__proxy->___end_" << p->name() << spar << outEndArgs;
- if(ret)
- {
- C << retEndArg;
- }
- C << "__result" << epar << ';';
- }
- writeEndCode(C, outParams, p, true);
- C << eb;
- C << nl << "catch(const ::Ice::Exception& ex)";
- C << sb;
- C << nl << "Cpp11FnCallbackNC::exception(__result, ex);";
- C << nl << "return;";
- C << eb;
- C << nl << "if(_response != nullptr)";
- C << sb;
- C << nl << "_response" << spar;
- if(ret)
- {
- C << "__ret";
- }
- C << outParamNamesAMI;
- C << epar << ';';
- C << eb;
- C << eb;
-
- C.dec();
- C << nl << nl << "private:";
- C.inc();
- C << nl;
- C << nl << "::std::function<void " << spar;
-
- if(!retInS.empty())
- {
- C << retInS;
- }
- C << outDecls;
-
- C << epar << "> _response;";
-
- C << eb << ';';
-
- C << nl << "return __begin_" << name << spar << argsAMI << "__ctx"
- << "new Cpp11CB(__response, __exception, __sent)" << epar << ';';
- C << eb;
-
- //
- // COMPILERFIX VC compilers up to VC110 don't support more than 10 parameters with std::function due to
- // lack of variadic templates.
- //
- if(outDecls.size() > 10 || (outDecls.size() > 9 && !retInS.empty()))
- {
- C << nl << "#endif";
- }
- C << nl << "#endif"; // ICE_CPP11_COMPILER
- }
-
C << sp << nl << retS << nl << "IceProxy" << scope << "end_" << name << spar << outParamsDeclAMI
<< "const ::Ice::AsyncResultPtr& __result" << epar;
C << sb;
@@ -3784,12 +3516,6 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
}
}
- H << nl << "// Only supported with C++ 11 support enabled";
- H << nl << "virtual ::Ice::AsyncResultPtr begin_" << name << spar << paramsDeclAMI
- << "const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception"
- << "const ::IceInternal::Function<void (bool)>& sent = ::IceInternal::Function<void (bool)>()"
- << epar << " = 0;";
-
H << sp << nl << "virtual ::Ice::AsyncResultPtr begin_" << name << spar << paramsDeclAMI << epar << " = 0;";
H << sp << nl << "virtual ::Ice::AsyncResultPtr begin_" << name << spar << paramsDeclAMI