Mercurial > projects > qtd
diff generator/cppimplgenerator.cpp @ 292:19498f420252 signals
more QList goodness
author | eldar |
---|---|
date | Tue, 10 Nov 2009 19:29:42 +0000 |
parents | f9559a957be9 |
children | 8627891e4556 |
line wrap: on
line diff
--- a/generator/cppimplgenerator.cpp Mon Nov 09 20:49:26 2009 +0000 +++ b/generator/cppimplgenerator.cpp Tue Nov 10 19:29:42 2009 +0000 @@ -710,6 +710,9 @@ */ // qtd writeJavaLangObjectOverrideFunctions(s, java_class); + if (java_class->typeEntry()->isValue()) + writeValueFunctions(s, java_class); + if (java_class->isQObject()) { s << endl << endl @@ -723,6 +726,15 @@ priGenerator->addSource(java_class->package(), fileNameForClass(java_class)); } +void CppImplGenerator::writeValueFunctions(QTextStream &s, const AbstractMetaClass *java_class) +{ + s << QString("extern \"C\" DLL_PUBLIC bool qtd_%1_QTypeInfo_isComplex() { return (bool) QTypeInfo<%1>::isComplex; }\n").arg(java_class->name()); + s << QString("extern \"C\" DLL_PUBLIC bool qtd_%1_QTypeInfo_isStatic() { return (bool) QTypeInfo<%1>::isStatic; }\n").arg(java_class->name()); + s << QString("extern \"C\" DLL_PUBLIC bool qtd_%1_QTypeInfo_isLarge() { return (bool) QTypeInfo<%1>::isLarge; }\n").arg(java_class->name()); + s << QString("extern \"C\" DLL_PUBLIC bool qtd_%1_QTypeInfo_isPointer() { return (bool) QTypeInfo<%1>::isPointer; }\n").arg(java_class->name()); + s << QString("extern \"C\" DLL_PUBLIC bool qtd_%1_QTypeInfo_isDummy() { return (bool) QTypeInfo<%1>::isDummy; }\n").arg(java_class->name()); +} + void CppImplGenerator::writeVirtualDispatchFunction(QTextStream &s, const AbstractMetaFunction *function, bool d_export) { uint options2 = ReturnType | ExternC;