functionSignatureC method

String functionSignatureC()

Implementation

String functionSignatureC() {
  final sb = StringBuffer();

  if (isExternal) {
    sb.write('extern');
    sb.write(' ');
  }

  if (isStatic) {
    sb.write('static');
    sb.write(' ');
  }

  sb.write(OCReference(returnType).build());
  sb.write(' ');
  sb.write(functionName);
  sb.write('(');

  final paramList = params
      .map((param) => '${OCReference(param.type).build()} ${param.name}');
  sb.write(paramList.join(', '));
  sb.write(')');

  return sb.toString();
}