Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Source/CTest/cmCTestP4.h
5000 views
1
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2
file LICENSE.rst or https://cmake.org/licensing for details. */
3
#pragma once
4
5
#include "cmConfigure.h" // IWYU pragma: keep
6
7
#include <iosfwd>
8
#include <map>
9
#include <string>
10
#include <vector>
11
12
#include "cmCTestGlobalVC.h"
13
14
class cmCTest;
15
class cmMakefile;
16
17
/** \class cmCTestP4
18
* \brief Interaction with the Perforce command-line tool
19
*
20
*/
21
class cmCTestP4 : public cmCTestGlobalVC
22
{
23
public:
24
/** Construct with a CTest instance and update log stream. */
25
cmCTestP4(cmCTest* ctest, cmMakefile* mf, std::ostream& log);
26
27
~cmCTestP4() override;
28
29
private:
30
std::vector<std::string> ChangeLists;
31
32
struct User
33
{
34
std::string UserName;
35
std::string Name;
36
std::string EMail;
37
std::string AccessTime;
38
};
39
std::map<std::string, User> Users;
40
std::vector<std::string> P4Options;
41
42
User GetUserData(std::string const& username);
43
void SetP4Options(std::vector<std::string>& options);
44
45
std::string GetWorkingRevision();
46
bool NoteOldRevision() override;
47
bool NoteNewRevision() override;
48
bool UpdateImpl() override;
49
bool UpdateCustom(std::string const& custom);
50
51
bool LoadRevisions() override;
52
bool LoadModifications() override;
53
54
class ChangesParser;
55
class DescribeParser;
56
class DiffParser;
57
// Parsing helper classes.
58
class IdentifyParser;
59
class UserParser;
60
61
friend class IdentifyParser;
62
friend class ChangesParser;
63
friend class UserParser;
64
friend class DescribeParser;
65
friend class DiffParser;
66
};
67
68