cmWIXPatch.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2014 Kitware, Inc.
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmWIXPatch_h
  11. #define cmWIXPatch_h
  12. #include "cmWIXPatchParser.h"
  13. #include "cmWIXSourceWriter.h"
  14. #include <string>
  15. /** \class cmWIXPatch
  16. * \brief Class that maintains and applies patch fragments
  17. */
  18. class cmWIXPatch
  19. {
  20. public:
  21. cmWIXPatch(cmCPackLog* logger);
  22. bool LoadFragments(std::string const& patchFilePath);
  23. void ApplyFragment(std::string const& id, cmWIXSourceWriter& writer);
  24. bool CheckForUnappliedFragments();
  25. private:
  26. void ApplyElementChildren(const cmWIXPatchElement& element,
  27. cmWIXSourceWriter& writer);
  28. void ApplyElement(const cmWIXPatchElement& element,
  29. cmWIXSourceWriter& writer);
  30. cmCPackLog* Logger;
  31. cmWIXPatchParser::fragment_map_t Fragments;
  32. };
  33. #endif