cmCPackGenerators.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmCPackGenerators_h
  14. #define cmCPackGenerators_h
  15. #include "cmObject.h"
  16. class cmCPackLog;
  17. class cmCPackGenericGenerator;
  18. /** \class cmCPackGenerators
  19. * \brief A container for CPack generators
  20. *
  21. */
  22. class cmCPackGenerators : public cmObject
  23. {
  24. public:
  25. cmTypeMacro(cmCPackGenerators, cmObject);
  26. cmCPackGenerators();
  27. ~cmCPackGenerators();
  28. //! Get the generator
  29. cmCPackGenericGenerator* NewGenerator(const char* name);
  30. void DeleteGenerator(cmCPackGenericGenerator* gen);
  31. typedef cmCPackGenericGenerator* CreateGeneratorCall();
  32. void RegisterGenerator(const char* name, CreateGeneratorCall* createGenerator);
  33. void SetLogger(cmCPackLog* logger) { m_Logger = logger; }
  34. private:
  35. cmCPackGenericGenerator* NewGeneratorInternal(const char* name);
  36. std::vector<cmCPackGenericGenerator*> m_Generators;
  37. typedef std::map<cmStdString, CreateGeneratorCall*> t_GeneratorCreatorsMap;
  38. t_GeneratorCreatorsMap m_GeneratorCreators;
  39. cmCPackLog* m_Logger;
  40. };
  41. #endif