Mercurial > projects > qtd
comparison generator/containergenerator.cpp @ 254:34a37904ff77
(none)
author | maxter |
---|---|
date | Sun, 30 Aug 2009 10:59:56 +0000 |
parents | 37eed70de029 |
children | 515d6e1c7b10 49bfc86ff583 |
comparison
equal
deleted
inserted
replaced
253:073b9153ed8a | 254:34a37904ff77 |
---|---|
445 cpp_type = "void*"; | 445 cpp_type = "void*"; |
446 cpp_assign_type = cpp_type + "*"; | 446 cpp_assign_type = cpp_type + "*"; |
447 d_type = cls_name; | 447 d_type = cls_name; |
448 if (centry->designatedInterface()) | 448 if (centry->designatedInterface()) |
449 d_type = centry->designatedInterface()->name(); | 449 d_type = centry->designatedInterface()->name(); |
450 nativeId = ".nativeId"; | 450 nativeId = ".__nativeId"; |
451 } | 451 } |
452 | 452 |
453 if (centry->designatedInterface()) { | 453 if (centry->designatedInterface()) { |
454 type_name = centry->designatedInterface()->name(); | 454 type_name = centry->designatedInterface()->name(); |
455 nativeId = ".__ptr_" + type_name; | 455 nativeId = ".__ptr_" + type_name; |
468 << "private extern(C) void qtd_get_" << cls_name << "_from_array(" << type_name << "* arr, size_t pos, " << cpp_assign_type << " elem)" << endl | 468 << "private extern(C) void qtd_get_" << cls_name << "_from_array(" << type_name << "* arr, size_t pos, " << cpp_assign_type << " elem)" << endl |
469 << "{" << endl | 469 << "{" << endl |
470 << INDENT << "*elem = arr[pos]" << nativeId << ";" << endl | 470 << INDENT << "*elem = arr[pos]" << nativeId << ";" << endl |
471 << "}" << endl << endl | 471 << "}" << endl << endl |
472 | 472 |
473 << "package " << d_type << " qtd_" << cls_name << "_cpp_to_d(" << cpp_type << " __qt_return_value)" << endl | 473 << "package " << d_type << " qtd_" << cls_name << "_cpp_to_d(" << cpp_type << " ret)" << endl |
474 << "{" << endl; | 474 << "{" << endl; |
475 | 475 |
476 marshallFromCppToD(s, centry); | 476 marshallFromCppToD(s, centry); |
477 | 477 |
478 s << "}" << endl; | 478 s << "}" << endl; |