Lines Matching full:method
24 #include "Method.h"
302 const Method* method = tuple.method(); in generateInterfaceHeader() local
306 const bool returnsValue = !method->results().empty(); in generateInterfaceHeader()
307 const NamedReference<Type>* elidedReturn = method->canElideCallback(); in generateInterfaceHeader()
310 DocComment("Return callback for " + method->name(), HIDL_LOCATION_HERE).emit(out); in generateInterfaceHeader()
312 << method->name() in generateInterfaceHeader()
314 method->emitCppResultSignature(out, true /* specify namespaces */); in generateInterfaceHeader()
318 method->emitDocComment(out); in generateInterfaceHeader()
327 out << method->name() in generateInterfaceHeader()
329 method->emitCppArgSignature(out, true /* specify namespaces */); in generateInterfaceHeader()
331 if (method->isHidlReserved()) { in generateInterfaceHeader()
462 void AST::generatePassthroughMethod(Formatter& out, const Method* method, const Interface* superInt… in generatePassthroughMethod() argument
463 method->generateCppSignature(out); in generatePassthroughMethod()
468 if (method->isHidlReserved() in generatePassthroughMethod()
469 && method->overridesCppImpl(IMPL_PASSTHROUGH)) { in generatePassthroughMethod()
470 method->cppImpl(IMPL_PASSTHROUGH, out); in generatePassthroughMethod()
476 const bool returnsValue = !method->results().empty(); in generatePassthroughMethod()
477 const NamedReference<Type>* elidedReturn = method->canElideCallback(); in generatePassthroughMethod()
482 method, in generatePassthroughMethod()
486 for (const auto &arg : method->args()) { in generatePassthroughMethod()
501 if (method->isOneway()) { in generatePassthroughMethod()
515 << method->name() in generatePassthroughMethod()
518 out.join(method->args().begin(), method->args().end(), ", ", [&](const auto &arg) { in generatePassthroughMethod()
533 if (!method->args().empty()) { in generatePassthroughMethod()
537 out.join(method->results().begin(), method->results().end(), ", ", [&](const auto &arg) { in generatePassthroughMethod()
547 method, in generatePassthroughMethod()
551 for (const auto &arg : method->results()) { in generatePassthroughMethod()
586 method, in generatePassthroughMethod()
590 if (method->isOneway()) { in generatePassthroughMethod()
608 const Method *method = tuple.method(); in generateMethods() local
624 gen(method, superInterface); in generateMethods()
707 [&](const Method* method, const Interface*) { in generateStubHeader() argument
708 if (method->isHidlReserved() && method->overridesCppImpl(IMPL_PROXY)) { in generateStubHeader()
712 out << "static ::android::status_t _hidl_" << method->name() << "(\n"; in generateStubHeader()
730 generateMethods(out, [&](const Method* method, const Interface* iface) { in generateStubHeader() argument
731 if (!method->isHidlReserved() || !method->overridesCppImpl(IMPL_STUB_IMPL)) { in generateStubHeader()
734 const bool returnsValue = !method->results().empty(); in generateStubHeader()
735 const NamedReference<Type>* elidedReturn = method->canElideCallback(); in generateStubHeader()
738 out << "using " << method->name() << "_cb = " in generateStubHeader()
740 << "::" << method->name() << "_cb;\n"; in generateStubHeader()
742 method->generateCppSignature(out); in generateStubHeader()
799 [&](const Method* method, const Interface*) { in generateProxyHeader() argument
800 if (method->isHidlReserved() && method->overridesCppImpl(IMPL_PROXY)) { in generateProxyHeader()
805 method->generateCppReturnType(out); in generateProxyHeader()
806 out << " _hidl_" << method->name() << "(" in generateProxyHeader()
810 if (!method->hasEmptyCppArgSignature()) { in generateProxyHeader()
813 method->emitCppArgSignature(out); in generateProxyHeader()
818 generateMethods(out, [&](const Method* method, const Interface*) { in generateProxyHeader() argument
819 method->generateCppSignature(out); in generateProxyHeader()
981 const Method* method, const Interface* superInterface) const { in generateProxyMethodSource() argument
982 method->generateCppSignature(out, in generateProxyMethodSource()
986 if (method->isHidlReserved() && method->overridesCppImpl(IMPL_PROXY)) { in generateProxyMethodSource()
988 method->cppImpl(IMPL_PROXY, out); in generateProxyMethodSource()
994 const bool returnsValue = !method->results().empty(); in generateProxyMethodSource()
995 const NamedReference<Type>* elidedReturn = method->canElideCallback(); in generateProxyMethodSource()
997 method->generateCppReturnType(out); in generateProxyMethodSource()
1004 << method->name() in generateProxyMethodSource()
1007 if (!method->hasEmptyCppArgSignature()) { in generateProxyMethodSource()
1011 out.join(method->args().begin(), method->args().end(), ", ", [&](const auto &arg) { in generateProxyMethodSource()
1016 if (!method->args().empty()) { in generateProxyMethodSource()
1029 … const Method* method, const Interface* superInterface) const { in generateStaticProxyMethodSource() argument
1030 if (method->isHidlReserved() && method->overridesCppImpl(IMPL_PROXY)) { in generateStaticProxyMethodSource()
1034 method->generateCppReturnType(out); in generateStaticProxyMethodSource()
1038 << method->name() in generateStaticProxyMethodSource()
1043 if (!method->hasEmptyCppArgSignature()) { in generateStaticProxyMethodSource()
1047 method->emitCppArgSignature(out); in generateStaticProxyMethodSource()
1059 const bool returnsValue = !method->results().empty(); in generateStaticProxyMethodSource()
1060 const NamedReference<Type>* elidedReturn = method->canElideCallback(); in generateStaticProxyMethodSource()
1066 method, in generateStaticProxyMethodSource()
1077 out, method->results(), true /* forResults */); in generateStaticProxyMethodSource()
1090 for (const auto &arg : method->args()) { in generateStaticProxyMethodSource()
1109 << method->getSerialId() << " /* " << method->name() in generateStaticProxyMethodSource()
1112 if (method->isOneway()) { in generateStaticProxyMethodSource()
1123 out, method->results(), true /* forResults */); in generateStaticProxyMethodSource()
1134 if (!method->isOneway()) { in generateStaticProxyMethodSource()
1146 for (const auto &arg : method->results()) { in generateStaticProxyMethodSource()
1160 … out.join(method->results().begin(), method->results().end(), ", ", [&] (const auto &arg) { in generateStaticProxyMethodSource()
1174 method, in generateStaticProxyMethodSource()
1202 out << method->results().at(0)->type().getCppResultType(); in generateStaticProxyMethodSource()
1250 [&](const Method* method, const Interface* superInterface) { in generateProxySource() argument
1251 generateStaticProxyMethodSource(out, klassName, method, superInterface); in generateProxySource()
1255 generateMethods(out, [&](const Method* method, const Interface* superInterface) { in generateProxySource() argument
1256 generateProxyMethodSource(out, klassName, method, superInterface); in generateProxySource()
1333 [&](const Method* method, const Interface* superInterface) { in generateStubSource() argument
1334 … return generateStaticStubMethodSource(out, iface->fqName(), method, superInterface); in generateStubSource()
1338 generateMethods(out, [&](const Method* method, const Interface*) { in generateStubSource() argument
1339 if (!method->isHidlReserved() || !method->overridesCppImpl(IMPL_STUB_IMPL)) { in generateStubSource()
1342 method->generateCppSignature(out, iface->getStubName()); in generateStubSource()
1345 method->cppImpl(IMPL_STUB_IMPL, out); in generateStubSource()
1367 const Method *method = tuple.method(); in generateStubSource() local
1370 if (!isIBase() && method->isHidlReserved()) { in generateStubSource()
1374 << method->getSerialId() in generateStubSource()
1376 << method->name() in generateStubSource()
1381 generateStubSourceForMethod(out, method, superInterface); in generateStubSource()
1428 void AST::generateStubSourceForMethod(Formatter& out, const Method* method, in generateStubSourceForMethod() argument
1430 if (method->isHidlReserved() && method->overridesCppImpl(IMPL_STUB)) { in generateStubSourceForMethod()
1431 method->cppImpl(IMPL_STUB, out); in generateStubSourceForMethod()
1441 << method->name() in generateStubSourceForMethod()
1447 … const Method* method, const Interface* superInterface) const { in generateStaticStubMethodSource() argument
1448 if (method->isHidlReserved() && method->overridesCppImpl(IMPL_STUB)) { in generateStaticStubMethodSource()
1454 out << "::android::status_t " << klassName << "::_hidl_" << method->name() << "(\n"; in generateStaticStubMethodSource()
1483 declareCppReaderLocals(out, method->args(), false /* forResults */); in generateStaticStubMethodSource()
1485 for (const auto &arg : method->args()) { in generateStaticStubMethodSource()
1499 method, in generateStaticStubMethodSource()
1502 const bool returnsValue = !method->results().empty(); in generateStaticStubMethodSource()
1503 const NamedReference<Type>* elidedReturn = method->canElideCallback(); in generateStaticStubMethodSource()
1507 if (method->isHidlReserved() && method->overridesCppImpl(IMPL_STUB_IMPL)) { in generateStaticStubMethodSource()
1518 << callee << "->" << method->name() in generateStaticStubMethodSource()
1521 out.join(method->args().begin(), method->args().end(), ", ", [&] (const auto &arg) { in generateStaticStubMethodSource()
1548 method, in generateStaticStubMethodSource()
1558 out << "::android::hardware::Return<void> _hidl_ret = " << callee << "->" << method->name() in generateStaticStubMethodSource()
1561 out.join(method->args().begin(), method->args().end(), ", ", [&] (const auto &arg) { in generateStaticStubMethodSource()
1570 if (!method->args().empty()) { in generateStaticStubMethodSource()
1576 … out.join(method->results().begin(), method->results().end(), ", ", [&](const auto &arg) { in generateStaticStubMethodSource()
1585 << method->name() in generateStaticStubMethodSource()
1594 for (const auto &arg : method->results()) { in generateStaticStubMethodSource()
1605 if (!method->results().empty()) { in generateStaticStubMethodSource()
1614 method, in generateStaticStubMethodSource()
1628 method, in generateStaticStubMethodSource()
1638 << method->name() in generateStaticStubMethodSource()
1694 generateMethods(out, [&](const Method* method, const Interface* superInterface) { in generatePassthroughHeader() argument
1695 generatePassthroughMethod(out, method, superInterface); in generatePassthroughHeader()
1725 generateMethods(out, [&](const Method* method, const Interface*) { in generateInterfaceSource() argument
1726 bool reserved = method->isHidlReserved(); in generateInterfaceSource()
1731 method->generateCppSignature(out, iface->definedName()); in generateInterfaceSource()
1734 method->cppImpl(IMPL_INTERFACE, out); in generateInterfaceSource()
1803 const Method *method) const { in generateCppAtraceCall()
1805 std::string baseString = "HIDL::" + iface->definedName() + "::" + method->name(); in generateCppAtraceCall()
1845 const Method *method, in generateCppInstrumentationCall() argument
1847 generateCppAtraceCall(out, event, method); in generateCppInstrumentationCall()
1858 for (const auto &arg : method->args()) { in generateCppInstrumentationCall()
1869 for (const auto &arg : method->results()) { in generateCppInstrumentationCall()
1879 for (const auto &arg : method->args()) { in generateCppInstrumentationCall()
1889 for (const auto &arg : method->results()) { in generateCppInstrumentationCall()
1901 for (const auto &arg : method->args()) { in generateCppInstrumentationCall()
1911 for (const auto &arg : method->results()) { in generateCppInstrumentationCall()
1928 << "\", \"" << method->name() << "\", &_hidl_args);\n"; in generateCppInstrumentationCall()