cmCTestUpdateHandler.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmCTestUpdateHandler_h
  14. #define cmCTestUpdateHandler_h
  15. #include "cmCTestGenericHandler.h"
  16. #include "cmListFileCache.h"
  17. #if defined(__sgi) && !defined(__GNUC__)
  18. # pragma set woff 1375 /* base class destructor not virtual */
  19. #endif
  20. /** \class cmCTestUpdateHandler
  21. * \brief A class that handles ctest -S invocations
  22. *
  23. */
  24. class cmCTestUpdateHandler : public cmCTestGenericHandler
  25. {
  26. public:
  27. cmTypeMacro(cmCTestUpdateHandler, cmCTestGenericHandler);
  28. /*
  29. * The main entry point for this class
  30. */
  31. int ProcessHandler();
  32. cmCTestUpdateHandler();
  33. enum {
  34. e_UNKNOWN = 0,
  35. e_CVS,
  36. e_SVN,
  37. e_LAST
  38. };
  39. /**
  40. * Initialize handler
  41. */
  42. virtual void Initialize();
  43. private:
  44. // Some structures needed for update
  45. struct StringPair :
  46. public std::pair<std::string, std::string>{};
  47. struct UpdateFiles : public std::vector<StringPair>{};
  48. // Determine the type of version control
  49. int DetermineType(const char* cmd, const char* type);
  50. bool InitialCheckout(std::ostream& ofs);
  51. };
  52. #if defined(__sgi) && !defined(__GNUC__)
  53. # pragma reset woff 1375 /* base class destructor not virtual */
  54. #endif
  55. #endif