cmHexFileConverter.h 709 B

12345678910111213141516171819202122232425262728
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmHexFileConverter_h
  4. #define cmHexFileConverter_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. /** \class cmHexFileConverter
  8. * \brief Can detects Intel Hex and Motorola S-record files and convert them
  9. * to binary files.
  10. *
  11. */
  12. class cmHexFileConverter
  13. {
  14. public:
  15. enum FileType
  16. {
  17. Binary,
  18. IntelHex,
  19. MotorolaSrec
  20. };
  21. static FileType DetermineFileType(const std::string& inFileName);
  22. static bool TryConvert(const std::string& inFileName,
  23. const std::string& outFileName);
  24. };
  25. #endif