1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmCTestGlobalVC.h,v $
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
29 /** Construct with a CTest instance and update log stream. */
30 cmCTestGlobalVC(cmCTest
* ctest
, std::ostream
& log
);
32 virtual ~cmCTestGlobalVC();
35 // Implement cmCTestVC internal API.
36 virtual bool WriteXMLUpdates(std::ostream
& xml
);
38 /** Represent a vcs-reported action for one path in a revision. */
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.
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
);