diff options
-rw-r--r-- | generator.cpp | 7 | ||||
-rw-r--r-- | generator.h | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/generator.cpp b/generator.cpp index 70f62e6..ee15d2f 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) diff --git a/generator.h b/generator.h index d748397..4c20268 100644 --- a/generator.h +++ b/generator.h @@ -151,7 +151,10 @@ public: /// Returns the generator's name. Used for cosmetic purposes. virtual const char* name() const = 0; - /// Returns true if the generator should generate any code for the AbstractMetaClass + /// Returns true if the generator should generate any code for the TypeEntry. + bool shouldGenerateTypeEntry(const TypeEntry*) const; + + /// Returns true if the generator should generate any code for the AbstractMetaClass. virtual bool shouldGenerate(const AbstractMetaClass *) const; /// Returns the subdirectory used to write the binding code of an AbstractMetaClass. |