2016-09-27 19:01:08 +00:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2007-05-25 19:22:22 +00:00
|
|
|
#ifndef cmHexFileConverter_h
|
|
|
|
#define cmHexFileConverter_h
|
|
|
|
|
2017-08-25 18:39:02 +00:00
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
|
|
|
|
2007-05-25 19:22:22 +00:00
|
|
|
/** \class cmHexFileConverter
|
2012-08-13 17:42:58 +00:00
|
|
|
* \brief Can detects Intel Hex and Motorola S-record files and convert them
|
2007-05-25 19:22:22 +00:00
|
|
|
* to binary files.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
class cmHexFileConverter
|
|
|
|
{
|
|
|
|
public:
|
2016-05-16 14:34:04 +00:00
|
|
|
enum FileType
|
|
|
|
{
|
|
|
|
Binary,
|
|
|
|
IntelHex,
|
|
|
|
MotorolaSrec
|
|
|
|
};
|
2007-05-25 19:22:22 +00:00
|
|
|
static FileType DetermineFileType(const char* inFileName);
|
|
|
|
static bool TryConvert(const char* inFileName, const char* outFileName);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|