summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-04-16 15:36:20 -0300
committerHugo Parente Lima <hugo.lima@openbossa.org>2010-04-22 19:45:25 -0300
commitee42bc70bf41683d99a6862af22a1f4b3e006311 (patch)
tree5cd6b7990862802b2c391eacfb4fe299bbe9dfd6
parentd69b148ea0666e55fa283038287328699eb86bc4 (diff)
downloadshiboken-ee42bc70bf41683d99a6862af22a1f4b3e006311.tar.gz
shiboken-ee42bc70bf41683d99a6862af22a1f4b3e006311.tar.xz
shiboken-ee42bc70bf41683d99a6862af22a1f4b3e006311.zip
Write converters for classes inside namespaces.
-rw-r--r--headergenerator.cpp28
1 files changed, 8 insertions, 20 deletions
diff --git a/headergenerator.cpp b/headergenerator.cpp
index 32c1a06b..9f58f160 100644
--- a/headergenerator.cpp
+++ b/headergenerator.cpp
@@ -270,19 +270,19 @@ void HeaderGenerator::finishGeneration()
}
foreach (AbstractMetaClass* metaClass, classes()) {
- const TypeEntry* classType = metaClass->typeEntry();
- if (!shouldGenerate(metaClass) || metaClass->enclosingClass() ||
- !(classType->isObject() || classType->isValue() || classType->isNamespace()))
+ if (!shouldGenerate(metaClass))
continue;
//Includes
- includes << metaClass->typeEntry()->include();
+ const TypeEntry* classType = metaClass->typeEntry();
+ includes << classType->include();
foreach (const AbstractMetaEnum* cppEnum, metaClass->enums()) {
- includes << cppEnum->typeEntry()->include();
- writeTypeCheckMacro(macrosStream, cppEnum->typeEntry());
- writeTypeConverterDecl(convDecl, cppEnum->typeEntry());
- FlagsTypeEntry* flagsEntry = cppEnum->typeEntry()->flags();
+ EnumTypeEntry* enumType = cppEnum->typeEntry();
+ includes << enumType->include();
+ writeTypeCheckMacro(macrosStream, enumType);
+ writeTypeConverterDecl(convDecl, enumType);
+ FlagsTypeEntry* flagsEntry = enumType->flags();
if (flagsEntry) {
writeTypeCheckMacro(macrosStream, flagsEntry);
writeTypeConverterDecl(convDecl, flagsEntry);
@@ -294,18 +294,6 @@ void HeaderGenerator::finishGeneration()
if (!metaClass->isNamespace()) {
writeSbkTypeFunction(typeFunctions, metaClass);
writeSbkCopyCppObjectFunction(convDecl, metaClass);
-
- foreach (AbstractMetaClass* innerClass, metaClass->innerClasses()) {
- if (shouldGenerate(innerClass)) {
- includes << innerClass->typeEntry()->include();
- writeSbkCopyCppObjectFunction(convDecl, innerClass);
- writeTypeCheckMacro(macrosStream, innerClass->typeEntry());
- writeTypeConverterDecl(convDecl, innerClass->typeEntry());
- writeTypeConverterImpl(convImpl, innerClass->typeEntry());
- convDecl << endl;
- writeSbkTypeFunction(typeFunctions, innerClass);
- }
- }
writeTypeCheckMacro(macrosStream, classType);
writeTypeConverterDecl(convDecl, classType);
writeTypeConverterImpl(convImpl, classType);