aboutsummaryrefslogtreecommitdiffstats
path: root/generator.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-08-11 16:05:41 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-08-18 19:20:46 -0300
commit18a1658d6f5bcdbd118aa2649dcba56e61553c0f (patch)
tree15274001b20355ac84dbba79633e0305f9fc91d4 /generator.cpp
parentcb5be10109fc64d2e77f064164cac4da0d3d8396 (diff)
Added a method to check if a TypeEntry should be generated or not.
Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'generator.cpp')
-rw-r--r--generator.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/generator.cpp b/generator.cpp
index 70f62e658..ee15d2fe7 100644
--- a/generator.cpp
+++ b/generator.cpp
@@ -193,9 +193,14 @@ void Generator::generate()
finishGeneration();
}
+bool Generator::shouldGenerateTypeEntry(const TypeEntry* type) const
+{
+ return type->codeGeneration() & TypeEntry::GenerateTargetLang;
+}
+
bool Generator::shouldGenerate(const AbstractMetaClass* metaClass) const
{
- return metaClass->typeEntry()->codeGeneration() & TypeEntry::GenerateTargetLang;
+ return shouldGenerateTypeEntry(metaClass->typeEntry());
}
void verifyDirectoryFor(const QFile &file)