summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackGeneratorFactory.h
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-11-05 21:33:19 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-11-05 21:33:19 (GMT)
commit62decc533b03966c7584fae9b53f4e888bb711bf (patch)
tree343a25e182fa39c47a4f84acf07d826c6504f85e /Source/CPack/cmCPackGeneratorFactory.h
parenta65193857293f065139bc991488d0cef9a199c16 (diff)
downloadCMake-62decc533b03966c7584fae9b53f4e888bb711bf.zip
CMake-62decc533b03966c7584fae9b53f4e888bb711bf.tar.gz
CMake-62decc533b03966c7584fae9b53f4e888bb711bf.tar.bz2
ENH: change name of class
Diffstat (limited to 'Source/CPack/cmCPackGeneratorFactory.h')
-rw-r--r--Source/CPack/cmCPackGeneratorFactory.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h
new file mode 100644
index 0000000..4dcc55e
--- /dev/null
+++ b/Source/CPack/cmCPackGeneratorFactory.h
@@ -0,0 +1,64 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+
+#ifndef cmCPackGeneratorFactory_h
+#define cmCPackGeneratorFactory_h
+
+#include "cmObject.h"
+
+class cmCPackLog;
+class cmCPackGenericGenerator;
+
+/** \class cmCPackGeneratorFactory
+ * \brief A container for CPack generators
+ *
+ */
+class cmCPackGeneratorFactory : public cmObject
+{
+public:
+ cmTypeMacro(cmCPackGeneratorFactory, cmObject);
+
+ cmCPackGeneratorFactory();
+ ~cmCPackGeneratorFactory();
+
+ //! Get the generator
+ cmCPackGenericGenerator* NewGenerator(const char* name);
+ void DeleteGenerator(cmCPackGenericGenerator* gen);
+
+ typedef cmCPackGenericGenerator* CreateGeneratorCall();
+
+ void RegisterGenerator(const char* name,
+ const char* generatorDescription,
+ CreateGeneratorCall* createGenerator);
+
+ void SetLogger(cmCPackLog* logger) { this->Logger = logger; }
+
+ typedef std::map<cmStdString, cmStdString> DescriptionsMap;
+ const DescriptionsMap& GetGeneratorsList() const
+ { return this->GeneratorDescriptions; }
+
+private:
+ cmCPackGenericGenerator* NewGeneratorInternal(const char* name);
+ std::vector<cmCPackGenericGenerator*> Generators;
+
+ typedef std::map<cmStdString, CreateGeneratorCall*> t_GeneratorCreatorsMap;
+ t_GeneratorCreatorsMap GeneratorCreators;
+ DescriptionsMap GeneratorDescriptions;
+ cmCPackLog* Logger;
+};
+
+#endif