Home
last modified time | relevance | path

Searched refs:replaceAll (Results 1 - 25 of 52) sorted by relevance

123

/napi_generator/src/cli/dts2cpp/src/gen/generate/
H A Dfunction_onoff.js15 const { replaceAll } = require('../tools/tool');
174 param.eventName = func.name.replaceAll(prefix, ''); // 去掉注册、注销关键字前缀
182 codeContext.middleFunc = replaceAll(funcOnOffTemplete, '[funcName]', func.name);
185 codeContext.middleH = replaceAll(middleHOnOffTemplate, '[funcName]', func.name);
187 codeContext.middleFunc = codeContext.middleFunc.replaceAll('[getEventName]', getEventName);
190 codeContext.middleH = codeContext.middleH.replaceAll('[static_define]', '');
191 codeContext.middleFunc = codeContext.middleFunc.replaceAll('[middleClassName]', '');
195 codeContext.middleH = codeContext.middleH.replaceAll('[static_define]', 'static ');
196 codeContext.middleFunc = codeContext.middleFunc.replaceAll('[middleClassName]', middleClassName + '::');
199 codeContext.middleFunc = replaceAll(codeContex
[all...]
H A Dfunction_async.js15 const { replaceAll, getPrefix, getConstNum } = require('../tools/tool');
114 middleH = middleH.replaceAll('[static_define]', '');
115 middleFunc = middleFunc.replaceAll('[unwarp_instance]', '');
116 middleFunc = middleFunc.replaceAll('[checkout_async_instance]', '');
117 middleFunc = middleFunc.replaceAll('[middleClassName]', '');
120 middleH = middleH.replaceAll('[static_define]', 'static ');
121 middleFunc = middleFunc.replaceAll('[unwarp_instance]',
123 middleFunc = middleFunc.replaceAll('[checkout_async_instance]',
125 middleFunc = middleFunc.replaceAll('[middleClassName]', className + '_middle' + '::');
130 let middleFunc = replaceAll(funcAsyncTemplet
[all...]
H A Dfunction_sync.js15 const { replaceAll, getPrefix, getConstNum } = require('../tools/tool');
239 middleH = replaceAll(middleH, '[valueOut]', param.valueOut); // # 输出参数定义
241 middleH = replaceAll(middleH, '[valueOut]', '\n ' + param.valueOut); // # 输出参数定义
248 middleFunc = replaceAll(middleFunc, '[valueCheckout]', param.valueCheckout); // # 输入参数解析
251 middleFunc = replaceAll(middleFunc, '[valueCheckout]', param.valueCheckout); // # 输入参数解析
257 let middleFunc = replaceAll(funcSyncTemplete, '[funcName]', func.name);
260 middleH = replaceAll(funcSyncMiddleHTemplete, '[funcName]', func.name);
278 middleH = replaceAll(middleH, '[valueIn]', param.valueIn); // # 输入参数定义
288 middleFunc = middleFunc.replaceAll('[cbRetValJs2C]', callBackReturnProc);
292 middleFunc = middleFunc.replaceAll('[funcRetC2J
[all...]
H A Dfunction_threadsafe.js15 const { replaceAll } = require('../tools/tool');
91 codeContext.middleFunc = replaceAll(threadsafeFuncTemplete, '[funcName]', postFix);
92 codeContext.middleH = replaceAll(middleHTdSafeFuncTemplate, '[funcName]', postFix);
95 codeContext.middleH = codeContext.middleH.replaceAll('[static_define]', '');
96 codeContext.middleFunc = codeContext.middleFunc.replaceAll('[middleClassName]', '');
100 codeContext.middleH = codeContext.middleH.replaceAll('[static_define]', 'static ');
101 codeContext.middleFunc = codeContext.middleFunc.replaceAll('[middleClassName]', middleClassName + '::');
H A Dfunction_direct.js15 const { replaceAll, getPrefix } = require('../tools/tool');
153 addListenerCont = replaceAll(addListenerCont, '[getProNames]', proNamesValues);
162 addListenerCont = replaceAll(addListenerCont, '[RegistOrUnregistFunc]', registOrUnregis);
168 middleFunc = replaceAll(middleFunc, '[optionalParamDestory]', param.optionalParamDestory); // 可选参数内存释放
170 middleFunc = replaceAll(middleFunc, '[optionalParamDestory]', '\n ' + param.optionalParamDestory); // 可选参数内存释放
176 let middleFunc = replaceAll(funcDirectTemplete, '[funcName]', func.name);
179 middleH = replaceAll(funcDirectMiddleHTemplete, '[funcName]', func.name);
188 middleFunc = replaceAll(middleFunc, '[addListener]', addListenerCont);
211 middleFunc = replaceAll(middleFunc, '[valueCheckout]', param.valueCheckout); // # 输入参数解析
214 middleFunc = replaceAll(middleFun
[all...]
/napi_generator/test/unittest/
H A Dgenerate.test.js492 retArrStr = re.replaceAll(retArrStr, "tt[0-9]+", "tt");
493 retArrStr = re.replaceAll(retArrStr, "tnv[0-9]+", "tnv");
494 retArrStr = re.replaceAll(retArrStr, "outLen[0-9]+", "outLen");
495 retArrStr = re.replaceAll(retArrStr, "len[0-9]+", "len");
496 retArrStr = re.replaceAll(retArrStr, "i[0-9]+", "i");
501 retArrStr2 = re.replaceAll(retArrStr2, "tt[0-9]+", "tt");
502 retArrStr2 = re.replaceAll(retArrStr2, "tnv[0-9]+", "tnv");
503 retArrStr2 = re.replaceAll(retArrStr2, "outLen[0-9]+", "outLen");
504 retArrStr2 = re.replaceAll(retArrStr2, "len[0-9]+", "len");
505 retArrStr2 = re.replaceAll(retArrStr
[all...]
H A Dtools.test.js20 const { replaceAll, all } = require(genDir + 'tools/re');
86 it('test gen/tools/re replaceAll', function () {
87 let ret = replaceAll('\n *//([a-zA-Z .]+)\n', '\\.', '\\.');
196 it('test gen/tools/tool replaceAll', function () {
197 param = correctResult.toolsParam.replaceAll;
198 let ret = replaceAll(JSON.stringify(param), '[funcName]', 'if_direct');
199 assert.strictEqual(JSON.stringify(ret), correctResult.tools.replaceAll);
/napi_generator/src/cli/h2hdf/src/
H A Dgenerate.js71 bundlejsonContent = replaceAll(bundlejsonContent, '[driver_name]', rootInfo.driverName);
77 buildgnContent = replaceAll(buildgnContent, '[driver_name]', rootInfo.driverName);
87 logContent = replaceAll(logContent, '[upper_driver_name]', rootInfo.driverName.toUpperCase());
100 driverContent = replaceAll(driverContent, '[driver_name]', rootInfo.driverName);
101 driverContent = replaceAll(driverContent, '[driver_idl_name]', rootInfo.idlFileName);
102 driverContent = replaceAll(driverContent, '[driver_inter_name]', driverInterName);
103 driverContent = replaceAll(driverContent, '[driver_namespace_name]', rootInfo.namespaceName);
110 serviceCppContent = replaceAll(serviceCppContent, '[driver_name]', rootInfo.driverName);
111 serviceCppContent = replaceAll(serviceCppContent, '[driver_idl_name]', rootInfo.idlFileName);
112 serviceCppContent = replaceAll(serviceCppConten
214 function replaceAll(s, sfrom, sto) { global() function
[all...]
/napi_generator/src/cli/h2dtscpp/src/src/napiGen/
H A DfunctionDirect.js89 let funcReturnReplace = replaceAll(funcReturnTemplete, '[return_name]', retObjInfo.objName);
90 funcReturnReplace = replaceAll(funcReturnReplace, '[funcName]', funcNameReplace);
91 funcReturnReplace = replaceAll(funcReturnReplace, '[return_replace]', retGenResult);
92 bodyReplace = replaceAll(bodyReplace, '[func_return_replace]', funcReturnReplace);
94 bodyReplace = replaceAll(bodyReplace, '[func_return_replace]', ' return NULL;\n');
96 bodyReplace = replaceAll(bodyReplace, '[return_replace]', retGenResult);
107 let bodyReplace = replaceAll(bodyTemplete, '[funcName]', funcNameReplace);
113 bodyReplace = replaceAll(bodyReplace, '[get_error_msg_tag]', funcNameReplace);
114 bodyReplace = replaceAll(bodyReplace, '[file_introduce_replace]', hFileName);
115 bodyReplace = replaceAll(bodyReplac
336 function replaceAll(s, sfrom, sto) { global() function
[all...]
H A DfunctionDirectTest.js53 let funcTestContent = replaceAll(abilityTestTemplete, '[func_direct_testCase]', funcTestReplace);
54 funcTestContent = replaceAll(funcTestContent, '[test_case_name]', tsFuncName);
55 funcTestContent = replaceAll(funcTestContent, '[file_introduce_replace]', hFileName);
56 funcTestContent = replaceAll(funcTestContent, '[func_introduce_replace]', funcInfo.name);
57 funcTestContent = replaceAll(funcTestContent, '[input_introduce_replace]', funcInfoParams === '' ? 'void' : funcInfoParams);
58 funcTestContent = replaceAll(funcTestContent, '[output_introduce_replace]', funcInfo.retType);
70 let funcInfoParamReplace = replaceAll(funcInfoParamTemp, '[paramName]', funcInfo.params[i].name);
71 funcInfoParamReplace = replaceAll(funcInfoParamReplace, '[paramType]', funcInfo.params[i].type);
159 function replaceAll(s, sfrom, sto) { function
168 type = type.replaceAll('cons
[all...]
/napi_generator/src/cli/h2sa/src/gen/
H A Dgenerate.js17 const { replaceAll, getTab } = require('../tools/tool');
302 newMarshall.marshallFuncH = replaceAll(
476 let proxyFunc = replaceAll(proxyFuncTemplate, '[className]', className);
477 proxyFunc = replaceAll(proxyFunc, '[funcName]', funcInfo.name);
478 proxyFunc = replaceAll(proxyFunc, '[params]', paramStr);
479 proxyFunc = replaceAll(proxyFunc, '[retType]', funcInfo.retType);
480 proxyFunc = replaceAll(proxyFunc, '[funcEnum]', funcInfo.funcEnum);
490 proxyFunc = replaceAll(proxyFunc, '[writeData]', writeDataStr);
504 proxyFunc = replaceAll(proxyFunc, '[readReply]', readReplyStr);
510 let innerFunc = replaceAll(stubInnerFuncTemplat
[all...]
/napi_generator/src/cli/dts2cpp/src/gen/extend/
H A Dbuild_gn.js54 let gnFile = gnTemplete.replaceAll('[implName]', implName);
55 gnFile = gnFile.replaceAll('[businessCodeCpp]', buildCpp);
56 gnFile = gnFile.replaceAll('[subsystemName]', subsystemName);
57 gnFile = gnFile.replaceAll('[partName]', partName);
/napi_generator/src/cli/h2sa/src/tools/
H A Dtool.js43 String.prototype.replaceAll = function (...args) {
51 function replaceAll(s, sfrom, sto) { function
67 replaceAll,
H A Dre.js18 ss = replaceAll(ss, '\\.', '\\.');
66 function replaceAll(ss, sfrom, sto) { function
82 replaceAll,
/napi_generator/src/cli/dts2ets/appCodeGen/src/analyze/
H A Dinterface.js22 valueType = re.replaceAll(valueType, ' ', '');
28 interfaceBody = re.replaceAll(interfaceBody, ',', ';\n');
60 body = re.replaceAll(body, result[0], ';\n');
69 t = re.replaceAll(t, '\n', '');
H A Dfunction.js25 let body = re.replaceAll(data, '\n', '').split(';'); // # replace(' ', '').
118 values = re.replaceAll(re.replaceAll(values, ' ', ''), '\n', '');
130 values = re.replaceAll(values, typeInterface, interfaceName);
131 interfaceBody = re.replaceAll(interfaceBody, ',', ';');
162 ret = re.replaceAll(re.replaceAll(ret, ' ', ''), '\n', '');
163 ret = re.replaceAll(ret, ',', ';');
181 interfaceBody = re.replaceAll(interfaceBody, ',', ';');
195 ret = ret.replaceAll('numbe
[all...]
/napi_generator/src/cli/dts2cpp/src/gen/
H A Dgenerate.js17 const { replaceAll } = require('./tools/tool');
235 serviceCode: jsonCfg[i].serviceCode.replaceAll('\\n', '\n'),
270 let implCpp = implCppTemplete.replaceAll('[implName]', ns0.name);
280 implCpp = implCpp.replaceAll('[include_configure_hCode]', includeH);
281 implCpp = implCpp.replaceAll('[implCpp_detail]', result.implCpp);
296 let implH = replaceAll(implHTemplete, '[impl_name_upper]', ns0.name.toUpperCase());
297 implH = implH.replaceAll('[numberUsing]', numberUsing);
298 implH = replaceAll(implH, '[implH_detail]', result.implH);
303 implH = replaceAll(implH, '[importTs]', imports);
310 let middleCpp = replaceAll(moduleCppTmplet
[all...]
/napi_generator/src/cli/h2dts/src/tsGen/tools/
H A Dre.js18 ss = replaceAll(ss, '\\.', '\\.');
66 function replaceAll(ss, sfrom, sto) { function
82 replaceAll,
/napi_generator/src/tool/api/api_scan_vs_plugin/src/gen/tools/
H A DVsPluginRe.js18 ss = replaceAll(ss, '\\.', '\\.');
58 function replaceAll(ss, sfrom, sto) { function
67 replaceAll,
/napi_generator/src/cli/dts2cpp/src/gen/analyze/
H A Dfunction.js25 let body = re.replaceAll(data, '\n', '').split(';'); // # replace(' ', '').
120 values = re.replaceAll(re.replaceAll(values, ' ', ''), '\n', '');
132 values = re.replaceAll(values, typeInterface, interfaceName);
133 interfaceBody = re.replaceAll(interfaceBody, ',', ';');
164 ret = re.replaceAll(re.replaceAll(ret, ' ', ''), '\n', '');
165 ret = re.replaceAll(ret, ',', ';');
183 interfaceBody = re.replaceAll(interfaceBody, ',', ';');
197 ret = ret.replaceAll('numbe
[all...]
/napi_generator/src/cli/dts2cpp/src/gen/tools/
H A Dre.js18 ss = replaceAll(ss, '\\.', '\\.');
66 function replaceAll(ss, sfrom, sto) { function
82 replaceAll,
/napi_generator/src/cli/dts2ets/appCodeGen/src/tools/
H A Dre.js18 ss = replaceAll(ss, '\\.', '\\.');
65 function replaceAll(ss, sfrom, sto) { function
81 replaceAll,
/napi_generator/src/cli/h2dtscpp/src/src/tools/
H A Dre.js18 ss = replaceAll(ss, '\\.', '\\.');
66 function replaceAll(ss, sfrom, sto) { function
82 replaceAll,
H A DcommonTemplete.js85 commonH = replaceAll(commonH, '[h_define_replace]', hDefine);
88 commonH = replaceAll(commonH, '[business_include_replace]', businessInclude);
89 commonCpp = replaceAll(commonCpp, '[include_name]', hFileName);
94 function replaceAll(s, sfrom, sto) { function
/napi_generator/src/cli/h2dtscpp/src/src/tsGen/
H A DtsMain.js148 jsType = jsType.replaceAll('const', '');
157 jsType = jsType.replaceAll('*', '').trim();
319 let dtsDeclareContent = replaceAll(dtsDeclare, '[tab_replace]', tab);
320 dtsDeclareContent = replaceAll(dtsDeclareContent, '[export_replace]', funcPrefix);
321 dtsDeclareContent = replaceAll(dtsDeclareContent, '[func_name_replace]', func.genName);
322 dtsDeclareContent = replaceAll(dtsDeclareContent, '[func_param_replace]', funcParams);
323 dtsDeclareContent = replaceAll(dtsDeclareContent, '[input_introduce_replace]', funcParams === '' ? 'void' : funcParams);
324 dtsDeclareContent = replaceAll(dtsDeclareContent, '[func_return_replace]', func.retType);
325 dtsDeclareContent = replaceAll(dtsDeclareContent, '[output_introduce_replace]', func.retType);
326 dtsDeclareContent = replaceAll(dtsDeclareConten
724 function replaceAll(s, sfrom, sto) { global() function
[all...]

Completed in 9 milliseconds

123