comparison generator/cppheadergenerator.cpp @ 355:08c1ca7975ab

obviated redundant virtual dispatch callbacks
author Max Samukha <maxter@spambox.com>
date Tue, 25 May 2010 17:23:11 +0300
parents 98b211f3ee34
children
comparison
equal deleted inserted replaced
354:18bd68f586c6 355:08c1ca7975ab
124 124
125 s << "#ifndef " << include_block << endl 125 s << "#ifndef " << include_block << endl
126 << "#define " << include_block << endl << endl 126 << "#define " << include_block << endl << endl
127 // << "#include <qtjambi_core.h>" << endl 127 // << "#include <qtjambi_core.h>" << endl
128 << "#include <QtCore/QHash>" << endl 128 << "#include <QtCore/QHash>" << endl
129 << "#include <QObjectEntity.h>" << endl; 129 << "#include <qtd_core.h>" << endl;
130 130
131 Include inc = java_class->typeEntry()->include(); 131 Include inc = java_class->typeEntry()->include();
132 s << "#include "; 132 s << "#include ";
133 if (inc.type == Include::IncludePath) 133 if (inc.type == Include::IncludePath)
134 s << "<"; 134 s << "<";
176 return ; 176 return ;
177 } 177 }
178 178
179 s << "class " << shellClassName(java_class) 179 s << "class " << shellClassName(java_class)
180 << " : public " << java_class->qualifiedCppName(); 180 << " : public " << java_class->qualifiedCppName();
181 if (java_class->isQObject()) 181 if (java_class->isQObject()) {
182 s << ", public QtD_QObjectEntity"; 182 s << ", public QObjectLink";
183 else if(java_class->hasVirtualFunctions()) 183 }
184 s << ", public QtD_Entity"; 184 else if (java_class->isPolymorphic())
185 s << ", public QtdObjectLink";
185 s << endl << "{" << endl; 186 s << endl << "{" << endl;
186 187
187 if (java_class->isQObject()) { 188 if (java_class->isQObject()) {
188 s << "public:" << endl 189 s << "public:" << endl
189 << " Q_OBJECT_CHECK" << endl 190 << " Q_OBJECT_CHECK" << endl