MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / op_signature

Function op_signature

java/idl2jni/codegen/im_java.cpp:679–704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677}
678
679string op_signature(AST_Operation *op)
680{
681 string signature =
682 (op->void_return_type() ? "void"
683 : idl_mapping_java::type(op->return_type()))
684 + " " + op->local_name()->get_string() + "(";
685 UTL_ScopeActiveIterator it(op, UTL_Scope::IK_decls);
686 bool noArgs = true;
687
688 for (; !it.is_done(); it.next()) {
689 noArgs = false;
690 AST_Decl *item = it.item();
691
692 if (item->node_type() == AST_Decl::NT_argument) {
693 AST_Argument *arg = dynamic_cast<AST_Argument*>(item);
694 signature += param_type(arg->field_type(), arg->direction())
695 + " " + arg->local_name()->get_string() + ", ";
696 }
697 }
698
699 if (noArgs) signature += ")";
700
701 else signature.replace(signature.size() - 2, 2, ")");
702
703 return signature;
704}
705}
706
707bool idl_mapping_java::gen_interf(UTL_ScopedName *name, bool local,

Callers 1

gen_interfMethod · 0.85

Calls 6

param_typeFunction · 0.85
itemMethod · 0.80
get_stringMethod · 0.45
nextMethod · 0.45
replaceMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected