summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackGeneratorFactory.h
diff options
context:
space:
mode:
authorTushar Maheshwari <tushar27192@gmail.com>2019-09-07 08:45:08 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2019-09-17 17:05:26 (GMT)
commitc9c1eb99fe011546b5d9390c7fbbeebfda491c65 (patch)
treea0c691e03d3629e680f09a72685d563c0b82444a /Source/CPack/cmCPackGeneratorFactory.h
parente6ddb57479a3620c712719c120a7337a84470d21 (diff)
downloadCMake-c9c1eb99fe011546b5d9390c7fbbeebfda491c65.zip
CMake-c9c1eb99fe011546b5d9390c7fbbeebfda491c65.tar.gz
CMake-c9c1eb99fe011546b5d9390c7fbbeebfda491c65.tar.bz2
cmCPackGeneratorFactory: rule of zero
Diffstat (limited to 'Source/CPack/cmCPackGeneratorFactory.h')
-rw-r--r--Source/CPack/cmCPackGeneratorFactory.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h
index da2eb8d..62b7484 100644
--- a/Source/CPack/cmCPackGeneratorFactory.h
+++ b/Source/CPack/cmCPackGeneratorFactory.h
@@ -6,8 +6,8 @@
#include "cmConfigure.h" // IWYU pragma: keep
#include <map>
+#include <memory>
#include <string>
-#include <vector>
class cmCPackGenerator;
class cmCPackLog;
@@ -20,14 +20,9 @@ class cmCPackGeneratorFactory
{
public:
cmCPackGeneratorFactory();
- ~cmCPackGeneratorFactory();
-
- cmCPackGeneratorFactory(const cmCPackGeneratorFactory&) = delete;
- cmCPackGeneratorFactory& operator=(const cmCPackGeneratorFactory&) = delete;
//! Get the generator
- cmCPackGenerator* NewGenerator(const std::string& name);
- void DeleteGenerator(cmCPackGenerator* gen);
+ std::unique_ptr<cmCPackGenerator> NewGenerator(const std::string& name);
using CreateGeneratorCall = cmCPackGenerator*();
@@ -44,9 +39,6 @@ public:
}
private:
- cmCPackGenerator* NewGeneratorInternal(const std::string& name);
- std::vector<cmCPackGenerator*> Generators;
-
using t_GeneratorCreatorsMap = std::map<std::string, CreateGeneratorCall*>;
t_GeneratorCreatorsMap GeneratorCreators;
DescriptionsMap GeneratorDescriptions;