(param ComponentDefinitionParam, className string, methodName string, NameSpace string)
| 349 | } |
| 350 | |
| 351 | func generatePlainPascalParameter(param ComponentDefinitionParam, className string, methodName string, NameSpace string) ([]pascalParameter, error) { |
| 352 | cParams := make([]pascalParameter, 1) |
| 353 | cParamTypeName, err := getPascalParameterType(param.ParamType, NameSpace, param.ParamClass, true, false) |
| 354 | if err != nil { |
| 355 | return nil, err |
| 356 | } |
| 357 | |
| 358 | switch param.ParamPass { |
| 359 | case "in": |
| 360 | switch param.ParamType { |
| 361 | case "uint8", "uint16", "uint32", "uint64", "int8", "int16", "int32", "int64": |
| 362 | cParams[0].ParamType = cParamTypeName |
| 363 | cParams[0].ParamName = "n" + param.ParamName |
| 364 | cParams[0].ParamComment = fmt.Sprintf("* @param[in] %s - %s", cParams[0].ParamName, param.ParamDescription) |
| 365 | cParams[0].ParamConvention = "const " |
| 366 | cParams[0].ParamTypeNoConvention = cParams[0].ParamType |
| 367 | |
| 368 | case "bool": |
| 369 | cParams[0].ParamType = cParamTypeName |
| 370 | cParams[0].ParamName = "b" + param.ParamName |
| 371 | cParams[0].ParamComment = fmt.Sprintf("* @param[in] %s - %s", cParams[0].ParamName, param.ParamDescription) |
| 372 | cParams[0].ParamConvention = "const " |
| 373 | cParams[0].ParamTypeNoConvention = cParams[0].ParamType |
| 374 | |
| 375 | case "single": |
| 376 | cParams[0].ParamType = cParamTypeName |
| 377 | cParams[0].ParamName = "f" + param.ParamName |
| 378 | cParams[0].ParamComment = fmt.Sprintf("* @param[in] %s - %s", cParams[0].ParamName, param.ParamDescription) |
| 379 | cParams[0].ParamConvention = "const " |
| 380 | cParams[0].ParamTypeNoConvention = cParams[0].ParamType |
| 381 | |
| 382 | case "double": |
| 383 | cParams[0].ParamType = cParamTypeName |
| 384 | cParams[0].ParamName = "d" + param.ParamName |
| 385 | cParams[0].ParamComment = fmt.Sprintf("* @param[in] %s - %s", cParams[0].ParamName, param.ParamDescription) |
| 386 | cParams[0].ParamConvention = "const " |
| 387 | cParams[0].ParamTypeNoConvention = cParams[0].ParamType |
| 388 | |
| 389 | case "pointer": |
| 390 | cParams[0].ParamType = cParamTypeName |
| 391 | cParams[0].ParamName = "p" + param.ParamName |
| 392 | cParams[0].ParamComment = fmt.Sprintf("* @param[in] %s - %s", cParams[0].ParamName, param.ParamDescription) |
| 393 | cParams[0].ParamConvention = "const " |
| 394 | cParams[0].ParamTypeNoConvention = cParams[0].ParamType |
| 395 | |
| 396 | case "string": |
| 397 | cParams[0].ParamType = cParamTypeName |
| 398 | cParams[0].ParamName = "p" + param.ParamName |
| 399 | cParams[0].ParamComment = fmt.Sprintf("* @param[in] %s - %s", cParams[0].ParamName, param.ParamDescription) |
| 400 | cParams[0].ParamConvention = "const " |
| 401 | cParams[0].ParamTypeNoConvention = cParams[0].ParamType |
| 402 | |
| 403 | case "enum": |
| 404 | cParams[0].ParamType = cParamTypeName |
| 405 | cParams[0].ParamName = "e" + param.ParamName |
| 406 | cParams[0].ParamComment = fmt.Sprintf("* @param[in] %s - %s", cParams[0].ParamName, param.ParamDescription) |
| 407 | cParams[0].ParamConvention = "const " |
| 408 | cParams[0].ParamTypeNoConvention = cParams[0].ParamType |
no test coverage detected