2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc.
|
2006-01-02 07:21:05 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2006-01-02 07:21:05 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2006-01-02 07:21:05 +03:00
|
|
|
|
2007-11-06 00:33:19 +03:00
|
|
|
#ifndef cmCPackGeneratorFactory_h
|
|
|
|
#define cmCPackGeneratorFactory_h
|
2006-01-02 07:21:05 +03:00
|
|
|
|
|
|
|
#include "cmObject.h"
|
|
|
|
|
2006-01-03 00:14:21 +03:00
|
|
|
class cmCPackLog;
|
2007-11-06 00:55:45 +03:00
|
|
|
class cmCPackGenerator;
|
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();
|
|
|
|
~cmCPackGeneratorFactory();
|
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
|