diff options
Diffstat (limited to 'Source/CPack/cmCPackGenerator.h')
-rw-r--r-- | Source/CPack/cmCPackGenerator.h | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index 9232ffc..5354fca 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -5,22 +5,22 @@ #include <cmConfigure.h> -#include "cmCPackComponentGroup.h" -#include "cmObject.h" -#include "cmSystemTools.h" -#include "cmTypeMacro.h" - #include <map> #include <sstream> #include <string> #include <vector> +#include "cmCPackComponentGroup.h" +#include "cmSystemTools.h" + +class cmCPackGenerator; class cmCPackLog; class cmInstalledFile; class cmMakefile; #define cmCPackTypeMacro(klass, superclass) \ - cmTypeMacro(klass, superclass); \ + typedef superclass Superclass; \ + const char* GetNameOfClass() CM_OVERRIDE { return #klass; } \ static cmCPackGenerator* CreateGenerator() { return new klass; } \ class cmCPackTypeMacro_UseTrailingSemicolon @@ -30,26 +30,16 @@ class cmMakefile; cmCPackLog_msg << msg; \ this->Logger->Log(logType, __FILE__, __LINE__, \ cmCPackLog_msg.str().c_str()); \ - } while (0) - -#ifdef cerr -#undef cerr -#endif -#define cerr no_cerr_use_cmCPack_Log - -#ifdef cout -#undef cout -#endif -#define cout no_cout_use_cmCPack_Log + } while (false) /** \class cmCPackGenerator * \brief A superclass of all CPack Generators * */ -class cmCPackGenerator : public cmObject +class cmCPackGenerator { public: - cmTypeMacro(cmCPackGenerator, cmObject); + virtual const char* GetNameOfClass() = 0; /** * If verbose then more information is printed out */ @@ -93,7 +83,7 @@ public: * Construct generator */ cmCPackGenerator(); - ~cmCPackGenerator() CM_OVERRIDE; + virtual ~cmCPackGenerator(); //! Set and get the options void SetOption(const std::string& op, const char* value); @@ -102,6 +92,8 @@ public: std::vector<std::string> GetOptions() const; bool IsSet(const std::string& name) const; bool IsOn(const std::string& name) const; + bool IsSetToOff(const std::string& op) const; + bool IsSetToEmpty(const std::string& op) const; //! Set the logger void SetLogger(cmCPackLog* log) { this->Logger = log; } |