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

Method commonSetup

java/idl2jni/codegen/im_jni.cpp:410–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408 string sigToCxx, sigToJava, cxx, exporter;
409
410 explicit commonSetup(UTL_ScopedName *name, const char *java = "jobject",
411 bool useVar = false, bool useForAny = false,
412 bool skipDefault = false, bool useCxxRef = true)
413 : hfile(be_global->stub_header_)
414 , cppfile(be_global->stub_impl_)
415 , cxx(idl_mapping_jni::scoped(name) + (useVar ? "_var" : (useForAny ? "_forany" : ""))) {
416 be_global->add_include("idl2jni_jni.h");
417 be_global->add_include("idl2jni_runtime.h");
418 ACE_CString ace_exporter = be_global->stub_export_macro();
419 bool use_exp = ace_exporter != "";
420 exporter = use_exp ? (string(" ") + ace_exporter.c_str()) : "";
421 sigToCxx =
422 "void copyToCxx (JNIEnv *jni, " + cxx + (useCxxRef ? " &" : " ")
423 + "target, " + java + " source)";
424 sigToJava =
425 "void copyToJava (JNIEnv *jni, " + string(java) + " &target, const "
426 + cxx + (useCxxRef ? " &" : " ") + "source, bool createNewObject";
427 hfile <<
428 ace_exporter << (use_exp ? "\n" : "") << sigToCxx << ";\n" <<
429 ace_exporter << (use_exp ? "\n" : "") << sigToJava <<
430 (skipDefault ? "" : " = false") << ");\n";
431 sigToJava += ')';
432 }
433};
434
435bool isPrimitive(AST_Type *element)

Callers

nothing calls this directly

Calls 3

scopedFunction · 0.85
stub_export_macroMethod · 0.80
add_includeMethod · 0.45

Tested by

no test coverage detected