forked from nodegit/nodegit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlfs_cmd.h
More file actions
51 lines (43 loc) · 1.21 KB
/
lfs_cmd.h
File metadata and controls
51 lines (43 loc) · 1.21 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
#ifndef NODEGIT_LFS_CMD_H
#define NODEGIT_LFS_CMD_H
#include <memory>
#include <string>
#include "cmd.h"
namespace nodegit {
/**
* \struct LfsCmdOpts
* Abstract structure to store options for the LFS commands.
*/
struct LfsCmdOpts {
LfsCmdOpts() = default;
virtual ~LfsCmdOpts() = default;
LfsCmdOpts(const LfsCmdOpts &other) = delete;
LfsCmdOpts(LfsCmdOpts &&other) = delete;
LfsCmdOpts& operator=(const LfsCmdOpts &other) = delete;
LfsCmdOpts& operator=(LfsCmdOpts &&other) = delete;
virtual std::string BuildArgs() const = 0;
};
/**
* \class LfsCmd
* An LFS command to execute.
*/
class LfsCmd : public Cmd {
public:
static const char* kStrLfsCmd;
// Enumeration describing the type of LFS command
enum class Type {kNone};
LfsCmd(Type lfsCmdType, std::unique_ptr<LfsCmdOpts> &&opts);
LfsCmd() = delete;
~LfsCmd() = default;
LfsCmd(const LfsCmd &other) = delete;
LfsCmd(LfsCmd &&other) = delete;
LfsCmd& operator=(const LfsCmd &other) = delete;
LfsCmd& operator=(LfsCmd &&other) = delete;
std::string Command() const;
std::string Args() const;
private:
Type m_lfsCmdType {Type::kNone};
std::unique_ptr<LfsCmdOpts> m_opts {};
};
} // namespace nodegit
#endif // NODEGIT_LFS_CMD_H