mason/src/dependency.h

32 lines
640 B
C
Raw Normal View History

2023-08-31 20:06:02 +00:00
#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;
};