Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / CTest / cmCTestUpdateHandler.h
blob70262fa3099fc45002eedfdf17b3eae43bb10758
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmCTestUpdateHandler.h,v $
5 Language: C++
6 Date: $Date: 2009-02-24 14:09:43 $
7 Version: $Revision: 1.11 $
9 Copyright (c) 2002 Kitware, Inc. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
18 #ifndef cmCTestUpdateHandler_h
19 #define cmCTestUpdateHandler_h
22 #include "cmCTestGenericHandler.h"
23 #include "cmListFileCache.h"
25 #if defined(__sgi) && !defined(__GNUC__)
26 # pragma set woff 1375 /* base class destructor not virtual */
27 #endif
29 /** \class cmCTestUpdateHandler
30 * \brief A class that handles ctest -S invocations
33 class cmCTestUpdateHandler : public cmCTestGenericHandler
35 public:
36 cmTypeMacro(cmCTestUpdateHandler, cmCTestGenericHandler);
39 * The main entry point for this class
41 int ProcessHandler();
43 cmCTestUpdateHandler();
45 enum {
46 e_UNKNOWN = 0,
47 e_CVS,
48 e_SVN,
49 e_LAST
52 /**
53 * Initialize handler
55 virtual void Initialize();
57 private:
58 // Some structures needed for update
59 struct StringPair :
60 public std::pair<std::string, std::string>{};
61 struct UpdateFiles : public std::vector<StringPair>{};
63 // Determine the type of version control
64 int DetermineType(const char* cmd, const char* type);
66 // The VCS command to update the working tree.
67 std::string UpdateCommand;
68 int UpdateType;
70 bool InitialCheckout(std::ostream& ofs);
71 int DetectVCS(const char* dir);
72 bool SelectVCS();
75 #if defined(__sgi) && !defined(__GNUC__)
76 # pragma reset woff 1375 /* base class destructor not virtual */
77 #endif
79 #endif