Mercurial > projects > qtd
comparison generator/dgenerator.cpp @ 223:0c7abb1e6a9d
windows fix, again
author | eldar |
---|---|
date | Wed, 15 Jul 2009 08:33:42 +0000 |
parents | 438877e90dbe |
children | 7664de4a55e5 |
comparison
equal
deleted
inserted
replaced
222:c9670583880e | 223:0c7abb1e6a9d |
---|---|
2275 << INDENT << "super(native_id, gc_managed);" << endl; | 2275 << INDENT << "super(native_id, gc_managed);" << endl; |
2276 else | 2276 else |
2277 s << "(void* native_id, bool no_real_delete = false) {" << endl | 2277 s << "(void* native_id, bool no_real_delete = false) {" << endl |
2278 << INDENT << "super(native_id, no_real_delete);" << endl; | 2278 << INDENT << "super(native_id, no_real_delete);" << endl; |
2279 } | 2279 } |
2280 | 2280 if (cpp_shared) { |
2281 if (d_class->generateShellClass() && !d_class->isInterface()) | |
2282 s << INDENT << "if (!init_flag_" << d_class->name() << ")" << endl | |
2283 << INDENT << " static_init_" << d_class->name() << "();" << endl << endl; | |
2284 } | |
2281 // customized store-result instances | 2285 // customized store-result instances |
2282 d_funcs = d_class->functionsInTargetLang(); | 2286 d_funcs = d_class->functionsInTargetLang(); |
2283 for (int i=0; i<d_funcs.size(); ++i) { | 2287 for (int i=0; i<d_funcs.size(); ++i) { |
2284 AbstractMetaFunction *d_function = d_funcs.at(i); | 2288 AbstractMetaFunction *d_function = d_funcs.at(i); |
2285 uint included_attributes = 0; | 2289 uint included_attributes = 0; |
2423 s << INDENT << "public class " << d_class->name() << "_ConcreteWrapper : " << d_class->name() << " {" << endl; | 2427 s << INDENT << "public class " << d_class->name() << "_ConcreteWrapper : " << d_class->name() << " {" << endl; |
2424 | 2428 |
2425 { | 2429 { |
2426 Indentation indent(INDENT); | 2430 Indentation indent(INDENT); |
2427 s << INDENT << "public this(void* native_id, bool no_real_delete = true) {" << endl | 2431 s << INDENT << "public this(void* native_id, bool no_real_delete = true) {" << endl |
2428 << INDENT << " super(native_id, no_real_delete);" << endl; | 2432 << INDENT << " super(native_id, no_real_delete);" << endl; |
2429 | 2433 |
2430 | 2434 |
2431 | 2435 |
2432 | 2436 |
2433 /******************!!!DUBLICATE!!!*********************/ | 2437 /******************!!!DUBLICATE!!!*********************/ |
3230 // Write constructor | 3234 // Write constructor |
3231 s << " {" << endl; | 3235 s << " {" << endl; |
3232 { | 3236 { |
3233 Indentation indent(INDENT); | 3237 Indentation indent(INDENT); |
3234 bool shellClass = d_function->ownerClass()->generateShellClass(); | 3238 bool shellClass = d_function->ownerClass()->generateShellClass(); |
3235 if (cpp_shared) { | 3239 |
3236 if (shellClass && !d_function->ownerClass()->isInterface()) | |
3237 s << INDENT << "if (!init_flag_" << d_function->ownerClass()->name() << ")" << endl | |
3238 << INDENT << " static_init_" << d_function->ownerClass()->name() << "();" << endl << endl; | |
3239 } | |
3240 writeJavaCallThroughContents(s, d_function); | 3240 writeJavaCallThroughContents(s, d_function); |
3241 | 3241 |
3242 // Write out expense checks if present... | 3242 // Write out expense checks if present... |
3243 const AbstractMetaClass *d_class = d_function->implementingClass(); | 3243 const AbstractMetaClass *d_class = d_function->implementingClass(); |
3244 const ComplexTypeEntry *te = d_class->typeEntry(); | 3244 const ComplexTypeEntry *te = d_class->typeEntry(); |