38 lines
1.0 KiB
C++
38 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <optional>
|
|
#include <string>
|
|
|
|
class Source {
|
|
public:
|
|
Source(const std::string& path);
|
|
Source(const std::string& path, const std::string& target);
|
|
Source(const std::string& path, const std::string& target, const std::string& name);
|
|
Source(const std::string& path, const std::optional<std::string>& target, const std::optional<std::string>& name);
|
|
|
|
std::string getPath() const;
|
|
std::string getTarget() const;
|
|
std::string getName() const;
|
|
std::optional<std::string> getOptionalTarget() const;
|
|
std::optional<std::string> getOptionalName() const;
|
|
|
|
void setPath(const std::string& path);
|
|
void setTarget(const std::string& target);
|
|
void setName(const std::string& name);
|
|
|
|
std::string print() const;
|
|
|
|
void clearTarget();
|
|
void clearName();
|
|
|
|
bool hasExplicitTarget() const;
|
|
bool hasExplicitName() const;
|
|
|
|
bool operator < (const Source& other) const;
|
|
|
|
private:
|
|
std::string path;
|
|
std::optional<std::string> target;
|
|
std::optional<std::string> name;
|
|
};
|