Updated formatting of documentation plus a little reorganization.
[cmake.git] / Source / CTest / cmCTestGlobalVC.h
blobe706e42d1918d62e3458a5b7bbf02bf2dc4a3e9b
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmCTestGlobalVC.h,v $
5 Language: C++
6 Date: $Date: 2009-04-22 13:18:19 $
7 Version: $Revision: 1.1 $
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 =========================================================================*/
17 #ifndef cmCTestGlobalVC_h
18 #define cmCTestGlobalVC_h
20 #include "cmCTestVC.h"
22 /** \class cmCTestGlobalVC
23 * \brief Base class for handling globally-versioned trees
26 class cmCTestGlobalVC: public cmCTestVC
28 public:
29 /** Construct with a CTest instance and update log stream. */
30 cmCTestGlobalVC(cmCTest* ctest, std::ostream& log);
32 virtual ~cmCTestGlobalVC();
34 protected:
35 // Implement cmCTestVC internal API.
36 virtual bool WriteXMLUpdates(std::ostream& xml);
38 /** Represent a vcs-reported action for one path in a revision. */
39 struct Change
41 char Action;
42 std::string Path;
43 Change(char a = '?'): Action(a) {}
46 // Update status for files in each directory.
47 class Directory: public std::map<cmStdString, File> {};
48 std::map<cmStdString, Directory> Dirs;
50 // Old and new repository revisions.
51 std::string OldRevision;
52 std::string NewRevision;
54 // Information known about old revision.
55 Revision PriorRev;
57 // Information about revisions from a svn log.
58 std::list<Revision> Revisions;
60 virtual const char* LocalPath(std::string const& path);
62 virtual void DoRevision(Revision const& revision,
63 std::vector<Change> const& changes);
64 virtual void DoModification(PathStatus status, std::string const& path);
65 virtual void LoadModifications() = 0;
66 virtual void LoadRevisions() = 0;
68 void WriteXMLDirectory(std::ostream& xml, std::string const& path,
69 Directory const& dir);
72 #endif