2006-01-02 07:21:05 +03:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
2006-03-10 21:06:26 +03:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
2006-01-02 07:21:05 +03:00
|
|
|
PURPOSE. See the above copyright notices for more information.
|
|
|
|
|
|
|
|
=========================================================================*/
|
|
|
|
|
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
|
|
|
|
2006-03-09 00:33:39 +03:00
|
|
|
void RegisterGenerator(const char* name,
|
2006-05-03 01:52:22 +04:00
|
|
|
const char* generatorDescription,
|
2006-03-09 00:33:39 +03:00
|
|
|
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
|