Mercurial > projects > qtd
comparison generator/cppimplgenerator.cpp @ 292:19498f420252 signals
more QList goodness
author | eldar |
---|---|
date | Tue, 10 Nov 2009 19:29:42 +0000 |
parents | f9559a957be9 |
children | 8627891e4556 |
comparison
equal
deleted
inserted
replaced
291:0d2094800bdb | 292:19498f420252 |
---|---|
708 | 708 |
709 writeSignalInitialization(s, java_class); | 709 writeSignalInitialization(s, java_class); |
710 */ | 710 */ |
711 // qtd writeJavaLangObjectOverrideFunctions(s, java_class); | 711 // qtd writeJavaLangObjectOverrideFunctions(s, java_class); |
712 | 712 |
713 if (java_class->typeEntry()->isValue()) | |
714 writeValueFunctions(s, java_class); | |
715 | |
713 if (java_class->isQObject()) | 716 if (java_class->isQObject()) |
714 { | 717 { |
715 s << endl << endl | 718 s << endl << endl |
716 << "extern \"C\" DLL_PUBLIC void* qtd_" << java_class->name() << "_staticMetaObject() {" << endl | 719 << "extern \"C\" DLL_PUBLIC void* qtd_" << java_class->name() << "_staticMetaObject() {" << endl |
717 << " return (void*)&" << java_class->name() << "::staticMetaObject;" << endl | 720 << " return (void*)&" << java_class->name() << "::staticMetaObject;" << endl |
719 } | 722 } |
720 | 723 |
721 s << endl << endl; | 724 s << endl << endl; |
722 | 725 |
723 priGenerator->addSource(java_class->package(), fileNameForClass(java_class)); | 726 priGenerator->addSource(java_class->package(), fileNameForClass(java_class)); |
727 } | |
728 | |
729 void CppImplGenerator::writeValueFunctions(QTextStream &s, const AbstractMetaClass *java_class) | |
730 { | |
731 s << QString("extern \"C\" DLL_PUBLIC bool qtd_%1_QTypeInfo_isComplex() { return (bool) QTypeInfo<%1>::isComplex; }\n").arg(java_class->name()); | |
732 s << QString("extern \"C\" DLL_PUBLIC bool qtd_%1_QTypeInfo_isStatic() { return (bool) QTypeInfo<%1>::isStatic; }\n").arg(java_class->name()); | |
733 s << QString("extern \"C\" DLL_PUBLIC bool qtd_%1_QTypeInfo_isLarge() { return (bool) QTypeInfo<%1>::isLarge; }\n").arg(java_class->name()); | |
734 s << QString("extern \"C\" DLL_PUBLIC bool qtd_%1_QTypeInfo_isPointer() { return (bool) QTypeInfo<%1>::isPointer; }\n").arg(java_class->name()); | |
735 s << QString("extern \"C\" DLL_PUBLIC bool qtd_%1_QTypeInfo_isDummy() { return (bool) QTypeInfo<%1>::isDummy; }\n").arg(java_class->name()); | |
724 } | 736 } |
725 | 737 |
726 void CppImplGenerator::writeVirtualDispatchFunction(QTextStream &s, const AbstractMetaFunction *function, bool d_export) | 738 void CppImplGenerator::writeVirtualDispatchFunction(QTextStream &s, const AbstractMetaFunction *function, bool d_export) |
727 { | 739 { |
728 uint options2 = ReturnType | ExternC; | 740 uint options2 = ReturnType | ExternC; |