Lines Matching defs:out

36 void AST::generateFetchSymbol(Formatter &out, const std::string& ifaceName) const {
37 out << "HIDL_FETCH_" << ifaceName;
40 void AST::generateStubImplMethod(Formatter& out, const std::string& className,
47 method->generateCppSignature(out, className, false /* specifyNamespaces */);
49 out << " {\n";
51 out.indent();
52 out << "// TODO implement\n";
57 out << "return Void();\n";
59 out << "return "
64 out.unindent();
66 out << "}\n\n";
71 void AST::generateCppImplHeader(Formatter& out) const {
82 out << "#ifndef " << guard << "\n";
83 out << "#define " << guard << "\n\n";
85 generateCppPackageInclude(out, mPackage, iface->localName());
87 out << "#include <hidl/MQDescriptor.h>\n";
88 out << "#include <hidl/Status.h>\n\n";
90 enterLeaveNamespace(out, true /* enter */);
91 out << "namespace implementation {\n\n";
93 out << "using ::android::hardware::hidl_array;\n";
94 out << "using ::android::hardware::hidl_memory;\n";
95 out << "using ::android::hardware::hidl_string;\n";
96 out << "using ::android::hardware::hidl_vec;\n";
97 out << "using ::android::hardware::Return;\n";
98 out << "using ::android::hardware::Void;\n";
99 out << "using ::android::sp;\n";
101 out << "\n";
103 out << "struct "
109 out.indent();
111 generateMethods(out, [&](const Method* method, const Interface*) {
116 method->generateCppSignature(out, "" /* className */,
118 out << " override;\n";
121 out.unindent();
123 out << "};\n\n";
125 out << "// FIXME: most likely delete, this is only for passthrough implementations\n"
129 generateFetchSymbol(out, iface->localName());
130 out << "(const char* name);\n\n";
132 out << "} // namespace implementation\n";
133 enterLeaveNamespace(out, false /* leave */);
135 out << "\n#endif // " << guard << "\n";
138 void AST::generateCppImplSource(Formatter& out) const {
147 out << "#include \"" << baseName << ".h\"\n\n";
149 enterLeaveNamespace(out, true /* enter */);
150 out << "namespace implementation {\n\n";
152 generateMethods(out, [&](const Method* method, const Interface*) {
153 generateStubImplMethod(out, baseName, method);
156 out.setLinePrefix("//");
157 out << iface->localName()
159 generateFetchSymbol(out, iface->localName());
160 out << "(const char* /* name */) {\n";
161 out.indent();
162 out << "return new " << baseName << "();\n";
163 out.unindent();
164 out << "}\n\n";
165 out.unsetLinePrefix();
167 out << "} // namespace implementation\n";
168 enterLeaveNamespace(out, false /* leave */);