Mercurial > projects > qtd
comparison generator/dgenerator.cpp @ 39:a5cba313c924
network and webkit are wrapped now
author | eldar |
---|---|
date | Sun, 17 May 2009 01:44:06 +0000 |
parents | 8022ef40f110 |
children | d5a6b6269f44 |
comparison
equal
deleted
inserted
replaced
38:08631ce8e46a | 39:a5cba313c924 |
---|---|
70 << "Qt::HANDLE" << "QChar" << "java.lang.JObjectWrapper" << "void" | 70 << "Qt::HANDLE" << "QChar" << "java.lang.JObjectWrapper" << "void" |
71 << "QLatin1String" << "unsigned long long" << "signed int" | 71 << "QLatin1String" << "unsigned long long" << "signed int" |
72 << "signed short" << "Array" << "GLuint" << "GLenum" << "GLint" | 72 << "signed short" << "Array" << "GLuint" << "GLenum" << "GLint" |
73 << "unsigned long" << "ulong" << "long" << "QByteRef" | 73 << "unsigned long" << "ulong" << "long" << "QByteRef" |
74 << "QStringList" << "QList" << "QVector" << "QPair" | 74 << "QStringList" << "QList" << "QVector" << "QPair" |
75 << "QSet" << "QStringRef"; | 75 << "QSet" << "QStringRef" << "quintptr"; |
76 } | 76 } |
77 | 77 |
78 QString DGenerator::fileNameForClass(const AbstractMetaClass *d_class) const | 78 QString DGenerator::fileNameForClass(const AbstractMetaClass *d_class) const |
79 { | 79 { |
80 return QString("%1.d").arg(d_class->name()); | 80 return QString("%1.d").arg(d_class->name()); |
1829 m_doc_parser = new DocParser(m_doc_directory + "/" + d_class->name().toLower() + ".jdoc"); | 1829 m_doc_parser = new DocParser(m_doc_directory + "/" + d_class->name().toLower() + ".jdoc"); |
1830 } | 1830 } |
1831 if (!m_isRecursive) | 1831 if (!m_isRecursive) |
1832 s << "module " << d_class->package() << "." << d_class->name() <<";" << endl << endl; | 1832 s << "module " << d_class->package() << "." << d_class->name() <<";" << endl << endl; |
1833 | 1833 |
1834 | 1834 /* |
1835 s << "// some type info" << endl; | 1835 s << "// some type info" << endl; |
1836 QString hasVirtuals = d_class->hasVirtualFunctions() ? "has" : "doesn't have"; | 1836 QString hasVirtuals = d_class->hasVirtualFunctions() ? "has" : "doesn't have"; |
1837 QString isFinal = d_class->isFinal() ? "is" : "is not"; | 1837 QString isFinal = d_class->isFinal() ? "is" : "is not"; |
1838 QString isNativeId = d_class->typeEntry()->isNativeIdBased() ? "is" : "is not"; | 1838 QString isNativeId = d_class->typeEntry()->isNativeIdBased() ? "is" : "is not"; |
1839 s << "// " << hasVirtuals << " virtual functions" << endl | 1839 s << "// " << hasVirtuals << " virtual functions" << endl |
1842 << "// " << d_class->generateShellClass() << " shell class" << endl | 1842 << "// " << d_class->generateShellClass() << " shell class" << endl |
1843 << "// " << d_class->hasVirtualFunctions() << endl | 1843 << "// " << d_class->hasVirtualFunctions() << endl |
1844 << "// " << d_class->hasProtectedFunctions() << endl | 1844 << "// " << d_class->hasProtectedFunctions() << endl |
1845 << "// " << d_class->hasFieldAccessors() << endl | 1845 << "// " << d_class->hasFieldAccessors() << endl |
1846 << "// " << d_class->typeEntry()->isObject() << endl; | 1846 << "// " << d_class->typeEntry()->isObject() << endl; |
1847 | 1847 */ |
1848 | 1848 |
1849 const ComplexTypeEntry *ctype = d_class->typeEntry(); | 1849 const ComplexTypeEntry *ctype = d_class->typeEntry(); |
1850 if (!ctype->addedTo.isEmpty() && !m_isRecursive) { | 1850 if (!ctype->addedTo.isEmpty() && !m_isRecursive) { |
1851 ComplexTypeEntry *ctype_parent = TypeDatabase::instance()->findComplexType(ctype->addedTo); | 1851 ComplexTypeEntry *ctype_parent = TypeDatabase::instance()->findComplexType(ctype->addedTo); |
1852 s << "public import " << ctype_parent->javaPackage() << "." << ctype_parent->name() << ";" << endl; | 1852 s << "public import " << ctype_parent->javaPackage() << "." << ctype_parent->name() << ";" << endl; |