Mercurial > projects > qtd
comparison generator/generator.h @ 270:49bfc86ff583
true emit of Qt signals.
author | eldar |
---|---|
date | Thu, 24 Sep 2009 12:59:48 +0000 |
parents | 073b9153ed8a |
children | 9784459f0750 |
comparison
equal
deleted
inserted
replaced
269:cc9080066035 | 270:49bfc86ff583 |
---|---|
158 inline QString signalExternName(const AbstractMetaClass *cls, const AbstractMetaFunction* signal) | 158 inline QString signalExternName(const AbstractMetaClass *cls, const AbstractMetaFunction* signal) |
159 { | 159 { |
160 return "qtd_" + cls->name() + "_" + signal->name(); | 160 return "qtd_" + cls->name() + "_" + signal->name(); |
161 } | 161 } |
162 | 162 |
163 inline QString fromCppContainerName(const AbstractMetaClass *cls, const AbstractMetaType *type) | 163 enum ConversionFunction |
164 { | |
165 FromCpp, | |
166 ToCpp | |
167 }; | |
168 | |
169 inline QString cppContainerConversionName(const AbstractMetaClass *cls, const AbstractMetaType *type, ConversionFunction func) | |
164 { | 170 { |
165 QString package = cls->package().replace(".", "_"); | 171 QString package = cls->package().replace(".", "_"); |
166 const TypeEntry *te = type->instantiations().first()->typeEntry(); | 172 const TypeEntry *te = type->instantiations().first()->typeEntry(); |
167 | 173 |
168 return "qtd_" + package + "_" + te->targetLangName() + "_from_" + type->typeEntry()->qualifiedCppName(); | 174 QString word; |
175 if (func == FromCpp) | |
176 word = "_fromcpp_"; | |
177 else | |
178 word = "_tocpp_"; | |
179 | |
180 return "qtd_" + package + "_" + te->targetLangName() + word + type->typeEntry()->qualifiedCppName(); | |
169 } | 181 } |
170 | 182 |
171 bool notWrappedYet(const AbstractMetaFunction *java_function); | 183 bool notWrappedYet(const AbstractMetaFunction *java_function); |
172 bool isLinearContainer(const ContainerTypeEntry *type); | 184 bool isLinearContainer(const ContainerTypeEntry *type); |
173 AbstractMetaFunctionList signalFunctions(const AbstractMetaClass *cls, bool includeBase = true); | 185 AbstractMetaFunctionList signalFunctions(const AbstractMetaClass *cls, bool includeBase = true); |