Updated formatting of documentation plus a little reorganization.
[cmake.git] / Source / CTest / cmCTestUpdateHandler.h
blobb2cd3674956da3b477f9be471eacb938462b4d90
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmCTestUpdateHandler.h,v $
5 Language: C++
6 Date: $Date: 2009-07-10 15:07:58 $
7 Version: $Revision: 1.14 $
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_BZR,
50 e_GIT,
51 e_HG,
52 e_LAST
55 /**
56 * Initialize handler
58 virtual void Initialize();
60 private:
61 // Some structures needed for update
62 struct StringPair :
63 public std::pair<std::string, std::string>{};
64 struct UpdateFiles : public std::vector<StringPair>{};
66 // Determine the type of version control
67 int DetermineType(const char* cmd, const char* type);
69 // The VCS command to update the working tree.
70 std::string UpdateCommand;
71 int UpdateType;
73 bool InitialCheckout(std::ostream& ofs);
74 int DetectVCS(const char* dir);
75 bool SelectVCS();
78 #if defined(__sgi) && !defined(__GNUC__)
79 # pragma reset woff 1375 /* base class destructor not virtual */
80 #endif
82 #endif