/drivers/hdf_core/framework/tools/hdi-gen/codegen/ |
D | c_service_driver_code_emitter.cpp | 60 …File::AdapterPath(StringHelper::Format("%s/%s.c", directory_.c_str(), FileName(baseName_ + "Driver… in EmitLowDriverSourceFile() 68 EmitLogTagMacro(sb, FileName(baseName_ + "Driver")); in EmitLowDriverSourceFile() 98 …sb.AppendFormat("static int Hdf%sDriverBind(struct HdfDeviceObject *deviceObject)\n", baseName_.c_… in EmitLowDriverBind() 113 …ormat("static void Hdf%sDriverRelease(struct HdfDeviceObject *deviceObject)\n", baseName_.c_str()); in EmitLowDriverRelease() 132 …File::AdapterPath(StringHelper::Format("%s/%s.c", directory_.c_str(), FileName(baseName_ + "Driver… in EmitDriverSourceFile() 139 EmitLogTagMacro(sb, FileName(baseName_ + "Driver")); in EmitDriverSourceFile() 201 sb.AppendFormat("struct Hdf%sHost {\n", baseName_.c_str()); in EmitDriverServiceDecl() 215 …"static int32_t %sDriverDispatch(struct HdfDeviceIoClient *client, int cmdId,\n", baseName_.c_str(… in EmitKernelDriverDispatch() 218 …sb.Append(TAB).AppendFormat("struct Hdf%sHost *%s = CONTAINER_OF(\n", baseName_.c_str(), hostName_… in EmitKernelDriverDispatch() 220 "client->device->service, struct Hdf%sHost, ioService);\n", baseName_.c_str()); in EmitKernelDriverDispatch() [all …]
|
D | cpp_service_driver_code_emitter.cpp | 43 … StringHelper::Format("%s/%s.cpp", directory_.c_str(), FileName(baseName_ + "Driver").c_str())); in EmitDriverSourceFile() 50 EmitLogTagMacro(sb, FileName(baseName_ + "Driver")); in EmitDriverSourceFile() 95 sb.AppendFormat("struct Hdf%sHost {\n", baseName_.c_str()); in EmitDriverServiceDecl() 103 std::string objName = StringHelper::Format("hdf%sHost", baseName_.c_str()); in EmitDriverDispatch() 104 sb.AppendFormat("static int32_t %sDriverDispatch(", baseName_.c_str()); in EmitDriverDispatch() 109 … sb.AppendFormat("client->device->service, struct Hdf%sHost, ioService);\n\n", baseName_.c_str()); in EmitDriverDispatch() 131 …sb.AppendFormat("static int Hdf%sDriverInit(struct HdfDeviceObject *deviceObject)\n", baseName_.c_… in EmitDriverInit() 140 std::string objName = StringHelper::Format("hdf%sHost", baseName_.c_str()); in EmitDriverBind() 141 …sb.AppendFormat("static int Hdf%sDriverBind(struct HdfDeviceObject *deviceObject)\n", baseName_.c_… in EmitDriverBind() 145 …AB).AppendFormat("auto *%s = new (std::nothrow) Hdf%sHost;\n", objName.c_str(), baseName_.c_str()); in EmitDriverBind() [all …]
|
D | c_service_impl_code_emitter.cpp | 128 sb.AppendFormat("struct %s *%sServiceGet(void)\n", implName_.c_str(), baseName_.c_str()); in EmitLowServiceImplGetMethod() 139 baseName_.c_str(), method->GetName().c_str()); in EmitLowServiceImplGetMethod() 144 baseName_.c_str(), method->GetName().c_str()); in EmitLowServiceImplGetMethod() 153 …File::AdapterPath(StringHelper::Format("%s/%s.h", directory_.c_str(), FileName(baseName_ + "Servic… in EmitServiceImplHeaderFile() 206 sb.AppendFormat("struct %s *%sServiceGet(void);\n\n", instTypeName.c_str(), baseName_.c_str()); in EmitServiceImplExternalMethodsDecl() 207 …sb.AppendFormat("void %sServiceRelease(struct %s *instance);\n", baseName_.c_str(), instTypeName.c… in EmitServiceImplExternalMethodsDecl() 272 sb.AppendFormat("struct %sService {\n", baseName_.c_str()); in EmitKernelServiceImplDef() 273 sb.Append(TAB).AppendFormat("struct %sStub stub;\n\n", baseName_.c_str()); in EmitKernelServiceImplDef() 280 sb.AppendFormat("struct %sService {\n", baseName_.c_str()); in EmitServiceImplDef() 299 sb.Append(prefix).AppendFormat("static int32_t %s%s(struct %s *self)\n", baseName_.c_str(), in EmitServiceImplMethodImpl() [all …]
|
D | code_emitter.cpp | 42 …baseName_ = StringHelper::StartWith(interfaceName_, "I") ? interfaceName_.substr(1) : interfaceNam… in Reset() 43 proxyName_ = baseName_ + "Proxy"; in Reset() 46 stubName_ = baseName_ + "Stub"; in Reset() 49 implName_ = baseName_ + "Service"; in Reset() 52 baseName_ = ast_->GetName(); in Reset() 54 baseName_ = ast_->GetName(); in Reset() 60 …std::string prefix = StringHelper::Format("%c%s", tolower(baseName_[0]), baseName_.substr(1).c_str… in Reset() 81 baseName_ = ""; in CleanData() 143 …return StringHelper::Format("CMD_%s_%s", ConstantName(baseName_).c_str(), ConstantName(method->Get… in EmitMethodCmdID()
|
D | c_client_proxy_code_emitter.cpp | 191 sb.AppendFormat("struct %sProxy {\n", baseName_.c_str()); in EmitProxyDefinition() 205 baseName_.c_str(), interfaceName_.c_str()); in EmitProxyCallMethodImpl() 232 baseName_.c_str(), interfaceName_.c_str()); in EmitProxyKernelCallMethodImpl() 238 baseName_.c_str(), baseName_.c_str(), remoteName.c_str()); in EmitProxyKernelCallMethodImpl() 271 …sb.AppendFormat("static int32_t %sProxy%s(struct %s *self)\n", baseName_.c_str(), method->GetName(… in EmitProxyMethodImpl() 275 … paramStr.AppendFormat("static int32_t %sProxy%s(", baseName_.c_str(), method->GetName().c_str()); in EmitProxyMethodImpl() 455 …sb.AppendFormat("static struct HdfRemoteService *%sProxyAsObject(struct %s *self)\n", baseName_.c_… in EmitProxyAsObjectMethodImpl() 462 …sProxy *proxy = CONTAINER_OF(self, struct %sProxy, impl);\n", baseName_.c_str(), baseName_.c_str()… in EmitProxyAsObjectMethodImpl() 471 …"static void %sProxyConstruct(struct %s *%s)\n", baseName_.c_str(), interfaceName_.c_str(), objNam… in EmitProxyConstruction() 476 baseName_.c_str(), method->GetName().c_str()); in EmitProxyConstruction() [all …]
|
D | cpp_service_impl_code_emitter.cpp | 80 sb.AppendFormat("class %sService : public %s {\n", baseName_.c_str(), in EmitServiceImplDecl() 192 …sb.Append(prefix).AppendFormat("int32_t %sService::%s()\n", baseName_.c_str(), method->GetName().c… in EmitServiceImplMethodImpl() 195 …paramStr.Append(prefix).AppendFormat("int32_t %sService::%s(", baseName_.c_str(), method->GetName(… in EmitServiceImplMethodImpl() 219 … "extern \"C\" %s *%sImplGetInstance(void)\n", interfaceName_.c_str(), baseName_.c_str()); in EmitServiceImplGetMethodImpl()
|
D | c_service_stub_code_emitter.cpp | 94 sb.AppendFormat("struct %sStub {\n", baseName_.c_str()); in EmitCbServiceStubDef() 109 …sb.AppendFormat("bool %sStubConstruct(struct %sStub *stub);\n", baseName_.c_str(), baseName_.c_str… in EmitCbServiceStubMethodsDcl() 537 ….AppendFormat("static struct HdfRemoteService *%sStubAsObject(struct %s *%s)\n", baseName_.c_str(), in EmitStubAsObjectMethodImpl() 546 … "struct %sStub *stub = CONTAINER_OF(%s, struct %sStub, interface);\n", baseName_.c_str(), in EmitStubAsObjectMethodImpl() 547 objName.c_str(), baseName_.c_str()); in EmitStubAsObjectMethodImpl() 560 std::string funcName = StringHelper::Format("%sOnRemoteRequest", baseName_.c_str()); in EmitKernelStubOnRequestMethodImpl() 588 std::string stubTypeName = StringHelper::Format("%sStub", baseName_.c_str()); in EmitKernelStubConstruct() 590 std::string funcName = StringHelper::Format("%sOnRemoteRequest", baseName_.c_str()); in EmitKernelStubConstruct() 608 std::string funcName = StringHelper::Format("%sOnRemoteRequest", baseName_.c_str()); in EmitStubOnRequestMethodImpl() 650 …spatcherName = StringHelper::Format("g_%sDispatcher", StringHelper::StrToLower(baseName_).c_str()); in EmitStubRemoteDispatcher() [all …]
|
D | cpp_custom_types_code_emitter.cpp | 49 …File::AdapterPath(StringHelper::Format("%s/%s.h", directory_.c_str(), FileName(baseName_).c_str())… in EmitPassthroughCustomTypesHeaderFile() 51 …std::string marcoName = StringHelper::Format("%s.%s", ast_->GetPackageName().c_str(), baseName_.c_… in EmitPassthroughCustomTypesHeaderFile() 90 …File::AdapterPath(StringHelper::Format("%s/%s.h", directory_.c_str(), FileName(baseName_).c_str())… in EmitCustomTypesHeaderFile() 92 …std::string marcoName = StringHelper::Format("%s.%s", ast_->GetPackageName().c_str(), baseName_.c_… in EmitCustomTypesHeaderFile() 217 …File::AdapterPath(StringHelper::Format("%s/%s.cpp", directory_.c_str(), FileName(baseName_).c_str(… in EmitCustomTypesSourceFile() 246 headerFiles.emplace(HeaderFileType::OWN_HEADER_FILE, EmitVersionHeaderName(baseName_)); in EmitSourceFileInclusions()
|
D | c_custom_types_code_emitter.cpp | 53 …File::AdapterPath(StringHelper::Format("%s/%s.h", directory_.c_str(), FileName(baseName_).c_str())… in EmitPassthroughCustomTypesHeaderFile() 58 EmitHeadMacro(sb, baseName_); in EmitPassthroughCustomTypesHeaderFile() 67 EmitTailMacro(sb, baseName_); in EmitPassthroughCustomTypesHeaderFile() 90 …File::AdapterPath(StringHelper::Format("%s/%s.h", directory_.c_str(), FileName(baseName_).c_str())… in EmitCustomTypesHeaderFile() 95 EmitHeadMacro(sb, baseName_); in EmitCustomTypesHeaderFile() 111 EmitTailMacro(sb, baseName_); in EmitCustomTypesHeaderFile() 214 …File::AdapterPath(StringHelper::Format("%s/%s.c", directory_.c_str(), FileName(baseName_).c_str())… in EmitCustomTypesSourceFile() 238 headerFiles.emplace(HeaderFileType::OWN_HEADER_FILE, EmitVersionHeaderName(baseName_)); in EmitSoucreInclusions()
|
D | code_emitter.h | 131 std::string baseName_; variable
|
D | cpp_service_stub_code_emitter.cpp | 330 ….AppendFormat("return %sStub%s(data, reply, option);\n", baseName_.c_str(), getVerMethod->GetName(… in EmitStubOnRequestMethodImpl() 336 ….AppendFormat("return %sStub%s(data, reply, option);\n", baseName_.c_str(), method->GetName().c_st… in EmitStubOnRequestMethodImpl()
|
D | cpp_client_proxy_code_emitter.cpp | 52 …File::AdapterPath(StringHelper::Format("%s/%s.h", directory_.c_str(), FileName(baseName_ + "Proxy"… in EmitProxyHeaderFile()
|