CMake/Source/CPack/cmCPackGeneratorFactory.h

60 lines
1.7 KiB
C
Raw Normal View History

2009-10-02 01:21:28 +04:00
/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc.
2006-01-02 07:21:05 +03:00
2009-10-02 01:21: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-10-02 01:21: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
2007-11-06 00:55:45 +03:00
cmCPackGenerator* NewGenerator(const char* name);
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
void RegisterGenerator(const char* name,
2006-05-03 01:52:22 +04: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
2006-05-03 01:52:22 +04:00
typedef std::map<cmStdString, cmStdString> DescriptionsMap;
const DescriptionsMap& GetGeneratorsList() const
{ return this->GeneratorDescriptions; }
2006-01-02 07:21:05 +03:00
private:
2007-11-06 00:55:45 +03:00
cmCPackGenerator* NewGeneratorInternal(const char* name);
std::vector<cmCPackGenerator*> Generators;
2006-01-02 07:21:05 +03:00
typedef std::map<cmStdString, 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