-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStageInfo.hpp
More file actions
68 lines (55 loc) · 2.31 KB
/
Copy pathStageInfo.hpp
File metadata and controls
68 lines (55 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef RUNCPP2_DATA_STAGE_INFO_HPP
#define RUNCPP2_DATA_STAGE_INFO_HPP
#include "runcpp2/Data/ParseCommon.hpp"
#include "runcpp2/YamlLib.hpp"
#include <vector>
#include <string>
#include <unordered_map>
namespace runcpp2
{
namespace Data
{
class StageInfo
{
public:
std::unordered_map<PlatformName, std::string> PreRun;
std::unordered_map<PlatformName, std::string> CheckExistence;
struct RunPart
{
enum class RunType
{
ONCE,
REPEATS,
COUNT
};
RunType Type;
std::string CommandPart;
};
struct OutputTypeInfo
{
std::string Flags;
std::string Executable;
std::vector<std::string> Setup;
std::vector<std::string> Cleanup;
std::vector<RunPart> RunParts;
};
struct
{
std::unordered_map<PlatformName, OutputTypeInfo> Executable;
std::unordered_map<PlatformName, OutputTypeInfo> Static;
std::unordered_map<PlatformName, OutputTypeInfo> Shared;
} OutputTypes;
using SubstitutionMap = std::unordered_map<std::string, std::vector<std::string>>;
bool PerformSubstituions( const SubstitutionMap& substitutionMap,
std::string& inOutSubstitutedString) const;
bool ConstructCommand( const SubstitutionMap& substitutionMap,
bool isExecutable,
std::string& outCommand) const;
bool ParseYAML_Node(ryml::ConstNodeRef& node, std::string outputTypeKeyName);
std::string ToString( std::string indentation,
std::string outputTypeKeyName) const;
bool Equals(const StageInfo& other) const;
};
}
}
#endif