comparison generator/containergenerator.cpp @ 252:37eed70de029

More things broken than fixed. Rolling back to 263
author maxter
date Sat, 22 Aug 2009 12:50:58 +0000
parents 7664de4a55e5
children 34a37904ff77
comparison
equal deleted inserted replaced
251:739d0ee5bd91 252:37eed70de029
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 << " ret)" << endl 473 << "package " << d_type << " qtd_" << cls_name << "_cpp_to_d(" << cpp_type << " __qt_return_value)" << endl
474 << "{" << endl; 474 << "{" << endl;
475 475
476 marshallFromCppToD(s, centry); 476 marshallFromCppToD(s, centry);
477 477
478 s << "}" << endl; 478 s << "}" << endl;