2016-09-27 22:01:08 +03:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2007-11-06 00:33:19 +03:00
|
|
|
#ifndef cmCPackGeneratorFactory_h
|
|
|
|
#define cmCPackGeneratorFactory_h
|
2006-01-02 07:21:05 +03:00
|
|
|
|
2016-09-07 01:21:35 +03:00
|
|
|
#include <cmConfigure.h>
|
|
|
|
|
2006-01-02 07:21:05 +03:00
|
|
|
#include "cmObject.h"
|
2016-09-07 01:21:35 +03:00
|
|
|
#include "cmTypeMacro.h"
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2006-01-02 07:21:05 +03:00
|
|
|
|
2007-11-06 00:55:45 +03:00
|
|
|
class cmCPackGenerator;
|
2016-09-07 01:21:35 +03:00
|
|
|
class cmCPackLog;
|
2006-01-02 07:21:05 +03:00
|
|
|
|
2007-11-06 00:33:19 +03:00
|
|
|
/** \class cmCPackGeneratorFactory
|
2006-01-02 07:21:05 +03:00
|
|
|
* \brief A container for CPack generators
|
|
|
|
*
|
|
|
|
*/
|
2007-11-06 00:33:19 +03:00
|
|
|
class cmCPackGeneratorFactory : public cmObject
|
2006-01-02 07:21:05 +03:00
|
|
|
{
|
|
|
|
public:
|
2007-11-06 00:33:19 +03:00
|
|
|
cmTypeMacro(cmCPackGeneratorFactory, cmObject);
|
2006-01-02 07:21:05 +03:00
|
|
|
|
2007-11-06 00:33:19 +03:00
|
|
|
cmCPackGeneratorFactory();
|
2016-06-27 22:25:27 +03:00
|
|
|
~cmCPackGeneratorFactory() CM_OVERRIDE;
|
2006-01-02 07:21:05 +03:00
|
|
|
|
|
|
|
//! Get the generator
|
2014-02-04 06:04:22 +04:00
|
|
|
cmCPackGenerator* NewGenerator(const std::string& name);
|
2007-11-06 00:55:45 +03:00
|
|
|
void DeleteGenerator(cmCPackGenerator* gen);
|
2006-01-02 07:21:05 +03:00
|
|
|
|
2007-11-06 00:55:45 +03:00
|
|
|
typedef cmCPackGenerator* CreateGeneratorCall();
|
2006-01-02 07:21:05 +03:00
|
|
|
|
2014-02-04 06:04:22 +04:00
|
|
|
void RegisterGenerator(const std::string& name,
|
2016-05-16 17:34:04 +03:00
|
|
|
const char* generatorDescription,
|
|
|
|
CreateGeneratorCall* createGenerator);
|
2006-01-02 07:21:05 +03:00
|
|
|
|
2006-03-10 21:06:26 +03:00
|
|
|
void SetLogger(cmCPackLog* logger) { this->Logger = logger; }
|
2006-01-03 00:14:21 +03:00
|
|
|
|
2014-02-10 09:21:34 +04:00
|
|
|
typedef std::map<std::string, std::string> DescriptionsMap;
|
2006-05-03 01:52:22 +04:00
|
|
|
const DescriptionsMap& GetGeneratorsList() const
|
2016-05-16 17:34:04 +03:00
|
|
|
{
|
|
|
|
return this->GeneratorDescriptions;
|
|
|
|
}
|
2006-05-03 01:52:22 +04:00
|
|
|
|
2006-01-02 07:21:05 +03:00
|
|
|
private:
|
2014-02-04 06:04:22 +04:00
|
|
|
cmCPackGenerator* NewGeneratorInternal(const std::string& name);
|
2007-11-06 00:55:45 +03:00
|
|
|
std::vector<cmCPackGenerator*> Generators;
|
2006-01-02 07:21:05 +03:00
|
|
|
|
2014-02-10 09:21:34 +04:00
|
|
|
typedef std::map<std::string, CreateGeneratorCall*> t_GeneratorCreatorsMap;
|
2006-03-10 21:06:26 +03:00
|
|
|
t_GeneratorCreatorsMap GeneratorCreators;
|
2006-05-03 01:52:22 +04:00
|
|
|
DescriptionsMap GeneratorDescriptions;
|
2006-03-10 21:06:26 +03:00
|
|
|
cmCPackLog* Logger;
|
2006-01-02 07:21:05 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|