From a354f60ce07cd67bd60161824a4e74bf9068fea4 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Wed, 20 Jul 2016 18:28:39 +0200 Subject: Refactor extra generator registration to use factories This will allow additional information about the availability and capabilities of extra generators to be queried without actually creating them. Instead of a static NewFactory() method like the main generator factories have, use a static GetFactory() method to get a pointer to a statically allocated extra generator factory. This simplifies memory management. --- Source/cmExtraEclipseCDT4Generator.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'Source/cmExtraEclipseCDT4Generator.h') diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h index 0400ad5e10..4b585c3fc4 100644 --- a/Source/cmExtraEclipseCDT4Generator.h +++ b/Source/cmExtraEclipseCDT4Generator.h @@ -35,20 +35,8 @@ public: cmExtraEclipseCDT4Generator(); - static cmExternalMakefileProjectGenerator* New() - { - return new cmExtraEclipseCDT4Generator; - } - - std::string GetName() const CM_OVERRIDE - { - return cmExtraEclipseCDT4Generator::GetActualName(); - } - - static std::string GetActualName() { return "Eclipse CDT4"; } + static cmExternalMakefileProjectGeneratorFactory* GetFactory(); - void GetDocumentation(cmDocumentationEntry& entry, - const std::string& fullName) const CM_OVERRIDE; void EnableLanguage(std::vector const& languages, cmMakefile*, bool optional) CM_OVERRIDE; -- cgit v1.2.1