cmCTestCVS.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 cmCTestCVS_h
  4. #define cmCTestCVS_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include "cmCTestVC.h"
  7. #include <iosfwd>
  8. #include <map>
  9. #include <string>
  10. #include <vector>
  11. class cmCTest;
  12. class cmXMLWriter;
  13. /** \class cmCTestCVS
  14. * \brief Interaction with cvs command-line tool
  15. *
  16. */
  17. class cmCTestCVS : public cmCTestVC
  18. {
  19. public:
  20. /** Construct with a CTest instance and update log stream. */
  21. cmCTestCVS(cmCTest* ctest, std::ostream& log);
  22. ~cmCTestCVS() override;
  23. private:
  24. // Implement cmCTestVC internal API.
  25. bool UpdateImpl() override;
  26. bool WriteXMLUpdates(cmXMLWriter& xml) override;
  27. // Update status for files in each directory.
  28. class Directory : public std::map<std::string, PathStatus>
  29. {
  30. };
  31. std::map<std::string, Directory> Dirs;
  32. std::string ComputeBranchFlag(std::string const& dir);
  33. void LoadRevisions(std::string const& file, const char* branchFlag,
  34. std::vector<Revision>& revisions);
  35. void WriteXMLDirectory(cmXMLWriter& xml, std::string const& path,
  36. Directory const& dir);
  37. // Parsing helper classes.
  38. class LogParser;
  39. class UpdateParser;
  40. friend class LogParser;
  41. friend class UpdateParser;
  42. };
  43. #endif