/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying1file LICENSE.rst or https://cmake.org/licensing for details. */2#pragma once34#include "cmConfigure.h" // IWYU pragma: keep56#include <map>7#include <string>89#include "cmValue.h"1011class cmCPackIFWGenerator;12class cmXMLWriter;1314/** \class cmCPackIFWCommon15* \brief A base class for CPack IFW generator implementation subclasses16*/17class cmCPackIFWCommon18{19public:20// Constructor2122/**23* Construct Part24*/25cmCPackIFWCommon();2627public:28// Internal implementation2930cmValue GetOption(std::string const& op) const;31bool IsOn(std::string const& op) const;32bool IsSetToOff(std::string const& op) const;33bool IsSetToEmpty(std::string const& op) const;3435/**36* Compare \a version with QtIFW framework version37*/38bool IsVersionLess(char const* version) const;3940/**41* Compare \a version with QtIFW framework version42*/43bool IsVersionGreater(char const* version) const;4445/**46* Compare \a version with QtIFW framework version47*/48bool IsVersionEqual(char const* version) const;4950/** Expand the list argument containing the map of the key-value pairs.51* If the number of elements is odd, then the first value is used as the52* default value with an empty key.53* Any values with the same keys will be permanently overwritten.54*/55static void ExpandListArgument(std::string const& arg,56std::map<std::string, std::string>& argsOut);5758/** Expand the list argument containing the multimap of the key-value pairs.59* If the number of elements is odd, then the first value is used as the60* default value with an empty key.61*/62static void ExpandListArgument(63std::string const& arg, std::multimap<std::string, std::string>& argsOut);6465cmCPackIFWGenerator* Generator;6667protected:68void WriteGeneratedByToStrim(cmXMLWriter& xout) const;69};7071#define cmCPackIFWLogger(logType, msg) \72do { \73std::ostringstream cmCPackLog_msg; \74cmCPackLog_msg << msg; \75if (Generator) { \76Generator->Logger->Log(cmCPackLog::LOG_##logType, __FILE__, __LINE__, \77cmCPackLog_msg.str().c_str()); \78} \79} while (false)808182