32 lines
640 B
C
32 lines
640 B
C
|
#pragma once
|
||
|
|
||
|
#include <string>
|
||
|
#include <optional>
|
||
|
|
||
|
class Dependency {
|
||
|
public:
|
||
|
enum class Type {
|
||
|
automatic,
|
||
|
simple,
|
||
|
mason
|
||
|
};
|
||
|
|
||
|
Dependency(
|
||
|
const std::string& path,
|
||
|
Type type = Type::automatic,
|
||
|
const std::optional<std::string>& name = std::nullopt,
|
||
|
const std::optional<std::string>& version = std::nullopt
|
||
|
);
|
||
|
|
||
|
Type getType() const;
|
||
|
std::optional<std::string> getName() const;
|
||
|
std::optional<std::string> getVersion() const;
|
||
|
|
||
|
const std::string path;
|
||
|
|
||
|
private:
|
||
|
Type type;
|
||
|
std::optional<std::string> name;
|
||
|
std::optional<std::string> version;
|
||
|
};
|