cmCTestCVS.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 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 cmCTestCVS_h
  11. #define cmCTestCVS_h
  12. #include "cmCTestVC.h"
  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. virtual ~cmCTestCVS();
  23. private:
  24. // Implement cmCTestVC internal API.
  25. virtual bool UpdateImpl();
  26. virtual bool WriteXMLUpdates(std::ostream& xml);
  27. // Update status for files in each directory.
  28. class Directory: public std::map<cmStdString, PathStatus> {};
  29. std::map<cmStdString, Directory> Dirs;
  30. std::string ComputeBranchFlag(std::string const& dir);
  31. void LoadRevisions(std::string const& file, const char* branchFlag,
  32. std::vector<Revision>& revisions);
  33. void WriteXMLDirectory(std::ostream& xml, std::string const& path,
  34. Directory const& dir);
  35. // Parsing helper classes.
  36. class UpdateParser;
  37. class LogParser;
  38. friend class UpdateParser;
  39. friend class LogParser;
  40. };
  41. #endif